:root {
    --glass: rgba(255, 255, 255, 0.08);
    --border: #00ffaa;
    --text: #f0f0f0;
    --accent: #ffe4c4;
}

.theme-light {
    --glass: #00442d;
    --border: #FFD47F;
    --text: #1a1a1a;
    --accent: #ffe4c4;
}

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

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    background: #0a0a0a;
    color: var(--text);
    line-height: 1.4;
    overflow-x: hidden;
    transition: background 0.3s;
}

.theme-light body { background: #001b12; }

/* ── Header ── */
.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 92%;
    max-width: 420px;
}

.nav {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 32px -12px rgba(0,0,0,0.6);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
    color: #00ffaa;
}

.theme-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: inherit;
    padding: 8px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.theme-btn:hover { background: var(--glass); }

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 80px;
}

.hero-content {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.main-title {
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(90deg, #00ffaa, #FFD47F, #00ffaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

/* ── Typewriter ── */
.typewriter-box {
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 4px auto;
    overflow: visible;
}

.typewriter-text {
    white-space: nowrap;
    font-size: clamp(1.3rem, 5vw, 6rem);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: linear-gradient(90deg, #FFD47F, #00ffaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cursor {
    display: inline-block;
    width: 6px;
    height: 1.1em;
    background: var(--accent);
    vertical-align: middle;
    animation: blink 0.8s infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ════════════════════════════
   RADIO PLAYER
════════════════════════════ */
.radio-player {
    max-width: 480px;
    margin: 0 auto 50px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px 28px;
    box-shadow: 0 0 50px -10px rgba(0,255,170,0.12);
}

/* Header row */
.radio-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.radio-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #444;
    flex-shrink: 0;
    transition: background 0.3s, box-shadow 0.3s;
}

.radio-live-dot.active {
    background: #ff3b3b;
    box-shadow: 0 0 8px rgba(255,59,59,0.9);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%,100% { box-shadow: 0 0 8px rgba(255,59,59,0.9); }
    50%      { box-shadow: 0 0 20px rgba(255,59,59,0.3); }
}

.radio-live-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #ff3b3b;
}

.radio-station-name {
    margin-left: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: #FFD47F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Visualizer */
.radio-visualizer {
    width: 100%;
    height: 56px;
    margin-bottom: 14px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
}

#vizCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Seek bar ── */
.seek-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.time-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text);
    opacity: 0.6;
    white-space: nowrap;
    min-width: 36px;
    font-variant-numeric: tabular-nums;
}

/* Seek range input */
.seek-range {
    -webkit-appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 2px;
    /* фон заполнения задаётся через JS через background */
    background: rgba(255,255,255,0.15);
    outline: none;
    cursor: pointer;
    transition: height 0.15s;
}
.seek-range:hover { height: 6px; }

.seek-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ffaa, #FFD47F);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0,255,170,0.5);
    transition: transform 0.15s;
}
.seek-range::-webkit-slider-thumb:hover { transform: scale(1.3); }

/* ── Controls ── */
.radio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 20px;
}

.radio-play-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #00ffaa, #FFD47F);
    color: #000;
    font-size: 1.35rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.radio-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 28px rgba(0,255,170,0.45);
}
.radio-play-btn:active { transform: scale(0.94); }

.radio-skip {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s, background 0.2s;
}
.radio-skip:hover { opacity: 1; background: var(--glass); }

.radio-vol {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: 4px;
}
.vol-icon { font-size: 0.95rem; }

.vol-range {
    -webkit-appearance: none;
    width: 76px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.18);
    outline: none;
    cursor: pointer;
}
.vol-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ffaa, #FFD47F);
    cursor: pointer;
}

/* ── Station list ── */
.station-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.station-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    width: 100%;
    letter-spacing: 0.04em;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.station-item:hover {
    background: rgba(0,255,170,0.07);
    border-color: var(--border);
}
.station-item.active {
    background: rgba(0,255,170,0.1);
    border-color: var(--border);
    color: #00ffaa;
}

.station-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.station-item.active .station-dot {
    opacity: 1;
    background: #00ffaa;
    box-shadow: 0 0 6px rgba(0,255,170,0.8);
    animation: pulse-dot 1.5s infinite;
}

/* ════════════════════════════
   CRYPTO / CONTACT
════════════════════════════ */
.donate-mini {
    max-width: 420px;
    margin: 60px auto 40px;
    text-align: center;
}

.donate-label {
    font-size: 1.8rem;
    opacity: 0.8;
    margin-bottom: 16px;
    font-weight: 500;
    color: #FFD47F;
}

.crypto-buttons { display: flex; gap: 14px; justify-content: center; }

.crypto-btn {
    flex: 1;
    max-width: 180px;
    padding: 18px 24px;
    font-size: 1.35rem;
    font-weight: 700;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.crypto-btn.xmr { background: linear-gradient(90deg,#FFD47F,#00FFAA); color:#000; }
.crypto-btn.btc { background: linear-gradient(90deg,#00FFAA,#FFD47F); color:#000; }
.crypto-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 30px -10px rgba(0,255,170,0.4);
}
.crypto-btn:active { transform: scale(0.96); }
.crypto-btn::before {
    content: '';
    position: absolute;
    top: -50%; left: -100%;
    width: 50%; height: 200%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.7), transparent);
    transition: 0.7s;
}
.crypto-btn:hover::before { left: 200%; }

.contact {
    max-width: 520px;
    margin: 30px auto;
    padding: 16px 24px;
    background: var(--glass);
    border-radius: 9999px;
    border: 1px solid var(--border);
    font-size: 1rem;
    text-align: center;
}
.contact a {
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
}
.contact a:hover {
    color: var(--accent);
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(255,228,196,0.5);
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .typewriter-box { min-height: 90px; }
    .radio-player { padding: 18px 14px; }
    .vol-range { width: 52px; }
    .time-label { font-size: 0.65rem; min-width: 30px; }
}
