:root {
    --bg-deep: #000000;
    --aurora-1: #4a00e0;
    --aurora-2: #8e2de2;
    --aurora-3: #00f260;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --font: 'Space Grotesk', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-deep);
    color: var(--text);
    font-family: var(--font);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

/* LOADER */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* AURORA BACKGROUND */
.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
    opacity: 0.6;
}

.orb {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 60vw;
    height: 60vw;
    background: var(--aurora-1);
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.orb-2 {
    width: 50vw;
    height: 50vw;
    background: var(--aurora-2);
    bottom: -10%;
    right: -10%;
    animation-duration: 20s;
}

.orb-3 {
    width: 30vw;
    height: 30vw;
    background: var(--aurora-3);
    top: 40%;
    left: 40%;
    animation-duration: 30s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* CONTAINER */
.app-container {
    width: 100%;
    max-width: 500px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    z-index: 10;
    position: relative;
}

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo {
    width: 60px;
    height: 60px;
    /* Increased presence */
    filter: drop-shadow(0 0 10px rgba(74, 0, 224, 0.4));
}

/* INFO CAROUSEL (ANIMATED GADGET) */
.info-carousel {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-bottom: 0rem;
    /* Tightest possible */
    overflow: hidden;
    height: 60px;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.c-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.c-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    cursor: pointer;
}

.c-icon {
    font-size: 1.5rem;
}

.c-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    /* Prevent spill */
    flex: 1;
    /* Take remaining space */
}

.c-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CAROUSEL MOBILE TWEAKS */
@media (max-width: 400px) {
    .c-slide {
        padding: 0 1rem;
        gap: 0.8rem;
    }

    .c-title {
        font-size: 0.85rem;
    }

    .c-desc {
        font-size: 0.7rem;
    }

    .c-icon {
        font-size: 1.3rem;
    }
}

.c-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.c-bar {
    height: 100%;
    background: var(--aurora-3);
    width: 0%;
    transition: width 0.1s linear;
}

.brand-text {
    font-weight: 700;
    letter-spacing: -0.5px;
    font-size: 1.1rem;
}

.live-pill {
    background: rgba(255, 0, 0, 0.1);
    color: #ff3b30;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.3;
    }
}

/* HEADER ACTIONS (UX FIX) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s;

    /* Improved Hit Area */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* --- NEURAL NEWS CAPSULE (PROJECT V2) --- */
