* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    height: 100vh;
    overflow: hidden;
    animation: fadeIn 1.2s ease forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ── Background ── */
#bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.35) 0%,
        rgba(0,0,0,0.05) 40%,
        rgba(0,0,0,0.80) 100%
    );
    pointer-events: none;
}

/* ── Tooltip system ── */
[data-tip] {
    position: relative;
}

[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

[data-tip]:hover::after {
    opacity: 1;
}

/* ── Clock ── */
#clock {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.07);
    padding: 8px 18px;
    border-radius: 100px;
}

/* ── Timer ── */
@keyframes timerFadeIn {
    0%   { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes timerFadeOut {
    0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

#timer-display {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 22px 36px;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    display: none;
    opacity: 0;
}

#timer-display.visible {
    display: flex;
    animation: timerFadeIn 0.35s ease forwards;
}

#timer-display.hiding {
    display: flex;
    animation: timerFadeOut 0.3s ease forwards;
}

#timer-numbers {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 72px;
    letter-spacing: 8px;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 0 30px rgba(255,255,255,0.15);
}

#timer-numbers.warning {
    color: #ff6b6b;
    text-shadow: 0 0 30px rgba(255,107,107,0.4);
}

#timer-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#timer-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

#timer-input-display {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 2px;
    color: #ffffff;
    width: 52px;
    text-align: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 5px 6px;
    outline: none;
    cursor: text;
}

#timer-input-display:focus {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.09);
}

#timer-up,
#timer-down {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#timer-up:hover,
#timer-down:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    border-color: rgba(255,255,255,0.2);
}

#timer-start,
#timer-pause,
#timer-reset {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.55);
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#timer-start:hover,
#timer-pause:hover,
#timer-reset:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    border-color: rgba(255,255,255,0.2);
}

#timer-start {
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.2);
}

#timer-pause {
    display: none;
}

/* ── Scene Nav ── */
#scene-nav {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scene-btn {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(20px);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    position: relative;
}

.scene-btn::after {
    left: calc(100% + 10px);
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
}

.scene-btn:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.14);
    transform: scale(1.06);
}

.scene-btn.active {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 16px rgba(255,255,255,0.08), inset 0 0 12px rgba(255,255,255,0.04);
}

/* ── Right Buttons ── */
#right-btns {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#right-btns button {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(20px);
    cursor: pointer;
    font-size: 20px;
    color: #ffffff;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#right-btns button::after {
    right: calc(100% + 10px);
    left: auto;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
}

#right-btns button:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.14);
    transform: scale(1.06);
}

#right-btns button.active {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 16px rgba(255,255,255,0.08), inset 0 0 12px rgba(255,255,255,0.04);
}

/* ── Ambient Panel ── */
#ambient-panel {
    position: fixed;
    right: -320px;
    top: 0;
    bottom: 0;
    width: 300px;
    z-index: 20;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(28px);
    border-left: 1px solid rgba(255,255,255,0.06);
    transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#ambient-panel.open { right: 0; }

#ambient-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

#ambient-header h2 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}

#close-ambient {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 15px;
    transition: color 0.15s;
    position: relative;
}

#close-ambient:hover { color: #ffffff; }

#sounds-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.sound-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 10px;
    border-radius: 12px;
    border: 1px solid transparent;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.sound-row.active {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    box-shadow: inset 0 0 12px rgba(255,255,255,0.02);
}

.snd-toggle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
}

.snd-toggle.on {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 0 12px rgba(255,255,255,0.06);
}

.snd-info { flex: 1; min-width: 0; }

.snd-name {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.sound-row.active .snd-name { color: rgba(255,255,255,0.7); }

input[type=range].snd-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: rgba(255,255,255,0.1);
    outline: none;
    cursor: pointer;
}

input[type=range].snd-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: transform 0.15s;
}

input[type=range].snd-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: #ffffff;
}

/* ── Player Bar ── */
#player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 0 20px 20px 80px;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

#player-bar.hidden { transform: translateY(120%); }

#player-inner {
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(28px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 -4px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
}

#track-info { min-width: 150px; }

#track-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255,255,255,0.85);
}

#track-artist {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    margin-top: 3px;
    letter-spacing: 0.5px;
}

#progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

#progress-wrap span {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

#progress-bar {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

#progress-bar:hover { height: 4px; }

#progress-fill {
    height: 100%;
    width: 0%;
    background: rgba(255,255,255,0.6);
    border-radius: 2px;
    pointer-events: none;
}

#progress-bar:hover #progress-fill {
    background: #ffffff;
}

#controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.ctrl-btn {
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.15s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.06);
}

.ctrl-btn.active {
    color: #ffffff;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 12px rgba(255,255,255,0.08);
}

#btn-play {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    color: #000000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    position: relative;
    box-shadow: 0 0 20px rgba(255,255,255,0.15);
}

#btn-play:hover {
    transform: scale(1.08);
    background: #ffffff;
    box-shadow: 0 0 28px rgba(255,255,255,0.25);
}

#vol-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

#vol-icon { font-size: 13px; }

#vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 75px;
    height: 2px;
    border-radius: 2px;
    background: rgba(255,255,255,0.1);
    outline: none;
    cursor: pointer;
}

#vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: transform 0.15s;
}

#vol-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: #ffffff;
}

#upload-label {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    white-space: nowrap;
    position: relative;
}

#upload-label:hover {
    background: rgba(255,255,255,0.09);
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.15);
}

#upload-input { display: none; }

#hide-player {
    background: none;
    border: none;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
    flex-shrink: 0;
    position: relative;
}

#hide-player:hover {
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.05);
}

/* ── Show Player Button ── */
#show-player {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(16px);
    cursor: pointer;
    font-size: 17px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#show-player.visible {
    opacity: 1;
    pointer-events: all;
}