/* ===========================
   Reset
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===========================
   Body
=========================== */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f6f9;
    color: #333;
    line-height: 1.6;
    padding: 30px 15px;
}

/* ===========================
   Judul
=========================== */
h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 30px;
    margin-bottom: 25px;
}

/* ===========================
   Form Upload
=========================== */
form {
    max-width: 550px;
    margin: 0 auto 40px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed #d7d7d7;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: #27ae60;
}

input[type="text"] {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 15px;
    transition: .3s;
}

input[type="text"]:focus {
    border-color: #27ae60;
    box-shadow: 0 0 5px rgba(39,174,96,.3);
}

button {
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: .3s;
}

button:hover {
    background: #219150;
}

/* ===========================
   Gallery
=========================== */
.gallery {
    max-width: 1400px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
    gap: 20px;
}

.image-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,.08);
    transition: .25s;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
}

.image-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.image-item span {
    display: block;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    color: #666;
    word-break: break-word;
}

/* ===========================
   Responsive
=========================== */
@media (max-width:768px) {

    body {
        padding: 20px 10px;
    }

    h1 {
        font-size: 24px;
    }

    form {
        padding: 20px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(170px,1fr));
        gap: 15px;
    }

    .image-item img {
        height: 180px;
    }
}