.neural-capsule {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    height: 60px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    display: flex;
    align-items: center;
    padding: 6px;
    z-index: 2000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.neural-capsule:hover {
    transform: translateX(-50%) translateY(-5px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(var(--aurora-rgb), 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.nc-icon-zone {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--aurora-3), #ff9966);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.4);
    flex-shrink: 0;
    z-index: 2;
}

.nc-content-zone {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 15px;
    flex-grow: 1;
    overflow: hidden;
    z-index: 2;
}

.nc-label {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--aurora-3);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.nc-text {
    color: white;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.nc-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 100px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translate(-50%, -50%) rotate(25deg);
    animation: caps-shine 4s infinite linear;
    pointer-events: none;
    z-index: 1;
}

@keyframes caps-shine {
    0% {
        transform: translate(-100%, -50%) rotate(25deg);
    }

    100% {
        transform: translate(100%, -50%) rotate(25deg);
    }
}

@media (min-width: 1024px) {
    .neural-capsule {
        bottom: 40px;
    }
}

.icon-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.icon-btn:active {
    transform: scale(0.9);
}

/* MODALS */
.sleep-modal,
.business-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sleep-modal.active,
.business-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.news-panel {
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 25px;
    /* More padding */
    width: 95% !important;
    /* Wider on mobile */
    max-width: 800px !important;
    /* Much wider on desktop */
    min-height: 400px;
    max-height: 85vh !important;
    /* Taller */
    overflow-y: hidden;
    /* Scroll internally */
    position: relative;
    display: flex;
    flex-direction: column;
}

.glass-panel {
    background: rgba(20, 20, 30, 0.9);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    width: 90%;
    max-width: 320px;
}

/* SLEEP TIMER */
.timer-options {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.timer-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.timer-btn:hover {
    background: var(--aurora-2);
}

.timer-btn.cancel {
    background: rgba(255, 50, 50, 0.2);
    width: 100%;
    margin-top: 0.5rem;
}

/* MAIN STAGE */
.stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
}

.player-capsule {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: 40px;
    padding: 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
    position: relative;
    z-index: 15;
}

.art-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
}

.art {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Logo Mode - No Padding, Full Size */
.art.is-logo {
    object-fit: contain;
    padding: 20px;
    background: transparent;
    box-shadow: none;
}

/* Visualizer */
.vis-bars {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    height: 20px;
    align-items: flex-end;
}

.bar {
    width: 4px;
    background: white;
    border-radius: 2px;
    height: 4px;
    transition: height 0.1s;
}

.player-capsule.playing .bar {
    animation: bounce 1s infinite;
}

.player-capsule.playing .bar:nth-child(even) {
    animation-delay: 0.1s;
}

.player-capsule.playing .bar:nth-child(odd) {
    animation-delay: 0.2s;
}

@keyframes bounce {

    0%,
    100% {
        height: 4px;
    }

    50% {
        height: 20px;
    }
}

.meta-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.meta-wrapper h1 {
    font-size: 1.8rem;
    font-weight: 700;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.meta-wrapper p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Play Button */
.main-controls {
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: white;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.play-btn:active {
    transform: scale(0.9);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.play-btn.loading {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* History Trigger (UX Fix) */
.history-trigger {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    transition: color 0.2s;
    padding: 10px 20px;
    border-radius: 20px;
}

.history-trigger:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    /* Slight highlight */
}

/* History Drawer */
.history-drawer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    width: 90%;
    max-width: 460px;
    background: rgba(30, 30, 40, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 1.5rem;
    z-index: 100;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    height: auto;
    max-height: 320px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.history-drawer.active {
    transform: translateX(-50%) translateY(0);
}

.drawer-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 1.5rem auto;
}

.history-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    scrollbar-width: none;
}

.history-card {
    min-width: 120px;
    width: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.h-art {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
    background: #222;
}

.h-meta div {
    font-size: 0.8rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.h-artist {
    font-weight: 700;
    color: white;
}

.h-song {
    color: rgba(255, 255, 255, 0.6);
}

/* BUSINESS MODAL STYLE */
.business-panel {
    width: 90%;
    max-width: 500px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.biz-content {
    display: block;
    flex: 1;
    overflow-y: hidden;
    padding: 2rem;
}

.biz-footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    width: 100%;
}

/* PLANS */
.plans-grid {
    display: grid;
    gap: 1rem;
}

.plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 16px;
    position: relative;
}

.plan-card.pro {
    border-color: var(--aurora-3);
    background: rgba(0, 242, 96, 0.05);
}

.badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: var(--aurora-3);
    color: black;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.price small {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.6;
}

.plan-features {
    list-style: none;
    margin: 0.5rem 0 1rem 0;
    padding: 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

.plan-features li {
    margin-bottom: 4px;
    padding-left: 14px;
    position: relative;
}

.plan-features li::before {
    content: "•";
    color: var(--aurora-3);
    position: absolute;
    left: 0;
}

.plan-btn {
    display: block;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.plan-card.pro .plan-btn {
    background: var(--aurora-3);
    color: black;
    font-weight: 700;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 480px) {
    .app-container {
        padding: 1rem;
        justify-content: space-between;
    }

    .player-capsule {
        padding: 1.5rem;
        border-radius: 30px;
        gap: 1.5rem;
    }

    .art-wrapper {
        width: 180px;
        height: 180px;
    }

    .meta-wrapper h1 {
        font-size: 1.5rem;
    }

    .play-btn {
        width: 70px;
        height: 70px;
    }
}

/* --- DESKTOP GADGETS --- */
.desktop-ui {
    display: none;
    /* Hidden on mobile */
}

@media (min-width: 1024px) {
    .desktop-ui {
        display: block;
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 12;
    }

    .d-widget {
        position: absolute;
        width: 280px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
        border-radius: 20px;
        padding: 1.5rem;
        pointer-events: auto;
        color: white;
        transition: transform 0.3s ease;
    }

    .d-widget:hover {
        transform: translateY(-5px);
        background: rgba(255, 255, 255, 0.05);
    }

    /* Left Side: Weather */
    .weather-widget {
        top: 20%;
        left: 5%;
    }

    /* Right Side: Santoral */
    .santoral-widget {
        top: 20%;
        right: 5%;
    }

    .dw-header {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-weight: 700;
        font-size: 1.1rem;
        color: var(--aurora-3);
    }

    .dw-icon {
        font-size: 1.5rem;
    }

    .dw-content {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .dw-row {
        display: flex;
        flex-direction: column;
    }

    .dw-city {
        font-size: 0.9rem;
        opacity: 0.7;
        margin-bottom: 0.2rem;
    }

    .dw-temp {
        font-size: 1.8rem;
        font-weight: 700;
    }

    .dw-range {
        font-size: 0.8rem;
        opacity: 0.5;
    }

    .dw-main-text {
        font-size: 1.1rem;
        line-height: 1.4;
    }
}

/* --- LEFT/RIGHT COLUMNS (Desktop) --- */
@media (min-width: 1024px) {

    /* Reset individual positioning */
    .weather-widget,
    .santoral-widget {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        /* Fill container */
        margin-bottom: 1rem;
    }

    /* Column Containers */
    .d-col-left {
        position: absolute;
        top: 20%;
        left: 5%;
        width: 280px;
        display: flex;
        flex-direction: column;
    }

    .d-col-right {
        position: absolute;
        top: 20%;
        right: 5%;
        width: 320px;
        display: flex;
        flex-direction: column;
    }

    /* News Widget Specifics */
    .news-widget {
        position: relative;
        width: 100%;
        min-height: 150px;
    }

    #newsContainer {
        transition: opacity 0.5s ease-in-out;
    }

    .news-title {
        font-weight: 700;
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
        color: white;
    }

    .news-desc {
        font-size: 0.9rem;
        opacity: 0.7;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* --- NEWS CAROUSEL (RIGHT COLUMN) --- */
@media (min-width: 1024px) {
    .news-widget {
        min-height: 400px;
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .news-carousel-container {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center vertically if short */
        padding: 4px;
    }

    .news-carousel-card {
        animation: fadeSlideIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    @keyframes fadeSlideIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Meta: Category + Date */
    .nc-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: rgba(255, 255, 255, 0.5);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 8px;
    }

    .nc-cat {
        color: var(--aurora-3);
        font-weight: 700;
    }

    .nc-title {
        font-size: 1.1rem;
        font-weight: 600;
        line-height: 1.3;
        color: white;
    }

    .nc-desc {
        font-size: 0.9rem;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.8);
        display: -webkit-box;
        -webkit-line-clamp: 8;
        /* Show ~8 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .nc-read-more {
        margin-top: auto;
        font-size: 0.8rem;
        color: var(--aurora-3);
        cursor: pointer;
        text-decoration: underline;
        opacity: 0.8;
    }

    .nc-read-more:hover {
        opacity: 1;
    }

    /* --- NEWS MODAL --- */
    .news-modal {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: flex;
        /* Flexbox for centering */
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
        padding: 1rem;
        /* Prevent touching edges */
    }

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



    .nm-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nm-cat {
        background: var(--aurora-3);
        color: black;
        font-weight: 700;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        text-transform: uppercase;
    }

    .nm-date {
        font-family: monospace;
        color: rgba(255, 255, 255, 0.5);
    }

    .nm-title {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
        color: white;
    }

    .nm-body {
        font-size: 1.1rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 2rem;
        white-space: pre-line;
    }

    .nm-btn {
        display: inline-block;
        background: white;
        color: black;
        padding: 12px 24px;
        border-radius: 30px;
        text-decoration: none;
        font-weight: 700;
        transition: transform 0.2s;
    }

    .nm-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
    }


    /* --- CENTERED GLASS MODAL (Card Style) --- */
    .news-panel {
        width: 90%;
        max-width: 500px !important;
        background: rgba(255, 255, 255, 0.12) !important;
        /* Glass */
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-left: 4px solid var(--aurora-3) !important;
        /* Gold Accent */
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
        padding: 2rem !important;
        border-radius: 16px !important;
        animation: modalPop 0.5s cubic-bezier(0.19, 1, 0.22, 1);
        transform-origin: center center;
    }

    @keyframes modalPop {
        from {
            opacity: 0;
            transform: scale(0.9) translateY(20px);
        }

        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

    .nm-header {
        margin-bottom: 1rem !important;
        padding-bottom: 0.8rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Hero Image */
    .nm-hero-img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        border-radius: 12px;
        margin-bottom: 1.2rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    .nm-title {
        font-size: 1.6rem !important;
        font-weight: 800 !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.2 !important;
        color: white !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        letter-spacing: -0.5px;
    }

    .nm-body {
        font-size: 1.05rem !important;
        line-height: 1.6 !important;
        color: rgba(255, 255, 255, 0.9) !important;
        margin-bottom: 2rem !important;
    }

    .nm-btn {
        background: var(--aurora-3) !important;
        color: black !important;
        border: none !important;
        padding: 10px 24px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .nm-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        background: #fff !important;
    }



    /* --- MODAL FOOTER --- */
    .nm-footer {
        display: block;
        width: 100%;
        margin-top: 1.5rem;
        padding-top: 0.8rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        font-size: 0.8rem;
        font-weight: 500;
        color: var(--aurora-3);
        /* Gold/Yellow */
        text-align: center;
        letter-spacing: 0.5px;
        font-style: italic;
        opacity: 0.9;
    }

    /* --- NEWS HUB: LIST VIEW --- */
    .nm-list-container {
        margin-top: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        max-height: 60vh;
        overflow-y: hidden;
    }

    .nm-list-item {
        background: rgba(255, 255, 255, 0.05);
        padding: 10px;
        border-radius: 8px;
        cursor: pointer;
        border: 1px solid transparent;
        transition: all 0.2s;
    }

    .nm-list-item:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--aurora-3);
        transform: translateX(4px);
    }

    .nm-li-meta {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.5);
        margin-bottom: 4px;
        display: flex;
        justify-content: space-between;
    }

    .nm-li-title {
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1.3;
        color: white;
    }

    .nm-back-btn {
        background: none;
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.8rem;
        cursor: pointer;
        margin-right: auto;
    }

    .nm-back-btn:hover {
        background: white;
        color: black;
    }

    /* History Time Badge */
    .h-time-badge {
        position: absolute;
        bottom: 4px;
        right: 4px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        font-size: 0.7rem;
        padding: 2px 6px;
        border-radius: 8px;
        backdrop-filter: blur(4px);
        font-weight: 700;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }
}

/* NEWS CAROUSEL DOTS */
.nc-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 5px;
}

.nc-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.nc-dot.active {
    background: var(--aurora-3);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(0, 242, 96, 0.4);
}

.nc-dot:hover {
    background: rgba(255, 255, 255, 0.6);

    .news-panel {
        background: linear-gradient(135deg, rgba(20, 20, 40, 0.97), rgba(30, 20, 50, 0.97));
        backdrop-filter: blur(30px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow:
            0 25px 50px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.05) inset;
        border-radius: 24px;
        padding: 0;
        max-width: 900px;
        max-height: 90vh;
        overflow: hidden;
    }

    /* Header - Gradient Background */
    .nm-header {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        padding: 24px 32px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .nm-header .dw-icon {
        font-size: 32px;
        filter: drop-shadow(0 2px 8px rgba(0, 242, 234, 0.3));
    }

    .nm-header .nm-title {
        font-size: 24px;
        font-weight: 700;
        background: linear-gradient(135deg, #fff 0%, #00F2EA 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
    }

    /* Close Button - Modern */
    .news-panel .close-modal {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: white;
        font-size: 24px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }

    .news-panel .close-modal:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }

    /* List Container - Scrollable */
    .nm-list-container {
        padding: 24px 32px;
        max-height: calc(90vh - 180px);
        overflow-y: hidden;
    }

    /* News Card - Magazine Style */
    .nm-card {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 16px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        gap: 16px;
        align-items: flex-start;
    }

    .nm-card:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(0, 242, 234, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 242, 234, 0.15);
    }

    /* Card Thumbnail */
    .nm-card-thumb {
        width: 120px;
        height: 80px;
        border-radius: 12px;
        object-fit: cover;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.05);
    }

    /* Card Content */
    .nm-card-content {
        flex: 1;
        min-width: 0;
    }

    .nm-card-title {
        font-size: 18px;
        font-weight: 700;
        color: white;
        margin: 0 0 8px 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .nm-card-meta {
        display: flex;
        gap: 12px;
        align-items: center;
        flex-wrap: wrap;
    }

    .nm-card-category {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        background: linear-gradient(135deg, #00F2EA, #0099CC);
        color: white;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .nm-card-date {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.5);
    }

    /* Detail View */
    #nmDetailView {
        padding: 0;
    }

    #nmDetailView .nm-header {
        padding: 20px 32px;
    }

    .nm-back-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: white;
        padding: 8px 16px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
    }

    .nm-back-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(-4px);
    }

    .nm-cat,
    .nm-date {
        display: inline-block;
        padding: 6px 14px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        margin: 0 8px;
    }

    .nm-cat {
        background: linear-gradient(135deg, #00F2EA, #0099CC);
        color: white;
    }

    .nm-date {
        background: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.7);
    }

    /* Hero Image */
    .nm-hero-img {
        width: 100%;
        height: auto;
        max-height: 400px;
        object-fit: cover;
        border-radius: 0;
        margin: 0;
    }

    /* Detail Content */
    #nmDetailView .nm-title {
        font-size: 28px;
        font-weight: 700;
        line-height: 1.3;
        color: white;
        margin: 24px 32px 16px;
    }

    .nm-body {
        padding: 0 32px 32px;
        font-size: 16px;
        line-height: 1.8;
        color: rgba(255, 255, 255, 0.85);
        max-height: calc(90vh - 500px);
        overflow-y: hidden;
    }

    .nm-body p {
        margin-bottom: 16px;
    }

    /* Footer */
    .nm-footer {
        padding: 20px 32px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(0, 0, 0, 0.2);
        text-align: center;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.5);
    }

    /* Loading State */
    .nm-loading {
        text-align: center;
        padding: 60px 20px;
        color: rgba(255, 255, 255, 0.5);
        font-size: 16px;
    }

    /* Scrollbar Styling */
    .nm-list-container::-webkit-scrollbar,
    .nm-body::-webkit-scrollbar {
        width: 8px;
    }

    .nm-list-container::-webkit-scrollbar-track,
    .nm-body::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px;
    }

    .nm-list-container::-webkit-scrollbar-thumb,
    .nm-body::-webkit-scrollbar-thumb {
        background: rgba(0, 242, 234, 0.3);
        border-radius: 10px;
    }

    .nm-list-container::-webkit-scrollbar-thumb:hover,
    .nm-body::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 242, 234, 0.5);
    }
}



