@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    background: #0a0a0f;
    color: #ffffff;
    margin: 0;
    padding: 15px;
    min-height: 100vh;
    padding-bottom: 80px;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(120, 0, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 200, 255, 0.08) 0%, transparent 50%);
}

/* Header */
#header {
    margin-bottom: 15px;
    padding: 10px;
}

#header h1 {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin: 0;
    background: linear-gradient(135deg, #ff006e, #ff6d00, #ffbe0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 109, 0, 0.4));
}

#header .subtitle {
    font-size: 11px;
    letter-spacing: 8px;
    color: #555;
    margin-top: 4px;
}

/* Equalizer */
.eq-bar-container {
    display: flex;
    justify-content: center;
    gap: 3px;
    height: 30px;
    align-items: flex-end;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.eq-bar-container.playing {
    opacity: 1;
}

.eq-bar {
    width: 4px;
    background: linear-gradient(to top, #ff006e, #ff6d00, #ffbe0b);
    border-radius: 2px;
    animation: eqBounce 0.8s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1) { animation-delay: 0.0s; height: 10px; }
.eq-bar:nth-child(2) { animation-delay: 0.1s; height: 18px; }
.eq-bar:nth-child(3) { animation-delay: 0.2s; height: 12px; }
.eq-bar:nth-child(4) { animation-delay: 0.15s; height: 24px; }
.eq-bar:nth-child(5) { animation-delay: 0.05s; height: 16px; }
.eq-bar:nth-child(6) { animation-delay: 0.25s; height: 20px; }
.eq-bar:nth-child(7) { animation-delay: 0.1s; height: 14px; }
.eq-bar:nth-child(8) { animation-delay: 0.2s; height: 22px; }
.eq-bar:nth-child(9) { animation-delay: 0.0s; height: 11px; }

@keyframes eqBounce {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1.2); }
}

/* Controls row */
.controls-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 4px;
    padding-right: 10px;
}

#teamSelect, #voiceSelect {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 8px;
    height: 28px;
    cursor: pointer;
    outline: none;
}

#teamSelect option, #voiceSelect option {
    background: #1a1a2e;
    color: #fff;
}

/* Toggle */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label {
    font-size: 9px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #555;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
    background: rgba(255, 0, 110, 0.3);
    border: 1px solid rgba(255, 0, 110, 0.5);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: #ff006e;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.5);
}

/* Pad grid */
.pad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto 1fr;
    gap: 12px;
    max-width: 800px;
    margin: 10px auto 0;
}

button.pad-goal {
    grid-column: 1 / -1;
    aspect-ratio: auto !important;
    height: 150px;
}

.pad-goal .pad-label {
    font-size: 28px;
    letter-spacing: 6px;
}

/* Category pads */
.pad {
    font-family: 'Orbitron', sans-serif;
    aspect-ratio: auto;
    height: 100px;
    border: 2px solid;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.9), rgba(15, 15, 25, 0.95));
}

