:root {
    --bg-color: #121214;
    --card-bg: #1e1e22;
    --accent-color: #ffffff;
    --muted-color: #71717a;
    --transition-speed: 0.8s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: #e4e4e7;
    font-family: system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.gallery-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.slideshow-frame {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: calc(100vh - 160px);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #09090b;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.slide {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: opacity var(--transition-speed) ease-in-out;
}

.slide.fade-out {
    opacity: 0;
}

.controls {
    position: absolute;
    bottom: 15px;
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    padding: 8px 16px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slideshow-frame:hover .controls {
    opacity: 1;
}

.controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.controls button:hover {
    color: var(--muted-color);
}

.thumbnail-bar {
    width: 100%;
    max-width: 1200px;
    height: 90px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--card-bg) transparent;
}

.thumb {
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s, transform 0.2s, border-color 0.3s;
    border: 2px solid transparent;
}

.thumb:hover {
    opacity: 0.8;
}

.thumb.active {
    opacity: 1;
    border-color: var(--accent-color);
    transform: scale(1.03);
}