/* ===== CSS Variables (Light Theme) ===== */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #212529;
    --header-background: rgba(255, 255, 255, 0.9);
    --footer-background: #e9ecef;
    --sidebar-background: #fff;
    --sidebar-text: #212529;
    --sidebar-hover: #f1f1f1;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --card-bg: #222;
    --hero-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --pp-h: 0px; /* persistent player bar height — set by JS when player is visible */
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
    --primary-color: #58a6ff;
    --secondary-color: #8b949e;
    --background-color: #0d1117;
    --text-color: #c9d1d9;
    --header-background: rgba(13, 17, 23, 0.85);
    --footer-background: #161b22;
    --sidebar-background: #161b22;
    --sidebar-text: #c9d1d9;
    --sidebar-hover: #30363d;
    --border-color: #30363d;
    --shadow: 0 2px 4px rgba(0,0,0,0.3);
    --card-bg: #161b22;
    --hero-bg: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1a2332 100%);
}

/* ===== Base ===== */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Jura', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: background-color 0.3s, color 0.3s;
    padding-top: calc(60px + var(--pp-h));
    padding-bottom: 0;
}

a { color: var(--primary-color); }
a:hover { color: var(--primary-color); filter: brightness(1.2); }

/* ===== Header / Topbar ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--header-background);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0;
    z-index: 1030;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

/* Header left: toggle + logo — natural width, sidebar overlays independently */
.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-left: 12px;
    width: auto;
}

/* Header center: search + nav links (aligned with main content) */
.header-center {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 0 16px 0 12px;
    max-width: 1600px;
}

/* Sidebar Toggle - Animated Hamburger */
.sidebar-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1031;
    flex-shrink: 0;
}
.sidebar-toggle:focus { outline: none; }
.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
.sidebar-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.sidebar-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.sidebar-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Logo / Brand */
.site-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: 25px;
}
.site-brand img {
    height: 36px;
    width: auto;
}
/* Mobile: show square app icon only */
.logo-icon { display: none; }
@media (max-width: 767px) {
    .logo-full { display: none; }
    .logo-icon { display: block; height: 30px; width: 30px; border-radius: 6px; }
}

/* Persistent player inner — responsive max-width */
.player-inner {
    max-width: 1550px;
    margin: 0 auto;
    padding: 0 10px;
    color: var(--text-color);
}
@media (max-width: 767px) {
    .player-inner {
        max-width: 100%;
        padding: 0;
    }
}

/* Search Bar */
.search-bar {
    flex: 0 1 480px;
    margin: 0 0 0 auto;
    min-width: 120px;
    order: 1;
}
.search-bar input {
    width: 100%;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 0.9rem;
}
.search-bar input::placeholder { color: var(--secondary-color); opacity: 1; }
[data-theme="dark"] .search-bar input {
    background-color: #1c2128;
    color: #e6edf3;
}
[data-theme="dark"] .search-bar input::placeholder { color: #8b949e; }
.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}
.search-shell {
    position: relative;
}
.search-bar input {
    padding-right: 2.6rem;
}
.search-submit {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--text-color);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-submit:hover {
    background: rgba(128, 128, 128, 0.2);
}

