/* ============================================
   NowTrending News Curation Platform
   Main Stylesheet
   ============================================ */

:root {
    --primary: #ef4444; /* Broadcast Red */
    --primary-foreground: #ffffff;
    --secondary: #8b5cf6; /* AI Violet */
    --secondary-foreground: #ffffff;
    --accent: #2a2a2c;
    --accent-foreground: #ffffff;
    --destructive: #ef4444;
    --destructive-foreground: #fafafa;
    --muted: #1c1b1d;
    --muted-foreground: #a1a1aa;
    --border: transparent; /* No-line rule */
    --input: #1c1b1d;
    --ring: #ef4444;
    --background: #09090b; /* Cinematic void */
    --foreground: #ffffff;
    
    /* Surfacing from PRD */
    --surface: #131315;
    --surface-container-lowest: #0e0e10;
    --surface-container-low: #1c1b1d;
    --surface-container: #201f22;
    --surface-container-high: #2a2a2c;
    --surface-container-highest: #353437;

    --radius: 0.25rem;
    --shadow: none; /* Tonal layering preferred */
    --shadow-md: none;
}

.dark-theme {
    color-scheme: dark;
}

/* Haystack-style Video Hero */
.video-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    background: #000;
    overflow: hidden;
    color: #fff;
    display: flex;
    align-items: center;
}

.video-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-hero-bg iframe, 
.video-hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.video-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%),
                linear-gradient(to top, rgba(0,0,0,1) 0%, transparent 40%);
    z-index: 2;
}

.video-hero-content {
    position: relative;
    z-index: 3;
    max-width: 650px;
    padding: 0 2rem;
}

.video-hero-tag {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.video-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.05em;
}

.video-hero-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 2rem;
}

/* Horizontal Scroll Channels */
.channel-row {
    margin: 3rem 0;
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.channel-title {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.channel-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.channel-scroll::-webkit-scrollbar {
    display: none;
}

.video-card {
    min-width: 300px;
    flex: 0 0 300px;
}

.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.7);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.video-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-info p {
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

/* Layout adjustments */
.main-wrapper {
    background-color: var(--background);
    color: var(--foreground);
    min-height: 100vh;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .display, .channel-title, .video-hero-title, .news-card-title, .featured-article-title {
    font-family: 'Newsreader', serif;
}

/* Glass & Gradient Styles */
.glass-panel {
    background: rgba(32, 31, 34, 0.6); /* surface-container at 60% */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.gradient-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #ff5451 100%);
    color: var(--primary-foreground);
    border: none;
}

.live-pulse {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 1);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Breaking News Ticker */
.breaking-news-ticker {
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 10px 0;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
}

.ticker-label {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    padding-right: 20px;
    background: var(--primary);
    z-index: 2;
    position: relative;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
}

.ticker-scroll {
    display: inline-flex;
    animation: marquee 40s linear infinite;
    gap: 50px;
}

.ticker-scroll:hover {
    animation-play-state: paused;
}

.ticker-item {
    color: var(--primary-foreground);
    font-weight: 500;
    display: inline-block;
}

.ticker-item::before {
    content: " • ";
    margin-right: 10px;
    opacity: 0.5;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.site-header {
    background: rgba(19, 19, 21, 0.6); /* surface at 60% */
    backdrop-filter: blur(24px);
    border-bottom: none; /* No-line rule */
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background-color 0.3s ease;
}

.top-bar {
    background: var(--surface-container-low);
    color: var(--muted-foreground);
    padding: 6px 0;
    font-size: 0.75rem;
    border-bottom: none; /* No-line rule */
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.logo span {
    color: var(--muted-foreground);
    font-weight: 400;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--foreground);
}

/* Dropdown/Submenu Styles */
.main-nav ul li {
    position: relative;
}

.main-nav ul li .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface-container-high);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 180px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
    padding: 0.5rem 0;
    z-index: 100;
    list-style: none;
}

.main-nav ul li:hover .submenu {
    display: block;
}

.main-nav ul li .submenu li {
    display: block;
}

.main-nav ul li .submenu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--foreground);
}

