/* =============================================
   Radio Portal - Style
   ============================================= */

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

:root {
    --bg: #0f1117;
    --bg2: #1a1d27;
    --bg3: #22263a;
    --accent: #6c63ff;
    --accent2: #a78bfa;
    --green: #22c55e;
    --red: #ef4444;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #2d3148;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ---- Header ---- */
.site-header {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
}
.header-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-title { font-size: 1.2rem; font-weight: 700; color: var(--accent2); }
.user-info { font-size: 0.85rem; color: var(--text-muted); }
.user-info a { color: var(--accent2); text-decoration: none; }
.user-info a:hover { text-decoration: underline; }
/* ---- PLAYER ---- */
.player-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 24px;
    margin-top: 16px;
}
.play-btn {
    padding: 10px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.play-btn:hover { background: #5a52d5; }
.player-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex: 1;
}
.volume-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.volume-wrap input[type=range] { width: 90px; cursor: pointer; }

/* ---- Container ---- */
.container {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 16px;
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
}
.tab-btn:hover { border-color: var(--accent); color: var(--text); }
.tab-btn.active { border-color: var(--accent); color: var(--text); background: var(--bg3); }
.tab-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 6px;
}

/* ---- Station panel ---- */
.station-panel { display: none; }
.station-panel.active { display: block; }

/* ---- Now Playing Card ---- */
.now-playing-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loading-spinner {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 0;
}

.no-track {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 0;
    font-size: 1.1rem;
}

.track-type {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    width: fit-content;
}
.type-song { background: #1e3a5f; color: #60a5fa; }
.type-spot { background: #3b1f1f; color: #f87171; }

.track-artist {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}
.track-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}
.track-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---- Vote buttons ---- */
.vote-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.btn-like, .btn-dislike {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-like {
    background: var(--green);
    color: #fff;
}
.btn-like:hover { background: #16a34a; transform: scale(1.02); }
.btn-dislike {
    background: var(--red);
    color: #fff;
}
.btn-dislike:hover { background: #dc2626; transform: scale(1.02); }

.voted {
    margin-top: 16px;
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
}
.voted-like { background: #14532d; color: #86efac; }
.voted-dislike { background: #450a0a; color: #fca5a5; }

/* ---- Dislike modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-box {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow);
}
.modal-box h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text);
}
.dislike-reasons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}
.reason-btn {
    padding: 14px 18px;
    background: var(--bg3);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    font-size: 0.95rem;
    text-align: left;
    transition: all 0.15s;
}
.reason-btn:hover { border-color: var(--red); background: #3b1f1f; }
.btn-cancel {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.btn-cancel:hover { color: var(--text); border-color: var(--text-muted); }

/* ---- Auth pages ---- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}
.auth-box {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}
.auth-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent2);
    text-align: center;
    margin-bottom: 8px;
}
.auth-box h2 {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 24px;
    color: var(--text);
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s;
}
.form-group input:focus { border-color: var(--accent); }

.btn { display: inline-block; padding: 11px 20px; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.btn-primary { background: var(--accent); color: #fff; width: 100%; margin-top: 8px; }
.btn-primary:hover { background: #5a52d5; }

.auth-link { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-muted); }
.auth-link a { color: var(--accent2); text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

.alert { padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: #450a0a; color: #fca5a5; border: 1px solid #7f1d1d; }
.alert-success { background: #14532d; color: #86efac; border: 1px solid #166534; }
