* { box-sizing: border-box; }
body {
    font-family: Arial, Helvetica, sans-serif;
    background: #111;
    color: #eee;
    margin: 0;
    padding: 20px;
}
h1 { text-align: center; font-weight: 300; letter-spacing: 1px; }
a { color: #f0a500; }
.topbar {
    text-align: center;
    margin-bottom: 20px;
}
.topbar a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    margin: 0 10px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}
.card {
    background: #1c1c1c;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #eee;
    display: block;
    transition: transform .15s ease;
}
.card:hover { transform: scale(1.03); }
.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: #333;
}
.card .info { padding: 10px; }
.card .info .t { font-size: 15px; font-weight: bold; }
.card .info .c { font-size: 12px; color: #999; }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    max-width: 1600px;
    margin: 0 auto;
}
.photo-grid a img,
.photo-grid .thumb-x img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    background: #333;
    display: block;
}

.empty { text-align: center; color: #777; margin-top: 60px; }

/* lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    box-shadow: 0 0 30px rgba(0,0,0,.7);
}
#lightbox .close, #lightbox .nav {
    position: absolute;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    user-select: none;
    background: rgba(0,0,0,.4);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#lightbox .close { top: 20px; right: 20px; }
#lightbox .prev { left: 20px; top: 50%; transform: translateY(-50%); }
#lightbox .next { right: 20px; top: 50%; transform: translateY(-50%); }

.box {
    max-width: 500px;
    margin: 20px auto;
    background: #1c1c1c;
    padding: 20px;
    border-radius: 8px;
}
form.box input[type=text] {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #111;
    color: #eee;
    margin-bottom: 10px;
}
form.box input[type=file] { width: 100%; margin-bottom: 10px; color: #eee; }
form.box button, .btn {
    background: #f0a500;
    color: #111;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}
#progressWrap { margin-top: 15px; display: none; }
#progressBar { width: 100%; height: 20px; background: #333; border-radius: 4px; overflow: hidden; }
#progressBar > div { height: 100%; background: #f0a500; width: 0%; }
#status { font-size: 13px; color: #aaa; margin-top: 6px; }
.thumb-x {
    position: relative;
}
.del-btn {
    position: absolute;
    top: 4px; right: 4px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 26px; height: 26px;
    cursor: pointer;
}
