:root {
    --bg-color: #1a1a1a;
    --panel-color: #222;
    --accent-color: #007bff;
    --text-color: #eee;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* --- Header for Generated File --- */
#generated-header {
    background: #000;
    text-align: center;
    padding: 8px;
    font-size: 0.8rem;
    color: #999;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}
#generated-header a { color: #ffffff !important; text-decoration: none; font-weight: bold; }

/* --- Load Zones --- */
#drop-zone {
    border: 2px dashed #555;
    margin: 20px;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
#drop-zone.hover { border-color: var(--accent-color); background: #252525; }

#staging-area { display: none; background: var(--panel-color); padding: 20px; text-align: center; border-top: 1px solid #333; }
.file-count-badge { background: var(--accent-color); padding: 5px 10px; border-radius: 15px; font-weight: bold; margin-bottom: 10px; display: inline-block; }

/* --- Viewer --- */
#viewer-container {
    flex-grow: 1;
    display: none;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #000;
    overflow: hidden;
}
img { max-width: 100%; max-height: 100%; object-fit: contain; }

.nav-arrow {
    position: absolute; top: 0; bottom: 0; width: 15%;
    background: transparent; border: none; color: rgba(255,255,255,0.1);
    font-size: 2rem; cursor: pointer; z-index: 10; transition: 0.2s;
}
.nav-arrow:hover { color: #fff; background: rgba(255,255,255,0.05); }
.left { left: 0; }
.right { right: 0; }

/* --- Controls --- */
#controls {
    display: none;
    padding: 15px;
    background: var(--panel-color);
    flex-direction: column;
    border-top: 1px solid #333;
    flex-shrink: 0;
}

.control-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.info { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 75%; }

.slider-wrapper { width: 100%; padding: 10px 0; display: flex; justify-content: center; }
input[type="range"] { 
    width: 100%; 
    height: 40px; /* Touch friendly */
    cursor: pointer; 
    accent-color: var(--accent-color);
}

.control-row-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }

button { padding: 8px 15px; border-radius: 5px; border: none; cursor: pointer; color: white; font-weight: bold; }
.btn-primary { background: var(--accent-color); }
.btn-save { background: #28a745; margin-left: 5px; }

/* Switch */
.switch { position: relative; width: 34px; height: 20px; margin-right: 5px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-switch { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #555; border-radius: 34px; transition: 0.4s; }
.slider-switch:before { position: absolute; content: ""; height: 12px; width: 12px; left: 4px; bottom: 4px; background: white; border-radius: 50%; transition: 0.4s; }
input:checked + .slider-switch { background: var(--accent-color); }
input:checked + .slider-switch:before { transform: translateX(14px); }

.auto-controls { display: flex; align-items: center; gap: 5px; font-size: 0.85rem; color: #aaa; }
#auto-interval { width: 45px; background: #111; border: 1px solid #444; color: white; text-align: center; border-radius: 3px; }

.hidden { display: none !important; }