:root {
    --bg: #05070a;
    --panel: rgba(13, 17, 23, 0.4);
    --accent: #00f2ff;
    --text: #e6edf3;
    --shadow: 0 0 20px rgba(0, 242, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(40px);
    --font-title: 'Orbitron', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    transition: 0.5s ease;
    scroll-behavior: smooth;
}

/* Ambient Background */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #05070a 100%);
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 800px;
    height: 800px;
    background: var(--accent);
    filter: blur(180px);
    opacity: 0.08;
    border-radius: 50%;
    animation: move 25s infinite alternate;
}

.blob:nth-child(2) {
    bottom: -200px;
    right: -200px;
    background: #ff00ff;
    opacity: 0.05;
    animation-duration: 30s;
}

/* --- NAVBAR --- */
.nav-bar {
    width: 100%;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 7, 10, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-bar.scrolled {
    padding: 8px 40px;
    background: rgba(5, 7, 10, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-content-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.nav-logo {
    font-family: var(--font-title);
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-player-mini {
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 15px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-bar.scrolled .nav-player-mini {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.nav-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
}

.nav-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nav-info-title {
    font-family: var(--font-title);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

#miniVisualizer {
    width: 80px;
    height: 12px;
}

.nav-links {
    display: flex;
    gap: 25px;
    margin-left: 20px;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
    opacity: 0.6;
    letter-spacing: 1px;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
}

/* --- PLAYER CARD --- */
.hero-section {
    width: 100%;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    position: relative;
    z-index: 10;
}

.player-card {
    background: var(--panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), var(--shadow);
    position: relative;
    width: 100%;
    max-width: 500px;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    animation: heroFade 1s ease-out;
}

.player-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.logo-box {
    width: 200px;
    height: 200px;
    margin: 0 auto 35px;
    border-radius: 30px;
    overflow: hidden;
    background: #000;
    border: 3px solid var(--accent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
}

.logo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.radio-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.radio-slogan {
    font-size: 1.1rem;
    color: #8b949e;
    margin-bottom: 30px;
    font-weight: 300;
}

.play-trigger {
    width: 100px;
    height: 100px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 35px;
    cursor: pointer;
    font-size: 2.2rem;
    color: #000;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 35px rgba(11, 97, 102, 0.4);
    border: none;
}

.play-trigger:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 60px var(--accent);
}

.viz-switch-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.3s;
    z-index: 10;
}

.viz-switch-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent);
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.idle-toggle-btn {
    position: absolute;
    top: 25px;
    left: 25px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.3s;
    z-index: 10;
}

.idle-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent);
    transform: scale(1.1);
}

/* --- MUSIC REQUEST --- */
.request-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    font-size: 1.5rem;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.request-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent);
    transform: scale(1.1) rotate(-10deg);
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

/* Fix for SweetAlert being behind the modal */
.swal2-container {
    z-index: 3000 !important;
}

.modal-content {
    background: var(--panel);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    width: 100%;
    max-width: 500px;
    padding: 40px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.8), var(--shadow);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-family: var(--font-title);
    color: var(--accent);
    font-size: 1.3rem;
}

.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
}

.close-modal:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.search-box {
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 5px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    margin-bottom: 30px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    padding: 12px 25px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
}

.search-box button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #000;
    cursor: pointer;
    transition: 0.3s;
}

.search-box button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent);
}

.search-results {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
}

.search-results::-webkit-scrollbar {
    width: 5px;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.search-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--glass-border);
}

.item-name {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
}

.btn-request {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}

.btn-request:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent);
}

.searching, .no-results {
    text-align: center;
    padding: 40px;
    color: #8b949e;
    font-style: italic;
}

.hidden { display: none !important; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    letter-spacing: 2px;
}

.live-tag.offline {
    background: rgba(255, 0, 85, 0.1);
    color: #ff0055;
    border-color: rgba(255, 0, 85, 0.2);
}

/* --- CMS SECTIONS --- */
.content-area {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 100px;
    position: relative;
    z-index: 15;
    min-height: 400px;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 25px;
    width: 100%;
}