/* Search Suggest Dropdown */
.search-suggest-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--sidebar-background);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
    overflow: hidden;
    z-index: 1250;
}
.search-suggest-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .8rem;
    color: var(--text-color);
    text-decoration: none;
    border-top: 1px solid var(--border-color);
}
.search-suggest-item:first-child {
    border-top: 0;
}
.search-suggest-item img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 34px;
    background: rgba(128, 128, 128, 0.15);
}
/* 16:9 TV thumbnail in suggest dropdown */
.search-suggest-item img.ssi-img-tv {
    width: 60px;
    height: 34px;
    border-radius: 6px;
    flex: 0 0 60px;
}
/* Type badge (Radio / Live TV / Podcast) */
.ssi-badge {
    flex-shrink: 0;
    font-size: .58rem;
    font-weight: 700;
    padding: .15rem .42rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-left: auto;
    white-space: nowrap;
}
.ssi-badge-radio    { background: rgba(0,123,255,.18);   color: #58a6ff; }
.ssi-badge-live_tv  { background: rgba(242,191,76,.2);   color: #ffd57a; }
.ssi-badge-podcast  { background: rgba(255,255,255,.14);  color: #fff;    }
.search-suggest-content {
    min-width: 0;
}
.search-suggest-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-suggest-item small {
    color: var(--secondary-color);
    display: block;
    margin-top: .15rem;
}
.search-suggest-item:hover {
    background: var(--sidebar-hover);
    color: var(--text-color);
}

/* Theme Switcher (in sidebar) */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
}
.theme-switcher button {
    background: transparent;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.theme-switcher button:hover,
.theme-switcher button.active {
    color: var(--primary-color);
    background: var(--sidebar-hover);
}

/* Topbar navigation links */
.top-main-links {
    list-style: none;
    display: none;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0 0 0 12px;
    flex-shrink: 0;
    order: 2;
}
.top-main-links .nav-link {
    color: var(--text-color);
    font-size: 0.85rem;
    padding: 6px 10px;
    white-space: nowrap;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}
.top-main-links .nav-link:hover,
.top-main-links .nav-link.active {
    background: var(--primary-color);
    color: #fff;
}
@media (min-width: 992px) {
    .top-main-links {
        display: flex;
    }
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 250px;
    height: calc(100vh - 60px);
    background-color: var(--sidebar-background);
    border-right: 1px solid var(--border-color);
    padding: 12px 0;
    padding-bottom: 90px;
    transform: translateX(-100%);
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 1026;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Mobile: sidebar starts below the player bar so the player stays visible */
@media (max-width: 767px) {
    .sidebar {
        top: calc(60px + var(--pp-h));
        height: calc(100vh - 60px - var(--pp-h));
    }
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-nav-main {
    flex-grow: 0;
}

.sidebar-nav-bottom {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    padding-bottom: 1.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-link:hover {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-text);
    text-decoration: none;
}
.sidebar-link.active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: var(--sidebar-hover);
}
.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary-color);
    padding: 16px 20px 4px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1010;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile/tablet (<1080px): sidebar overlays content as drawer */
@media (max-width: 1079px) {
    .sidebar {
        z-index: 1030;
    }
}

/* Auto-rail (1080px–1749px): icon-only rail by default, expands on click */
@media (min-width: 1080px) and (max-width: 1749px) {
    .sidebar {
        transform: translateX(0);
        width: 60px;
        transition: width 0.3s ease;
    }
    .sidebar .sidebar-link {
        justify-content: center;
        padding: 12px 0;
        gap: 0;
        font-size: 0;
        color: transparent;
    }
    .sidebar .sidebar-link i {
        font-size: 1.35rem;
        width: auto;
        color: var(--sidebar-text);
    }
    .sidebar .sidebar-link.active i {
        color: var(--primary-color);
    }
    .sidebar .sidebar-heading {
        display: none;
    }
    .sidebar .sidebar-nav-bottom {
        border-top: 1px solid var(--border-color);
        padding-top: 8px;
    }
    .sidebar .theme-switcher {
        flex-direction: column;
        padding: 8px 4px;
        align-items: center;
    }
    /* Overlay hidden by default; JS adds .active when rail is expanded */
    .sidebar-overlay {
        display: none;
    }

    /* Expanded state: full-width sidebar overlays content */
    .sidebar.rail-expanded {
        width: 250px;
        z-index: 1030;
    }
    .sidebar.rail-expanded .sidebar-link {
        justify-content: flex-start;
        padding: 10px 20px;
        gap: 10px;
        font-size: 0.9rem;
        color: var(--sidebar-text);
    }
    .sidebar.rail-expanded .sidebar-link i {
        font-size: 1.1rem;
        width: 20px;
    }
    .sidebar.rail-expanded .sidebar-link.active i {
        color: var(--primary-color);
    }
    .sidebar.rail-expanded .sidebar-heading {
        display: block;
    }
    .sidebar.rail-expanded .sidebar-nav-bottom {
        padding-top: 8px;
    }
    .sidebar.rail-expanded .theme-switcher {
        flex-direction: row;
        padding: 6px 12px;
        align-items: center;
    }
}

/* Desktop (≥1750px): full sidebar with optional collapse toggle */
@media (min-width: 1750px) {
    .sidebar {
        transform: translateX(0);
    }
    .sidebar-overlay {
        display: none !important;
    }

    /* Collapsed rail state (user-toggled) */
    .sidebar.collapsed {
        width: 60px;
    }
    .sidebar.collapsed .sidebar-link {
        justify-content: center;
        padding: 12px 0;
        gap: 0;
        font-size: 0;
        color: transparent;
    }
    .sidebar.collapsed .sidebar-link i {
        font-size: 1.35rem;
        width: auto;
        color: var(--sidebar-text);
    }
    .sidebar.collapsed .sidebar-link.active i {
        color: var(--primary-color);
    }
    .sidebar.collapsed .sidebar-heading {
        display: none;
    }
    .sidebar.collapsed .sidebar-nav-bottom {
        border-top: 1px solid var(--border-color);
        padding-top: 8px;
    }
    .sidebar.collapsed .theme-switcher {
        flex-direction: column;
        padding: 8px 4px;
        align-items: center;
    }
}

/* ===== Main Content ===== */
.content {
    min-height: calc(100vh - 120px);
    transition: transform 0.3s ease;
}
.content > .container-fluid,
.content > .container {
    max-width: 1600px;
}

/* ===== Footer (scrollable, in-flow) ===== */
.site-footer {
    background-color: var(--footer-background);
    border-top: 1px solid var(--border-color);
    padding: 24px 20px;
    padding-bottom: 80px; /* space above fixed player */
    color: var(--secondary-color);
    font-size: 0.85rem;
}
.site-footer a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
}
.site-footer a:hover {
    text-decoration: underline;
    filter: none;
}

@media (max-width: 767px) {
    .site-footer {
        padding-bottom: 54px; /* mobile player = 50px */
    }
}

@media (min-width: 1081px) {
    .site-footer {
        margin-left: 250px;
        transition: margin-left 0.3s ease;
    }
}

/* ===== Persistent Player (fixed bottom, inline styles handle positioning) ===== */
#persistentPlayer {
    transition: bottom 0.5s ease-in-out;
}

/* ===== Hero Section (Start Page) ===== */
.hero-section {
    background: var(--hero-bg);
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 0;
    margin: 0;
}
.hero-section h1 {
    font-family: 'Exo', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.hero-section p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-section .btn-hero {
    display: inline-block;
    padding: 12px 32px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.hero-section .btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.4);
    filter: none;
}

/* ===== Section Blocks ===== */
.section-block {
    margin-bottom: 3rem;
}
.section-block h3 {
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
}
.section-block .more-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-decoration: none;
}
.section-block .more-link:hover {
    text-decoration: underline;
}

