:root {
    --bg-black: #050505;
    --bg-card: #121212;
    --accent-red: #ff3e3e;
    --accent-glow: rgba(255, 62, 62, 0.4);
    --text-white: #ffffff;
    --text-grey: #a0a0a0;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* --- CUSTOM SCROLLBAR --- */
.scroll-premium {
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-red) transparent;
}

.scroll-premium::-webkit-scrollbar {
    width: 4px;
}

.scroll-premium::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-premium::-webkit-scrollbar-thumb {
    background: var(--accent-red);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--accent-red);
}

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

body {
    background: var(--bg-black);
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

/* --- APP SHELL --- */
.app-shell {
    width: 100%;
    max-width: 500px;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 50% -20%, #201010 0%, #050505 100%);
}

.ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
    transition: opacity 2s;
}

.viewport {
    flex: 1;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    padding: 2.5vh 20px;
}

.view.active {
    display: flex;
    flex-direction: column;
}

/* --- SECTION: RADIO --- */
.radio-immersive {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.player-core {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 30px;
    padding-bottom: 20px;
    /* Slight offset for visual balance */
}

.top-status {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    height: 48px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-indicator {
    background: rgba(255, 62, 62, 0.1);
    border: 1px solid rgba(255, 62, 62, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-red);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pill-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pill-btn i {
    color: var(--accent-red);
    font-size: 0.85rem;
}

.pill-btn:active {
    background: var(--accent-red);
    transform: scale(0.95);
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-red);
    animation: beacon 1.5s infinite;
}

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

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

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

.hero-art {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 0;
    margin-bottom: 20px;
}

.art-frame {
    width: 65vw;
    height: 65vw;
    max-width: 280px;
    max-height: 280px;
    position: relative;
    border-radius: 40px;
    padding: 10px;
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8);
}

.art-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 32px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.vibe-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 45px;
    border: 1px solid rgba(255, 62, 62, 0);
    transition: 0.5s;
}

.playing .vibe-ring {
    border-color: rgba(255, 62, 62, 0.3);
    animation: rotateRing 10s linear infinite;
}

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

.track-meta {
    text-align: center;
    margin-bottom: 2vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.visualizer-v3 {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 30px;
}

.visualizer-v3 span {
    width: 4px;
    height: 6px;
    background: var(--accent-red);
    border-radius: 4px;
    opacity: 0.3;
    transition: 0.5s;
}

.playing .visualizer-v3 span {
    animation: barBounce 1s ease-in-out infinite;
    opacity: 1;
    box-shadow: 0 0 10px var(--accent-red);
}

.playing .visualizer-v3 span:nth-child(1) {
    animation-delay: 0.1s;
    height: 15px;
}

.playing .visualizer-v3 span:nth-child(2) {
    animation-delay: 0.3s;
    height: 25px;
}

.playing .visualizer-v3 span:nth-child(3) {
    animation-delay: 0.2s;
    height: 18px;
}

.playing .visualizer-v3 span:nth-child(4) {
    animation-delay: 0.5s;
    height: 28px;
}

.playing .visualizer-v3 span:nth-child(5) {
    animation-delay: 0.4s;
    height: 12px;
}

.playing .visualizer-v3 span:nth-child(6) {
    animation-delay: 0.2s;
    height: 22px;
}

.playing .visualizer-v3 span:nth-child(7) {
    animation-delay: 0.6s;
    height: 26px;
}

.playing .visualizer-v3 span:nth-child(8) {
    animation-delay: 0.1s;
    height: 14px;
}

.playing .visualizer-v3 span:nth-child(9) {
    animation-delay: 0.3s;
    height: 20px;
}

.playing .visualizer-v3 span:nth-child(10) {
    animation-delay: 0.4s;
    height: 16px;
}

@keyframes barBounce {

    0%,
    100% {
        height: 8px;
        transform: scaleY(1);
    }

    50% {
        height: 100%;
        transform: scaleY(1.2);
    }
}

.track-meta h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0px;
}

.track-meta p {
    color: var(--text-grey);
    font-size: 1rem;
    font-weight: 500;
}