.content-section {
    background: rgba(13, 17, 23, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 35px;
    grid-column: span 6;
    transition: 0.4s ease;
    position: relative;
    overflow: hidden;
}

.content-section:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    background: rgba(13, 17, 23, 0.6);
}

.section-full { grid-column: span 12; }
.section-third { grid-column: span 4; }

.section-title {
    font-family: var(--font-title);
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.section-body {
    font-size: 1rem;
    color: #d1d5db;
    line-height: 1.8;
}

.section-body img {
    width: 100%;
    border-radius: 20px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}

.section-body img:hover { transform: scale(1.02); }

/* --- SOCIAL & REACTIONS --- */
.social-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--glass-border);
}

.social-bar a, .share-btn {
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: 0.3s;
    cursor: pointer;
}

.social-bar a:hover, .share-btn:hover {
    background: var(--accent);
    color: #000;
    transform: translateY(-5px);
}

.reactions-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.reaction-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--panel);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.reaction-btn:hover {
    transform: scale(1.2);
    border-color: var(--accent);
}

.reaction-count {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: var(--accent);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
}

/* --- VISUALIZER --- */
.visualizer-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.8) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.8) 100%);
}

#visualizerCanvas {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 8px var(--accent));
    opacity: 0.9;
}

/* --- FOOTER --- */
footer {
    width: 100%;
    padding: 60px 20px;
    background: rgba(5, 7, 10, 0.8);
    border-top: 1px solid var(--glass-border);
    text-align: center;
    margin-top: 50px;
}

.footer-logo {
    font-family: var(--font-title);
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #6b7280;
}

/* --- MOBILE --- */
@media (max-width: 992px) {
    .nav-bar { padding: 10px 20px; }
    .nav-links { display: none !important; }
    .menu-btn { display: block !important; }
    .hero-section { padding: 80px 15px 40px; }
    .player-card {
        padding: 30px 20px;
        border-radius: 35px;
        max-width: none;
    }
    .radio-title { font-size: 1.8rem; }
    .logo-box { width: 160px; height: 160px; }
    .content-section { grid-column: span 12 !important; }
    .visualizer-container { height: 350px; }
}

/* React Mode Grid */
.reactions-container.mode-grid {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    gap: 15px;
}

.reactions-container.mode-grid .reaction-btn {
    width: 60px;
    height: 60px;
}

/* Content Disabled Mode (Solo Player) */
body.content-disabled .nav-bar,
body.content-disabled .content-area,
body.content-disabled footer {
    display: none !important;
}

body.content-disabled .hero-section {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.content-disabled .player-card {
    margin: auto !important;
}

/* --- IDLE / IMMERSIVE MODE --- */
.idle-mode .player-card {
    opacity: 0.1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: scale(0.9) translateY(40px);
    pointer-events: none;
}

.idle-mode .nav-bar {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.idle-mode .reactions-container {
    opacity: 0.05;
    transform: translateX(40px) translateY(-50%);
    pointer-events: none;
}

.idle-mode .content-area, 
.idle-mode footer,
.idle-mode #pwaInstallBar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.idle-mode .viz-switch-btn {
    opacity: 0;
}

/* Base transitions for immersive feel */
.nav-bar, 
.reactions-container, 
.content-area, 
footer, 
#pwaInstallBar,
.viz-switch-btn {
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RSS GRID & CARDS --- */
.rss-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 10px;
}

.rss-card {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text);
}

.rss-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    transform: translateX(10px);
}

.rss-thumb {
    width: 140px;
    min-width: 140px;
    background-size: cover;
    background-position: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.rss-content {
    padding: 20px;
    flex: 1;
}

.rss-content h4 {
    font-family: var(--font-title);
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #fff;
    line-height: 1.4;
}

.rss-content p {
    font-size: 0.85rem;
    color: #8b949e;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rss-date {
    font-size: 0.7rem;
    color: var(--accent);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .rss-card { flex-direction: column; }
    .rss-thumb { width: 100%; height: 150px; border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
}

