/*
 * Punjab Rocks Radio — main stylesheet
 * All styling lives in this external file (nothing inline in the markup)
 * so the page can run under a strict Content-Security-Policy with no
 * 'unsafe-inline' on style-src.
 */

:root {
    /* Surfaces — light gunmetal gradient */
    --bg-start: #4b565f;
    --bg-end: #6c7883;
    --panel-bg: #414b53;
    --panel-bg-alt: #4d5860;
    --modal-bg: #414b53;

    /* Borders */
    --border: #6c7883;
    --border-strong: #8a97a1;

    /* Brand accent — warm gold-to-crimson-to-maroon, kept for contrast against gunmetal */
    --accent-gold: #ffbe4d;
    --accent-crimson: #f0523d;
    --accent-maroon: #a3311f;
    --accent-gradient: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-crimson) 55%, var(--accent-maroon) 100%);

    /* Typography */
    --text-primary: #f5f6f7;
    --text-secondary: #d3d9dd;
    --text-muted: #a8b1b8;

    /* Status */
    --live-color: #ff5c5c;
    --focus-ring: #ffbe4d;

    /* White glow used around the main content boxes */
    --box-glow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 22px rgba(255, 255, 255, 0.22);
}

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background: linear-gradient(160deg, var(--bg-start) 0%, var(--bg-end) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.app-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    padding: 20px 28px;
    border-radius: 16px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--box-glow);
}

.logo-box {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.6px;
    white-space: nowrap;
    text-transform: uppercase;
}

.logo-text {
    color: var(--accent-gold);
}

.logo-text-accent {
    background: linear-gradient(135deg, var(--accent-crimson) 0%, var(--accent-maroon) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    margin-left: 4px;
}

.title {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Main workspace */
.main-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 20px;
    align-items: stretch;
}

.sidebar-menu {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 440px;
    overflow-y: auto;
    box-shadow: var(--box-glow);
}

.sidebar-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.menu-item {
    width: 100%;
    padding: 14px 16px;
    background: var(--panel-bg-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    text-align: left;
}

.menu-item:hover {
    background: #5a656e;
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.menu-item.active {
    background: rgba(255, 190, 77, 0.16);
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

.live-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--live-color);
    border-radius: 50%;
    display: none;
    box-shadow: 0 0 10px rgba(255, 92, 92, 0.7);
}

.menu-item.active .live-indicator {
    display: block;
    animation: pulse 1.6s infinite ease-in-out;
}

/* Player stage */
.player-stage-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--box-glow);
    width: 100%;
    display: flex;
}

.player-stage {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.stage-backdrop {
    position: absolute;
    inset: 0;
    background-color: #3a434b;
}

.station-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: transform 0.6s ease;
}

.player-stage:hover .station-image {
    transform: scale(1.02);
}

.stage-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(65, 75, 83, 0.95) 15%, rgba(65, 75, 83, 0.5) 65%, transparent 100%);
}

.player-interface {
    position: relative;
    z-index: 3;
    padding: 32px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.glass-player-wrapper {
    background: rgba(65, 75, 83, 0.88);
    border: 1px solid var(--border-strong);
    border-radius: 50px;
    padding: 10px 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.custom-player {
    display: flex;
    align-items: center;
}

.spotify-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, filter 0.15s ease;
    box-shadow: 0 6px 18px rgba(240, 82, 61, 0.45);
}

.spotify-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.marquee-container {
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    white-space: nowrap;
    background: rgba(65, 75, 83, 0.88);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 16s linear infinite;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Info cards */
.bottom-showcase { margin-top: 4px; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--box-glow);
}

.info-card h3 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-gold);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    letter-spacing: -0.1px;
}

.info-card ul { list-style: none; padding: 0; margin: 0; }
.info-card li { margin-bottom: 10px; }

.info-card a,
.link-button {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.15s ease;
}

.link-button {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
}

.info-card a:hover,
.link-button:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

.info-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    padding: 18px 28px;
    border-radius: 16px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer a {
    color: var(--text-secondary);
}

.footer a:hover {
    color: var(--accent-gold);
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* Responsive */
@media (max-width: 1024px) {
    .main-workspace { grid-template-columns: 1fr; }
    .sidebar-menu { height: 240px; }
    .player-stage { height: 340px; }
}

@media (max-width: 640px) {
    .app-container { padding: 16px 12px 32px; gap: 16px; }
    .header { flex-direction: column; align-items: flex-start; padding: 18px; }
    .player-stage { height: 300px; }
    .player-interface { padding: 20px; }
}

/* Legal document modal */
.ajax-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 13, 26, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 15px;
}

.ajax-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.ajax-modal-window {
    background: var(--modal-bg);
    border: 1px solid var(--border-strong);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 26px rgba(255, 255, 255, 0.18);
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.97);
    transition: transform 0.2s ease;
}

.ajax-modal-overlay.active .ajax-modal-window {
    transform: scale(1);
}

.ajax-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ajax-modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-gold);
}

.ajax-modal-close {
    background: var(--panel-bg-alt);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.ajax-modal-close:hover { background: #5a656e; }

.ajax-modal-body {
    padding: 24px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
}