.pad-label {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.pad-next {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 1px;
    opacity: 0.4;
    text-transform: uppercase;
}

/* Goal - pink/red */
.pad-goal {
    border-color: rgba(255, 0, 110, 0.3);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.1);
}
.pad-goal .pad-label { color: #ff006e; }
.pad-goal:hover {
    border-color: rgba(255, 0, 110, 0.6);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.2);
    background: linear-gradient(145deg, #2a1025, #1a0a18);
}
.pad-goal.active {
    background: linear-gradient(145deg, #ff006e, #cc0058);
    border-color: #ff006e;
    box-shadow: 0 0 40px rgba(255, 0, 110, 0.6), 0 0 80px rgba(255, 0, 110, 0.3);
    animation: pulse-pink 1.5s ease-in-out infinite;
}
.pad-goal.active .pad-label,
.pad-goal.active .pad-next { color: #fff; opacity: 1; }

/* Timeout - cyan */
.pad-timeout {
    border-color: rgba(0, 200, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.1);
}
.pad-timeout .pad-label { color: #00c8ff; }
.pad-timeout:hover {
    border-color: rgba(0, 200, 255, 0.6);
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.2);
    background: linear-gradient(145deg, #0a1a2a, #081520);
}
.pad-timeout.active {
    background: linear-gradient(145deg, #00c8ff, #009fcc);
    border-color: #00c8ff;
    box-shadow: 0 0 40px rgba(0, 200, 255, 0.6), 0 0 80px rgba(0, 200, 255, 0.3);
    animation: pulse-cyan 1.5s ease-in-out infinite;
}
.pad-timeout.active .pad-label,
.pad-timeout.active .pad-next { color: #fff; opacity: 1; }

/* 2 Minutes - yellow */
.pad-2min {
    border-color: rgba(255, 190, 11, 0.3);
    box-shadow: 0 0 15px rgba(255, 190, 11, 0.1);
}
.pad-2min .pad-label { color: #ffbe0b; }
.pad-2min:hover {
    border-color: rgba(255, 190, 11, 0.6);
    box-shadow: 0 0 30px rgba(255, 190, 11, 0.2);
    background: linear-gradient(145deg, #2a2010, #1a1508);
}
.pad-2min.active {
    background: linear-gradient(145deg, #ffbe0b, #cc9800);
    border-color: #ffbe0b;
    box-shadow: 0 0 40px rgba(255, 190, 11, 0.6), 0 0 80px rgba(255, 190, 11, 0.3);
    animation: pulse-yellow 1.5s ease-in-out infinite;
}
.pad-2min.active .pad-label { color: #000; }
.pad-2min.active .pad-next { color: #000; opacity: 1; }

/* Yellow Card - orange */
.pad-yellow {
    border-color: rgba(255, 109, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 109, 0, 0.1);
}
.pad-yellow .pad-label { color: #ff6d00; }
.pad-yellow:hover {
    border-color: rgba(255, 109, 0, 0.6);
    box-shadow: 0 0 30px rgba(255, 109, 0, 0.2);
    background: linear-gradient(145deg, #2a1a0a, #1a1005);
}
.pad-yellow.active {
    background: linear-gradient(145deg, #ff6d00, #cc5700);
    border-color: #ff6d00;
    box-shadow: 0 0 40px rgba(255, 109, 0, 0.6), 0 0 80px rgba(255, 109, 0, 0.3);
    animation: pulse-orange 1.5s ease-in-out infinite;
}
.pad-yellow.active .pad-label,
.pad-yellow.active .pad-next { color: #fff; opacity: 1; }

/* Entrance - green */
.pad-entrance {
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}
.pad-entrance .pad-label { color: #00ff88; }
.pad-entrance:hover {
    border-color: rgba(0, 255, 136, 0.6);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
    background: linear-gradient(145deg, #0a2a18, #081a10);
}
.pad-entrance.active {
    background: linear-gradient(145deg, #00ff88, #00cc6d);
    border-color: #00ff88;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.6), 0 0 80px rgba(0, 255, 136, 0.3);
    animation: pulse-green 1.5s ease-in-out infinite;
}
.pad-entrance.active .pad-label { color: #000; }
.pad-entrance.active .pad-next { color: #000; opacity: 1; }

/* Pulse animations */
@keyframes pulse-pink {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 0, 110, 0.6), 0 0 80px rgba(255, 0, 110, 0.3); }
    50% { box-shadow: 0 0 50px rgba(255, 0, 110, 0.8), 0 0 100px rgba(255, 0, 110, 0.4); }
}
@keyframes pulse-cyan {
    0%, 100% { box-shadow: 0 0 40px rgba(0, 200, 255, 0.6), 0 0 80px rgba(0, 200, 255, 0.3); }
    50% { box-shadow: 0 0 50px rgba(0, 200, 255, 0.8), 0 0 100px rgba(0, 200, 255, 0.4); }
}
@keyframes pulse-yellow {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 190, 11, 0.6), 0 0 80px rgba(255, 190, 11, 0.3); }
    50% { box-shadow: 0 0 50px rgba(255, 190, 11, 0.8), 0 0 100px rgba(255, 190, 11, 0.4); }
}
@keyframes pulse-orange {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 109, 0, 0.6), 0 0 80px rgba(255, 109, 0, 0.3); }
    50% { box-shadow: 0 0 50px rgba(255, 109, 0, 0.8), 0 0 100px rgba(255, 109, 0, 0.4); }
}
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.6), 0 0 80px rgba(0, 255, 136, 0.3); }
    50% { box-shadow: 0 0 50px rgba(0, 255, 136, 0.8), 0 0 100px rgba(0, 255, 136, 0.4); }
}

/* Now playing bar */
#now-playing {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.98), rgba(10, 10, 15, 0.9));
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

#now-playing.visible {
    transform: translateY(0);
}

#now-playing .track-name {
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
}

/* Player number input */
#player-input-wrap {
    display: none;
    align-items: center;
    gap: 6px;
}

#player-input-wrap.visible {
    display: flex;
}

#player-input-wrap label {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: #ff006e;
    text-shadow: 0 0 10px rgba(255, 0, 110, 0.5);
}

#playerNumber {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 900;
    width: 70px;
    height: 40px;
    text-align: center;
    background: rgba(255, 0, 110, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 0, 110, 0.4);
    border-radius: 10px;
    outline: none;
    -moz-appearance: textfield;
}

#playerNumber::-webkit-outer-spin-button,
#playerNumber::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#playerNumber:focus {
    border-color: #ff006e;
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
}

/* Control buttons in now-playing */
#stopButton, #skipButton {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: white;
    height: 40px;
    padding: 0 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

#stopButton {
    background: linear-gradient(145deg, #d32f2f, #b71c1c);
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.3);
}

#stopButton:hover {
    background: linear-gradient(145deg, #e53935, #c62828);
    box-shadow: 0 0 30px rgba(211, 47, 47, 0.5);
}

#skipButton {
    background: linear-gradient(145deg, #444, #333);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

#skipButton:hover {
    background: linear-gradient(145deg, #555, #444);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Fullscreen button */
#fullscreenButton {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    width: auto;
    height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 999;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

#fullscreenButton:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

audio {
    display: none;
}

/* Mobile */
@media screen and (max-width: 768px) {
    .pad-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    button.pad-goal {
        grid-column: 1 / -1;
        height: 120px;
    }

    .pad-label {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .pad-next {
        font-size: 9px;
    }

    #header h1 {
        font-size: 24px;
        letter-spacing: 4px;
    }
}