.main-nav ul li .submenu a:hover {
    background: var(--surface-container-highest);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #ff5451 100%);
    color: var(--primary-foreground);
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    border-color: transparent;
    background: var(--surface-container-highest);
    color: var(--secondary);
}

.btn-outline:hover,
.btn-outline.active {
    background: var(--surface-container-high);
    color: var(--foreground);
    border-color: transparent;
}

.ai-generated-text {
    line-height: 1.6;
    color: var(--foreground);
    white-space: pre-wrap;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding: 3rem 0;
    text-align: center;
    background: var(--muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
}

.hero-section p {
    color: var(--muted-foreground);
    font-size: 1.125rem;
}

/* ============================================
   News Cards & Grid
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.news-card {
    border: none; /* No-line */
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
    background: var(--surface-container);
}

.news-card:hover {
    /* Ambient shadow for floating state instead of drop shadow */
    box-shadow: 0 0 40px 0 rgba(229, 225, 228, 0.08);
    transform: translateY(-2px);
    background: var(--surface-container-high);
}

.news-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: var(--muted);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
}

.news-card-content {
    padding: 1.25rem;
}

.news-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.news-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.news-card-summary {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: none; /* No-line rule */
    background: var(--surface-container-lowest);
    padding: 1rem;
    margin: 1rem -1.25rem -1.25rem -1.25rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Featured Article */
.featured-article {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    border: none;
    background: var(--surface-container);
    border-radius: var(--radius);
    overflow: hidden;
}

.featured-article-image {
    aspect-ratio: 16/9;
}

.featured-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-article-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-article-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

/* ============================================
   Category Tabs
   ============================================ */
.category-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.25rem;
    background: var(--muted);
    border-radius: var(--radius);
    width: max-content;
}

.category-filter a {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: calc(var(--radius) - 2px);
    color: var(--muted-foreground);
}

.category-filter a.active {
    background: var(--background);
    color: var(--foreground);
    box-shadow: var(--shadow);
}

/* ============================================
   Sidebar Widgets
   ============================================ */
.sidebar-widget {
    border: none;
    background: var(--surface-container-low);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trending-list {
    list-style: none;
}

.trending-list li {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.trending-list li:last-child {
    border-bottom: none;
}

.trending-list .rank {
    font-weight: 800;
    color: var(--muted-foreground);
    font-size: 1.25rem;
    opacity: 0.3;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--muted);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.footer-section ul {
    list-style: none;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

/* Form Inputs PRD */
.form-control {
    background: var(--surface-container-lowest);
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--foreground);
    transition: all 0.2s ease;
    border-radius: var(--radius) var(--radius) 0 0;
}

.form-control:focus {
    background: var(--surface-container-low);
    border-bottom: 2px solid var(--secondary);
    box-shadow: none;
    outline: none;
}

/* Global HUD */
.global-hud {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(32, 31, 34, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: var(--muted-foreground);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 100;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .featured-article {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface-container-high);
        padding: 1rem;
        z-index: 99;
        border-bottom: 2px solid var(--primary);
    }
    .main-nav.active {
        display: block !important;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin: 0;
    }
    .main-nav ul li {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .main-nav ul li a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        color: var(--foreground);
    }
    .main-nav ul li a:hover,
    .main-nav ul li a.active {
        background: var(--surface-container-highest);
        color: var(--primary);
    }
    .main-nav ul li .submenu {
        position: static;
        display: block;
        background: var(--surface-container-low);
        box-shadow: none;
        min-width: 100%;
        border-radius: 0;
        padding: 0;
    }
    .main-nav ul li:hover .submenu {
        display: block;
    }
    .main-nav ul li .submenu a {
        padding: 0.5rem 1rem 0.5rem 2rem;
        font-size: 0.875rem;
    }
    .top-bar .container {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    .top-bar-actions {
        display: flex;
        gap: 0.75rem;
        align-items: center;
    }
    .video-hero-title {
        font-size: 2rem;
    }
    .featured-article-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.25rem; }
    .news-grid { grid-template-columns: 1fr; }
    .main-header { flex-direction: row; gap: 0.5rem; flex-wrap: wrap; }
    .search-form { display: none !important; }
    .video-hero { height: 50vh; min-height: 350px; }
    .video-hero-title { font-size: 1.75rem; }
    .channel-scroll { gap: 0.75rem; }
    .video-card { min-width: 260px; flex: 0 0 260px; }
}

@media (max-width: 480px) {
    .logo { font-size: 1rem; }
    .nav-actions .btn { padding: 0.35rem 0.6rem; font-size: 0.75rem; }
    .video-hero { height: 40vh; min-height: 280px; }
    .video-hero-title { font-size: 1.5rem; }
    .channel-title { font-size: 1.25rem; }
    .video-card { min-width: 220px; flex: 0 0 220px; }
}

/* ============================================
   Admin Panel Layout & Components
   ============================================ */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 200px);
    background: #f1f5f9;
}

