/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0a0a0a;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ccc;
    user-select: none;
}

/* === Slideshow Container === */
#slideshow-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
}

#slideshow-container.idle {
    cursor: none;
}

#slideshow-container.active {
    cursor: default;
}

/* === Main Image === */
#slide-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.6s ease;
}

#slide-image.fade-out {
    opacity: 0;
}

#slide-image.fade-in {
    opacity: 1;
}

/* === Top Bar === */
#top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 10;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.active #top-bar,
#slideshow-container:hover #top-bar {
    opacity: 1;
}

#counter {
    font-weight: 600;
    color: #e0c080;
}

#filename-display {
    font-style: italic;
    color: #aaa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    text-align: center;
    margin: 0 20px;
}

#timer-display {
    font-weight: 600;
    color: #e0c080;
    min-width: 50px;
    text-align: right;
}

/* === Bottom Controls === */
#controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 40px;
    padding: 10px 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 10;
}

.active #controls,
#slideshow-container:hover #controls {
    opacity: 1;
}

/* === Buttons === */
#controls button {
    background: none;
    border: none;
    color: #ccc;
    font-size: 22px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}

#controls button:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

#controls button:active {
    color: #e0c080;
    background: rgba(224,192,128,0.15);
}

#btn-pause.paused {
    color: #e0c080;
    background: rgba(224,192,128,0.15);
}

#btn-shuffle.shuffle-active {
    color: #e0c080;
    background: rgba(224,192,128,0.15);
}

/* === Delay Label === */
#delay-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #aaa;
    font-size: 13px;
}

#delay-input {
    width: 48px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    color: #e0c080;
    font-size: 14px;
    text-align: center;
    padding: 4px 2px;
    -moz-appearance: textfield;
}

#delay-input::-webkit-outer-spin-button,
#delay-input::-webkit-inner-spin-button {
    opacity: 1;
}

/* === Fullscreen adjustment === */
#slideshow-container:fullscreen #controls {
    bottom: 30px;
}

#slideshow-container:fullscreen #top-bar {
    padding: 16px 32px;
}

/* === No images fallback === */
.no-images {
    font-size: 28px;
    color: #e0c080;
    text-align: center;
}