/* Home section variant */
.home-section {
    margin-bottom: 2.5rem;
    padding: 0 12px;
}
.home-section h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.home-section .more-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
}
.home-section .more-link:hover {
    text-decoration: underline;
}

/* ===== Large Cards (180x180) ===== */
.card-large-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.card-large {
    width: 180px;
    height: 180px;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: var(--card-bg);
    transition: transform 0.2s;
    flex: 0 0 auto;
    box-shadow: 0 3px 4px 1px rgba(28, 31, 58, 0.77);
}
.card-large:hover {
    transform: scale(1.05);
}
.card-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-large .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s;
    width: 40px;
    height: 40px;
}
.card-large:hover .play-overlay {
    opacity: 1;
}
.card-large .play-overlay img {
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.card-large .card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.77);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px;
    text-align: left;
}
.card-large h5 {
    font-size: 0.8rem;
    margin: 0;
}

/* ===== TV Wide Cards (16:9 landscape) ===== */
.card-tv-wide {
    width: 280px;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: #111;
    flex: 0 0 auto;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}
.card-tv-wide:hover { transform: scale(1.03); }
.card-tv-wide img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.card-tv-wide .play-overlay {
    position: absolute; top:50%; left:50%;
    transform: translate(-50%,-50%);
    opacity: 0; transition: opacity 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.card-tv-wide:hover .play-overlay { opacity: 1; }
.card-tv-wide .card-info {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.77); color:#fff;
    font-size: .75rem; padding: 4px 6px;
}
.card-tv-wide h5 { font-size:.8rem; margin:0; }
@media (max-width:767px) { .card-tv-wide { width: 220px; } }