.main-controls {
    margin-bottom: 3vh;
}

.play-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: none;
    background: var(--accent-red);
    color: white;
    font-size: 2.22rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px var(--accent-glow);
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* --- FLOATING DOCK --- */
.floating-dock {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 360px;
    height: 70px;
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.dock-item {
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-grey);
    text-decoration: none;
    font-size: 1.35rem;
    border-radius: 50%;
    transition: 0.3s;
    background: transparent;
    border: none;
}

.dock-item.active {
    color: var(--accent-red);
    background: rgba(255, 62, 62, 0.08);
}

.dock-item.share {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-white);
}

/* --- OTHER VIEWS --- */
.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 25px;
    padding-top: 10px;
}

/* --- TV HUB V3 --- */
.video-card-v3 {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 20px;
    text-decoration: none;
    color: white;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-thumb-v3 {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    object-fit: cover;
    background: #000;
}

.video-meta-v3 h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta-v3 span {
    font-size: 0.8rem;
    color: var(--accent-red);
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-card-v3:active {
    transform: scale(0.98);
}

.video-container-v3 {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 62, 62, 0.1);
}

.video-container-v3 iframe {
    width: 100%;
    height: 100%;
}

.hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.hub-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: 0.3s;
}

.hub-card i {
    font-size: 1.5rem;
}

.hub-card:active {
    transform: scale(0.98);
}

.social-dock {
    display: none;
    /* Replaced by cards */
}

/* --- SOCIAL CARDS V3 --- */
.view-header-alt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title-alt {
    font-size: 1.8rem;
    font-weight: 800;
}

.section-subtitle {
    color: var(--text-grey);
    font-size: 0.9rem;
}

.settings-ghost {
    font-size: 1.4rem;
    color: var(--text-grey);
    opacity: 0.5;
}

.social-cards-v3 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 120px;
}

.social-card-v3 {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: white;
    transition: 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-card-v3:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.05);
}

.social-icon-v3 {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
}

.social-card-v3.ig .social-icon-v3 {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-card-v3.fb .social-icon-v3 {
    background: #1877f2;
}

.social-card-v3.x .social-icon-v3 {
    background: #000;
    border: 1px solid #333;
}

.social-card-v3.wa .social-icon-v3 {
    background: #25d366;
}

.social-card-v3.yt .social-icon-v3 {
    background: #ff0000;
}

.social-card-v3.web .social-icon-v3 {
    background: var(--accent-blue-real, #2563eb);
}

.social-meta-v3 {
    flex: 1;
}

.social-meta-v3 h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.social-meta-v3 p {
    font-size: 0.85rem;
    color: var(--text-grey);
}

.social-arrow-v3 {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-grey);
}

/* Responsive adjustments for very small screens */
@media (max-height: 700px) {
    .track-meta h1 {
        font-size: 1.5rem;
    }

    .hero-art {
        padding: 1vh 0;
    }

    .art-frame {
        width: 45vh;
        height: 45vh;
    }

    .play-btn {
        width: 75px;
        height: 75px;
        font-size: 1.8rem;
    }
}

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

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

.view.active {
    animation: fadeInView 0.5s ease-out;
}

/* --- NEWS CARDS V3 --- */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 120px;
    max-height: calc(100vh - 200px);
    /* Enable scrolling */
}

/* Refresh Animation */
.spinning {
    animation: rotateRefresh 0.8s linear infinite;
}

@keyframes rotateRefresh {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.news-card-v3 {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 12px;
    /* Smoother padding for images */
    border-radius: 20px;
    text-decoration: none;
    color: white;
    transition: 0.3s;
    display: flex;
    gap: 15px;
    align-items: center;
}

.news-img-v3 {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: #1a1a1a;
}

.news-card-v3:active {
    background: #1a1a1a;
    transform: translateX(5px);
}

.news-info h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.news-info span {
    font-size: 0.7rem;
    color: var(--accent-red);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hide {
    display: none !important;
}

.pill-btn {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}

.loader,
.error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-grey);
    font-size: 0.9rem;
}

.error button {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    margin-top: 15px;
    font-weight: 700;
}