/* Ocultar ON AIR en móvil */
@media (max-width: 768px) {
    .live-pill {
        display: none !important;
    }
}

/* News Pill - Botón de noticias móvil */
.news-pill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: transform 0.2s;
    min-width: 100px;
    text-align: center;
    display: none;
}

.news-pill:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .news-pill {
        display: inline-block;
    }
}

/* Ajustes para móvil - Logo más pequeño y botón de noticias ajustado */
@media (max-width: 768px) {
    .logo {
        height: 65px !important;
        width: auto !important;
        max-width: 140px !important;
        object-fit: contain !important;
    }

    .header-actions {
        gap: 5px !important;
    }

    .news-pill {
        min-width: 70px !important;
        padding: 5px 10px !important;
        font-size: 9px !important;
        transform: scale(0.9);
    }
}

/* Wirelan Credits Footer */
.wirelan-credit {
    text-align: center;
    padding: 15px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    width: 100%;
    position: relative;
    z-index: 100;
    margin-top: auto;
    /* Push to bottom if flex container */
    padding-bottom: 20px;
}

.wirelan-credit a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.wirelan-credit a:hover {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .wirelan-credit {
        font-size: 10px;
        padding-bottom: 100px;
        /* Extra padding for mobile if player is bottom-fixed? Can adjust */
    }
}

/* Lyrics Standard - Readable & Static */
.lyrics-container {
    height: 120px;
    /* Increased height for better reading */
    min-height: 120px;
    max-height: 120px;
    overflow-y: auto;
    /* Allow manual scrolling */
    position: relative;
    /* Glassmorphism - Premium Feel */
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    margin: 0 20px 15px 20px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    transition: opacity 0.5s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lyrics-content {
    padding: 0;
    text-align: center;
    width: 100%;
}

.lyrics-line {
    display: block;
    padding: 4px 0;
    color: rgba(255, 255, 255, 0.9);
    /* High visibility */
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    filter: none;
    /* No blur */
}

/* Remove karaoke specific states (or make them neutral just in case) */
.lyrics-line.active,
.lyrics-line.past {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    transform: none;
    filter: none;
    text-shadow: none;
    margin: 0;
}