/* ===== TV home tile (16:9, homepage recently watched) ===== */
.home-tile.home-tile--tv {
    width: 213px;  /* 120px × 16/9 */
    height: 120px; /* same height as .home-tile */
}
@media (max-width:992px) { .home-tile.home-tile--tv { width: 178px; height: 100px; } }

/* ===== TV history card (16:9) ===== */
.history-card--tv {
    width: 280px;
    height: 158px;
}
@media (max-width:992px) { .history-card--tv { width: 220px; height: 124px; } }

/* ===== Square Cards (77x77) ===== */
.card-square-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.77rem;
}
.card-square {
    width: 77px;
    height: 77px;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: #333;
    flex: 0 0 auto;
    transition: transform 0.2s;
    box-shadow: 0 2px 3px 0.5px rgba(28, 31, 58, 0.77);
}
.card-square:hover {
    transform: scale(1.05);
}
.card-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-square .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    opacity: 0;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    transition: opacity 0.2s;
}
.card-square:hover .overlay {
    opacity: 1;
}
.card-square .overlay img {
    width: 24px;
    height: 24px;
    margin-top: 4px;
}

/* ===== Recent Cards (120x120) ===== */
.card-recent {
    width: 120px;
    height: 120px;
    position: relative;
    border-radius: 0;
    overflow: hidden;
    flex: 0 0 auto;
    box-shadow: 0 2px 3px 0.5px rgba(28, 31, 58, 0.77);
    transition: transform 0.2s;
}
.card-recent:hover {
    transform: scale(1.05);
}
.card-recent img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-recent .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    opacity: 0;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: opacity 0.2s;
}
.card-recent:hover .overlay {
    opacity: 1;
}
.card-recent .overlay img {
    width: 24px;
    height: 24px;
    margin-top: 4px;
}

.recent-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