.admin-sidebar {
    width: 260px;
    background: #0f172a;
    color: #fff;
    padding: 1.5rem 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 40;
    transition: transform 0.3s ease;
}

.admin-sidebar-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.admin-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav li {
    margin: 0;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-left-color: var(--primary);
}

.admin-nav a.active {
    background: rgba(239, 68, 68, 0.1);
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.025em;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
}

.data-table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #f8fafc;
}

.data-table a {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
}

.data-table a:hover {
    color: var(--primary);
}

.data-table-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit {
    background: #3b82f6;
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-edit:hover {
    background: #2563eb;
    color: #fff;
}

.btn-delete {
    background: #ef4444;
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-delete:hover {
    background: #dc2626;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.bg-success { background: #22c55e; color: #fff; }
.bg-warning { background: #eab308; color: #000; }
.bg-danger { background: #ef4444; color: #fff; }
.bg-info { background: #3b82f6; color: #fff; }
.bg-secondary { background: #64748b; color: #fff; }

/* Admin Menu Toggle for Mobile */
.admin-menu-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@media (max-width: 991px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 100;
        width: 280px;
    }
    .admin-sidebar.active {
        transform: translateX(0);
    }
    .admin-content {
        padding: 1rem;
    }
    .admin-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .admin-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    .stat-card {
        padding: 1rem;
    }
    .stat-card-value {
        font-size: 1.5rem;
    }
    .data-table {
        overflow-x: auto;
    }
    .data-table table {
        min-width: 600px;
    }
}

/* Live Channels Page */
.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.live-channel-card {
    background: var(--surface-container);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
}

.live-channel-card:hover {
    background: var(--surface-container-high);
    transform: translateY(-2px);
}

.live-channel-thumb {
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
}

.live-channel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-channel-thumb .live-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.live-channel-info {
    padding: 1rem;
}

.live-channel-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.live-channel-info p {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin: 0;
}

.live-category-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.live-category-nav a {
    padding: 0.5rem 1rem;
    background: var(--surface-container-high);
    color: var(--muted-foreground);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.live-category-nav a.active,
.live-category-nav a:hover {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 768px) {
    .live-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
}

/* Helper classes */
.text-muted {
    color: var(--muted-foreground) !important;
}


/* ==========================================================================
   MOBILE-FIRST APP EXPERIENCE ENHANCEMENTS
   ========================================================================== */

.backdrop-blur {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 767.98px) {
    body {
        padding-bottom: 70px !important;
        font-size: 0.95rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Mobile Bottom Bar Active Glow */
    .mobile-bottom-bar .mobile-nav-item {
        transition: transform 0.15s ease, color 0.15s ease;
        padding: 4px 8px;
    }

    .mobile-bottom-bar .mobile-nav-item:active {
        transform: scale(0.90);
    }

    .mobile-bottom-bar .mobile-nav-item.active {
        color: #3b82f6 !important;
    }

    /* Touch Tap States */
    .card, .btn, .story-card, .source-tag {
        touch-action: manipulation;
    }

    .card:active {
        transform: scale(0.985);
        transition: transform 0.1s ease;
    }

    /* Smooth Horizontal Scroll snapping for mobile stories */
    .overflow-x-auto {
        display: flex;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    .overflow-x-auto > * {
        scroll-snap-align: start;
    }

    /* Responsive Typography */
    h1.h2 {
        font-size: 1.5rem !important;
    }

    .market-ticker-bar {
        font-size: 0.75rem;
    }
}