/* ---------- Base ---------- */
* {
    box-sizing: border-box;
}

:root {
    --accent: #0066cc;
}

body.dark {
    --accent: #7ab7ff;
}

body {
    margin: 0;
    padding: 40px 20px;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: #f6f7f9;
    color: #333;
    animation: fadeUp 0.6s ease both;
}

body.dark {
    background: #121212;
    color: #e4e4e4;
}

h1, p {
    text-align: center;
}

p {
    color: #666;
}

body.dark p {
    color: #aaa;
}

/* ---------- Fade ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Theme Toggle ---------- */

/* ---------- Top Controls ---------- */
.top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1100;
}

/* Back to home button */
.home-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

body.dark .home-btn {
    background: #1e1e1e;
}

.theme-toggle {
    position: static;
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

body.dark .theme-toggle {
    background: #1e1e1e;
    color: #fff;
}

/* ---------- Gallery ---------- */
.gallery {
    max-width: 1200px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.gallery img {
    width: 100%;
    border-radius: 10px;
    padding: 6px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.dark .gallery img {
    background: #1e1e1e;
}

.gallery img:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
    overflow: hidden;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.lightbox-caption {
    position: absolute;
    bottom: 70px;
    color: #ddd;
}

/* ---------- Navigation ---------- */
.lightbox-nav {
    position: absolute;
    top: 50%;
    font-size: 40px;
    color: var(--accent);
    cursor: pointer;
    transform: translateY(-50%);
}

.prev { left: 30px; }
.next { right: 30px; }

#closeLightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
}

/* ---------- Slideshow ---------- */
.slideshow-btn {
    position: absolute;
    top: 20px;
    left: 30px;
    border: none;
    background: rgba(0,0,0,0.5);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
}

/* ---------- Thumbnails ---------- */
.thumbnail-strip {
    position: absolute;
    bottom: 15px;
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    overflow-x: auto;
}

.thumbnail-strip img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    opacity: 0.6;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumbnail-strip img.active {
    opacity: 1;
    border-color: var(--accent);
}

/* ---------- Link ---------- */
a {
    display: block;
    text-align: center;
    margin-top: 30px;
    color: var(--accent);
    text-decoration: none;
}