/* ===== Station Card (generic) ===== */
.station-card {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

/* ===== Responsive: mobile horizontal scroll ===== */
@media (max-width: 992px) {
    .card-recent {
        width: 90px;
        height: 90px;
    }
    .recent-inline {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        padding: 1rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .recent-inline::-webkit-scrollbar {
        display: none;
    }
    .card-large-row,
    .card-square-row {
        overflow-x: auto;
        overflow-y: visible;
        flex-wrap: nowrap;
        padding: 1rem;
    }
    .card-large-row::-webkit-scrollbar,
    .card-square-row::-webkit-scrollbar {
        display: none;
    }
}

/* ===== Portal-specific styles ===== */
.portal-footer {
    background-color: var(--footer-background);
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 0.85rem;
}
.portal-footer a {
    color: var(--text-color);
    text-decoration: none;
}
.portal-footer a:hover {
    text-decoration: underline;
}

.layout-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* ===== Player animation on station page ===== */
@keyframes slideInUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ===== Recent section: Radio | TV two-column split ===== */
.recent-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}
@media (max-width: 768px) {
    .recent-split { grid-template-columns: 1fr; }
}
/* Grid cells must have min-width:0 so overflow-x:auto on .home-tiles-row works */
.recent-col {
    min-width: 0;
    overflow: hidden;
}
.recent-col-label {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: .4rem;
    padding-left: .1rem;
}

/* ===== Home Tiles (Recently Listened/Watched square tiles) ===== */
.home-tiles-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .75rem;
    padding-bottom: .5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.home-tiles-row::-webkit-scrollbar { display: none; }
.home-tile {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    position: relative;
    overflow: hidden;
    background: #111;
    box-shadow: 0 2px 6px rgba(0,0,0,0.45);
}
.home-tile a {
    display: block;
    width: 100%; height: 100%;
    text-decoration: none;
    position: relative;
}
.home-tile img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.htile-base {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.72);
    padding: .25rem .4rem;
    transition: transform 0.3s ease;
}
.htile-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.home-tile:hover .htile-hover { transform: translateY(0); }
.home-tile:hover .htile-base  { transform: translateY(100%); }
.htile-icon { font-size: 1.6rem; color: #fff; }
.htile-title {
    font-size: .68rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    padding: 0 .25rem;
}
.htile-badge {
    position: absolute;
    top: .3rem; right: .3rem;
    font-size: .6rem;
    padding: .15rem .35rem;
    border-radius: 999px;
    font-weight: 700;
    z-index: 2;
}
.htile-tv    { background: rgba(220,40,40,.85); color: #fff; }
.htile-radio { background: rgba(0,123,255,.7);  color: #fff; }
@media (max-width: 992px) {
    .home-tile { width: 100px; height: 100px; }
}

/* ===== Genre CTA Grid ===== */
.genre-cta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    padding: 0 12px;
    margin-bottom: 2.5rem;
}
@media (max-width: 767px) { .genre-cta-grid { grid-template-columns: repeat(2, 1fr); } }
.genre-cta {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: transform 0.2s, filter 0.2s;
    position: relative;
    overflow: hidden;
}
.genre-cta:hover { transform: translateY(-3px); filter: brightness(1.12); color: #fff; }
.genre-cta i { font-size: 1.7rem; flex-shrink: 0; }
.genre-cta strong { display: block; font-size: 1rem; }
.genre-cta small  { display: block; font-size: .74rem; opacity: .85; font-weight: 400; }
.music-cta  { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%); border: 1px solid rgba(100,149,237,.3); }
.news-cta   { background: linear-gradient(135deg, #1a0a0a 0%, #2d1010 60%, #7b1818 100%); border: 1px solid rgba(220,53,69,.35); }
.talk-cta   { background: linear-gradient(135deg, #0a1a0a 0%, #102d10 60%, #1a5c2e 100%); border: 1px solid rgba(40,167,69,.3); }
.oldies-cta { background: linear-gradient(135deg, #1a140a 0%, #2d200f 60%, #7b4a00 100%); border: 1px solid rgba(255,165,0,.3); }

/* ===== News Banner ===== */
.news-banner {
    margin: 0 12px 2.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a0505 0%, #2a0808 40%, #7b0000 100%);
    border: 1px solid rgba(220,53,69,.4);
    overflow: hidden;
}
.news-banner-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    flex-wrap: wrap;
}
.nb-live {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: rgba(220,53,69,0.9);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .3rem .65rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    animation: pulse-live 2s infinite;
}
@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.65; }
}
.nb-text { flex: 1; color: #fff; min-width: 160px; }
.nb-text strong { display: block; font-size: 1.05rem; }
.nb-text span   { display: block; font-size: .84rem; opacity: .8; }
.nb-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.2rem;
    border-radius: 999px;
    background: rgba(220,53,69,.85);
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}
.nb-btn:hover { background: rgba(220,53,69,1); color: #fff; }

/* ===== Oldies Banner ===== */
.oldies-banner {
    margin: 0 12px 2.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a0f00 0%, #2d1e00 60%, #7b4a00 100%);
    border: 1px solid rgba(255,165,0,.35);
    padding: 1.1rem 1.4rem;
}
.oldies-banner-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.oldies-banner-inner i  { font-size: 1.8rem; flex-shrink: 0; color: #ffa500; }
.oldies-banner-inner strong { display: block; font-size: 1.05rem; }
.oldies-banner-inner span   { display: block; font-size: .84rem; opacity: .8; }
.oldies-banner-inner > div { flex: 1; }

/* ===== TV card live pill ===== */
.tv-live-pill {
    position: absolute;
    top: .5rem; left: .5rem;
    background: rgba(220,40,40,.9);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    padding: .18rem .5rem;
    border-radius: 999px;
    z-index: 2;
    letter-spacing: .04em;
}

/* ===== Hero dual-CTA ===== */
.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-hero-tv {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.7);
}
.btn-hero-tv:hover {
    background: rgba(255,255,255,0.15);
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

/* ===== Placeholder / Coming soon ===== */
.coming-soon {
    padding: 2rem;
    text-align: center;
    color: var(--secondary-color);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    margin: 1rem 0;
}
