/* ============================================================
   FM Baires - Main Stylesheet (Modern Redesign)
   Radio directory with responsive grid, golden featured cards,
   player modal and animated equalizer.
   ============================================================ */

:root {
    --color-bg: #0b0d14;
    --color-bg-alt: #12151f;
    --color-card: #1a1f2e;
    --color-card-hover: #222838;
    --color-text: #eef1f8;
    --color-text-muted: #9aa3b8;
    --color-primary: #f5c518;
    --color-gold: #d4af37;
    --color-gold-light: #f5d76e;
    --color-gold-dark: #b8860b;
    --color-danger: #e74c3c;
    --color-success: #2ecc71;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    --gold-glow: 0 0 22px rgba(212, 175, 55, 0.4);
    --grad-gold: linear-gradient(135deg, var(--color-gold-light), var(--color-gold-dark));
    --header-h: 64px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: rgba(18, 21, 31, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: var(--header-h);
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.brand-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 6px rgba(212, 175, 55, 0.4));
}

.brand-text {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav a {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--grad-gold);
    border-radius: 2px;
    transition: width var(--transition);
}

.main-nav a:hover {
    color: var(--color-text);
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav .nav-admin {
    background: rgba(212, 175, 55, 0.12);
    color: var(--color-gold-light);
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.main-nav .nav-admin::after {
    display: none;
}

.main-nav .nav-admin:hover {
    background: rgba(212, 175, 55, 0.22);
    color: var(--color-gold-light);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   AD BANNERS
   ============================================================ */
.ad-banner {
    position: relative;
    background: var(--color-bg-alt);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
}

.ad-label {
    position: absolute;
    top: 4px;
    left: 8px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    opacity: 0.7;
    z-index: 2;
    background: rgba(15, 17, 23, 0.6);
    padding: 1px 6px;
    border-radius: 4px;
}

.ad-placeholder {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    opacity: 0.6;
    text-align: center;
}

.ad-link {
    display: block;
    width: 100%;
    height: 100%;
}

.ad-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ad-media-img {
    object-fit: contain;
}

.ad-media-video {
    object-fit: cover;
}

.ad-banner-header {
    max-width: 1200px;
    height: 90px;
    margin: 10px auto 0;
}

.ad-banner-side {
    max-width: 300px;
    height: 250px;
    margin: 30px auto;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding: 56px 0 32px;
    text-align: center;
    background:
        radial-gradient(ellipse at top, rgba(212, 175, 55, 0.12), transparent 55%),
        radial-gradient(ellipse at 20% 80%, rgba(245, 199, 24, 0.05), transparent 50%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(212, 175, 55, 0.15), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(46, 204, 113, 0.12);
    color: var(--color-success);
    border: 1px solid rgba(46, 204, 113, 0.3);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    animation: pulse-dot 1.6s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    margin-bottom: 14px;
    letter-spacing: -0.03em;
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--color-text-muted);
    max-width: 620px;
    margin: 0 auto 24px;
    font-size: 1.08rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(26, 31, 46, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 24px;
    border-radius: 30px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    box-shadow: var(--shadow);
}

.stat strong {
    color: var(--color-gold-light);
    font-size: 1.15rem;
    margin-right: 4px;
}

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-heading {
    text-align: center;
    margin: 28px 0 28px;
}

.section-heading h2 {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.section-heading p {
    color: var(--color-text-muted);
}

/* ============================================================
   RADIO GRID
   ============================================================ */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
}

.radio-card {
    position: relative;
    background: var(--color-card);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
    color: var(--color-text);
    font-family: inherit;
    text-align: center;
    overflow: hidden;
}

.radio-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(212, 175, 55, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.radio-card:hover {
    transform: translateY(-6px);
    background: var(--color-card-hover);
    box-shadow: var(--shadow);
    border-color: rgba(212, 175, 55, 0.35);
}

.radio-card:hover::before {
    opacity: 1;
}

.radio-logo {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition);
}

.radio-card:hover .radio-logo {
    transform: scale(1.05);
}

.radio-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.radio-play-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.6rem;
    opacity: 0;
    transition: opacity var(--transition);
}

.radio-card:hover .radio-play-hint {
    opacity: 1;
}

.radio-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   FEATURED (GOLDEN BORDER) STYLES
   ============================================================ */
.radio-card.featured {
    border: 2px solid var(--color-gold);
    background: linear-gradient(145deg, #2a2413, #1a1f2e);
    box-shadow: var(--gold-glow);
}

.radio-card.featured:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    border-color: var(--color-gold-light);
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--grad-gold);
    color: #1a1405;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.5);
    letter-spacing: 0.3px;
    z-index: 2;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    background: var(--color-card);
    border-radius: var(--radius);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
    background: var(--color-bg-alt);
    padding: 56px 0;
    margin-top: 48px;
}

.contact-form {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

.form-group input,
.form-group textarea {
    background: var(--color-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-status {
    text-align: center;
    font-weight: 600;
    min-height: 24px;
}

.form-status.success { color: var(--color-success); }
.form-status.error { color: var(--color-danger); }

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-question {
    flex: 1;
    background: var(--color-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-gold);
    text-align: center;
    user-select: none;
}

.captcha-refresh {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: var(--color-card);
    color: var(--color-text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition);
}

.captcha-refresh:hover {
    border-color: var(--color-gold);
    transform: rotate(20deg);
}

.captcha-refresh:active {
    transform: rotate(180deg);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, background var(--transition), opacity 0.2s, box-shadow var(--transition);
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--grad-gold);
    color: #1a1405;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-bg-alt);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 32px 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-email {
    margin-top: 6px;
}

/* ============================================================
   PLAYER MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: linear-gradient(180deg, var(--color-bg-alt), #0e1119);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px 26px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 50%;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.modal-close:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(90deg);
}

.modal-content {
    text-align: center;
}

.modal-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(212, 175, 55, 0.25);
}

.modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.modal h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.modal-website {
    display: inline-block;
    color: var(--color-gold-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: opacity var(--transition);
}

.modal-website:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* Player */
.player {
    margin-bottom: 24px;
}

/* Animated equalizer */
.equalizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    height: 40px;
    margin: 0 auto 18px;
}

.eq-bar {
    width: 6px;
    height: 100%;
    border-radius: 3px;
    background: var(--grad-gold);
    transform-origin: bottom;
    animation: eq-bounce 1s ease-in-out infinite;
}

.equalizer .eq-bar:nth-child(1) { animation-delay: 0s; }
.equalizer .eq-bar:nth-child(2) { animation-delay: 0.15s; }
.equalizer .eq-bar:nth-child(3) { animation-delay: 0.3s; }
.equalizer .eq-bar:nth-child(4) { animation-delay: 0.45s; }
.equalizer .eq-bar:nth-child(5) { animation-delay: 0.6s; }

@keyframes eq-bounce {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

/* When paused, stop the equalizer */
.equalizer.paused .eq-bar {
    animation-play-state: paused;
    transform: scaleY(0.25);
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.btn-play {
    background: var(--grad-gold);
    color: #1a1405;
    border: none;
    border-radius: 30px;
    padding: 13px 34px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.2s, box-shadow var(--transition);
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35);
}

.btn-play:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.45);
}

.btn-play.playing {
    background: var(--color-card);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.btn-share {
    background: var(--color-card);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 13px 26px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, border-color var(--transition);
}

.btn-share:hover {
    transform: translateY(-1px);
    border-color: var(--color-gold);
}

.player audio {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 10px;
}

.player-status {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    min-height: 20px;
    font-weight: 500;
}

.player-status.playing { color: var(--color-success); }
.player-status.error { color: var(--color-danger); }


/* ============================================================
   STICKY MOBILE MINI PLAYER
   ============================================================ */
.mini-player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: rgba(18, 21, 31, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mini-player.show {
    transform: translateY(0);
}

.mini-player-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-player-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.mini-player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mini-player-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player-status {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.mini-player-status.playing {
    color: var(--color-success);
}

.mini-player-eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
}

.mini-player-eq .eq-bar {
    width: 4px;
    height: 100%;
    animation: eq-bounce 0.9s ease-in-out infinite;
}

.mini-player-eq .eq-bar:nth-child(1) { animation-delay: 0s; }
.mini-player-eq .eq-bar:nth-child(2) { animation-delay: 0.2s; }
.mini-player-eq .eq-bar:nth-child(3) { animation-delay: 0.4s; }

.mini-player-eq.paused .eq-bar {
    animation-play-state: paused;
    transform: scaleY(0.25);
}

.mini-player-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--grad-gold);
    color: #1a1405;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
    transition: transform 0.15s;
}

.mini-player-toggle:hover {
    transform: scale(1.05);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: rgba(18, 21, 31, 0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 12px 20px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        transform: translateY(-120%);
        opacity: 0;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
        box-shadow: var(--shadow-lg);
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
    }

    .main-nav a {
        padding: 12px 14px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .main-nav a:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .main-nav a::after {
        display: none;
    }

    .main-nav .nav-admin {
        text-align: center;
        margin-top: 6px;
    }

    .radio-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 14px;
    }

    .radio-logo {
        width: 80px;
        height: 80px;
    }

    .hero {
        padding: 40px 0 24px;
    }

    .ad-banner-header {
        height: 70px;
    }

    /* Show mini player only on mobile, as a larger bottom sheet (~1/4 screen) */
    .mini-player {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 18px 20px;
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
        min-height: 25vh;
        border-radius: 24px 24px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mini-player-logo {
        width: 72px;
        height: 72px;
        border-radius: 16px;
        align-self: center;
    }

    .mini-player-logo img {
        padding: 6px;
    }

    .mini-player-info {
        align-items: center;
        text-align: center;
        gap: 4px;
    }

    .mini-player-name {
        font-size: 1.1rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .mini-player-status {
        font-size: 0.85rem;
    }

    .mini-player-eq {
        height: 26px;
        align-self: center;
    }

    .mini-player-eq .eq-bar {
        width: 5px;
    }

    .mini-player-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
    }

    .mini-player-toggle {
        width: 56px;
        height: 56px;
        font-size: 1.2rem;
    }


}

@media (max-width: 480px) {
    .radio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .radio-card {
        padding: 16px 10px;
    }

    .radio-logo {
        width: 72px;
        height: 72px;
    }

    .radio-name {
        font-size: 0.85rem;
    }

    .brand-text {
        font-size: 1.15rem;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .section-heading h2 {
        font-size: 1.5rem;
    }

    .ad-banner-header {
        height: 60px;
    }

    .ad-banner-side {
        height: 200px;
        max-width: 100%;
    }

    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    /* Mobile modal is much larger (fills nearly the whole screen) so the
       player controls are fully visible. */
    .modal {
        padding: 40px 22px 32px;
        max-height: 100vh;
        height: auto;
        max-width: 100%;
        border-radius: 28px 28px 0 0;
        border-bottom: none;
    }

    .modal-logo {
        width: 140px;
        height: 140px;
        border-radius: 26px;
        margin-bottom: 22px;
    }

    .modal h2 {
        font-size: 2rem;
    }

    .modal-website {
        font-size: 1.05rem;
        margin-bottom: 26px;
    }

    .equalizer {
        height: 52px;
        margin-bottom: 24px;
    }

    .eq-bar {
        width: 8px;
    }

    /* Player controls stack full-width on small screens */
    .player-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-play,
    .btn-share {
        width: 100%;
        padding: 18px 20px;
        font-size: 1.15rem;
    }

    .player audio {
        margin-bottom: 10px;
    }

}

@media (max-width: 360px) {
    .radio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .radio-logo {
        width: 62px;
        height: 62px;
    }

    .radio-name {
        font-size: 0.78rem;
    }

    .modal {
        padding: 34px 16px 28px;
    }

    .modal h2 {
        font-size: 1.7rem;
    }

    .modal-logo {
        width: 120px;
        height: 120px;
    }

    .btn-play,
    .btn-share {
        padding: 16px 18px;
        font-size: 1.05rem;
    }

}
