/* ============================================================================
   MASTER CONSOLIDATED CSS - City Chief News
   Consolidated from all blade files and previous CSS files
   ============================================================================ */

/* ============================================================================
   CSS VARIABLES & ROOT STYLES
   ============================================================================ */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #888;
    --border-color: #e0e0e0;
    --accent-red: #e02020;
    --accent-orange: #ff6b00;
    --accent-blue: #1565c0;
    --header-bg: #ffffff;
    --sidebar-icon-bg: #f0f0f0;
    --trending-bg: #fff3e0;
    --card-hover: #f9f9f9;
    --shadow: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --bg-primary: #181818;
    --bg-secondary: #222;
    --text-primary: #f0f0f0;
    --text-secondary: #bbb;
    --text-muted: #777;
    --border-color: #333;
    --header-bg: #1a1a1a;
    --trending-bg: #2a1e0a;
    --card-hover: #2c2c2c;
}

/* ============================================================================
   GLOBAL BASE STYLES
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    font-family: "Google Sans", sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================================
   ICON STYLES
   ============================================================================ */
i[class^="fas "],
i[class^="fab "] {
    display: inline-block;
    font-style: normal;
}

/* Dark mode icon colors */
[data-theme="dark"] i.fas,
[data-theme="dark"] i.fab {
    color: inherit;
}

[data-theme="dark"] .logo i {
    color: var(--accent-orange);
}

[data-theme="dark"] .sidebar-icon i {
    color: var(--text-primary);
}

[data-theme="dark"] .hamburger-btn i {
    color: var(--text-primary);
}

[data-theme="dark"] .user-avatar i {
    color: var(--text-primary);
}

[data-theme="dark"] .social-icon i {
    color: inherit;
}

[data-theme="dark"] .share-btn i {
    color: var(--text-muted);
}

[data-theme="dark"] .share-btn:hover i {
    color: var(--accent-orange);
}

[data-theme="dark"] .app-badge i {
    color: white;
}

[data-theme="dark"] .dropdown-item i {
    color: var(--text-primary);
}

[data-theme="dark"] .dark-mode-toggle i {
    color: var(--text-primary);
}

[data-theme="dark"] .live-text i {
    color: white;
}

[data-theme="dark"] .play-overlay i {
    color: var(--accent-red);
}

[data-theme="dark"] .video-duration i {
    color: white;
}

/* ============================================================================
   HEADER STYLES
   ============================================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    gap: 20px;
    box-shadow: 0 1px 3px var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.logo {
    font-size: 28px;
    /* width: 40px; */
    /* height: 40px; */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent-orange);
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 240px;
    /* object-fit: contain; */
}

.site-name {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.site-name-main {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-orange);
}

.site-name-sub {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.header-nav {
    display: flex;
    gap: 24px;
    align-items: center;
    flex: 1;
    justify-content: flex-start;
}

.header-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.header-nav-item i {
    font-size: 16px;
}

.header-nav-item span {
    display: inline;
}

.header-nav-item:hover,
.header-nav-item.active {
    background: var(--bg-secondary);
    color: var(--accent-orange);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 4px 8px;
}

/* ============================================================================
   USER MENU STYLES
   ============================================================================ */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    font-size: 24px;
    cursor: pointer;
    border-radius: 4px;
    padding: 4px 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar:hover {
    background: var(--bg-secondary);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 200;
}

.user-dropdown.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item,
.dark-mode-toggle {
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover,
.dark-mode-toggle:hover {
    background: var(--bg-primary);
}

/* ============================================================================
   TOGGLE SWITCH STYLES
   ============================================================================ */
.toggle-switch {
    width: 30px;
    height: 16px;
    background: #ccc;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.2s;
}

.toggle-switch.active {
    background: var(--accent-orange);
}

.toggle-switch.active::before {
    left: 16px;
}

/* ============================================================================
   CATEGORY SCROLL STRIP (below header, horizontal chips)
   ============================================================================ */
.category-scroll-bar {
    display: none;
    /* desktop: hidden; shown only on mobile via media query */
    gap: 8px;
    overflow-x: auto;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 60px;
    z-index: 98;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.category-scroll-bar::-webkit-scrollbar {
    display: none;
}

.category-scroll-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    transition: all 0.2s;
    line-height: 1.4;
}

.category-scroll-chip:hover {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
}

.category-scroll-chip.active {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
    font-weight: 700;
}

.chip-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 5px;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ============================================================================
   AD BANNER & TRENDING
   ============================================================================ */
.ad-banner-slot {
    background: var(--bg-secondary);
    height: 100px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-banner-text {
    color: var(--text-muted);
    font-size: 12px;
}

.trending-bar {
    position: sticky;
    top: 60px;
    z-index: 99;
    background: var(--trending-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    height: 40px;
}

.trending-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-orange);
    flex-shrink: 0;
}

.trending-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    flex-shrink: 0;
}

.trending-pill {
    background: white;
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    color: var(--text-primary);
    white-space: nowrap;
}

.trending-pill:hover {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
}

/* ============================================================================
   MAIN GRID LAYOUT
   ============================================================================ */
.main-grid {
    display: grid;
    grid-template-columns: 220px 1fr 300px;
    /* max-width: 1280px; */
    margin: 0 auto;
    gap: 0;
}

/* ============================================================================
   SIDEBAR STYLES
   ============================================================================ */
.left-sidebar {
    background: var(--bg-secondary);
    padding: 16px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: var(--bg-primary);
    color: var(--accent-orange);
}

.sidebar-icon {
    font-size: 16px;
    width: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.sidebar-section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 8px 10px;
    text-transform: uppercase;
}

/* Categories Section */
.categories-section {
    margin: 12px 0;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s;
    text-decoration: none;
}

.category-link:hover,
.category-link.active {
    background: var(--bg-primary);
    color: var(--accent-orange);
    font-weight: 700;
}

.category-img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.category-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* App Download Section */
.app-download-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
}

.app-download-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.app-badge {
    background: var(--accent-orange);
    color: white;
    border: none;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.app-badge:hover {
    opacity: 0.9;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.social-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.social-icon:hover {
    background: var(--accent-orange);
    color: white;
}

.state-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.state-link {
    font-size: 12px;
    padding: 6px 10px;
    color: var(--text-secondary);
    border-radius: 3px;
    transition: all 0.2s;
}

.state-link:hover {
    background: var(--bg-primary);
    color: var(--accent-orange);
}

/* ============================================================================
   RIGHT SIDEBAR STYLES
   ============================================================================ */
.right-sidebar {
    background: var(--bg-secondary);
    padding: 16px;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* Featured Video */
.featured-video {
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.featured-video-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background: var(--bg-secondary);
    cursor: pointer;
}

.featured-video-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-red);
    transition: all 0.2s;
}

.featured-video-title {
    padding: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

/* Google Widget */
.google-widget {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    text-align: center;
}

.google-widget-text {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.google-btn {
    background: #34A853;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s;
}

.google-btn:hover {
    opacity: 0.9;
}

/* Ad Slots */
.ad-slot {
    width: 100%;
    border-radius: 4px;
    margin: 12px 0;
    overflow: hidden;
}

.ad-slot-img {
    width: 100%;
    border-radius: 4px;
    object-fit: cover;
}

.ad-slot-placeholder {
    width: 100%;
    height: 250px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* Videos Widget */
.videos-widget {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.videos-header {
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
    background: var(--bg-secondary);
}

.videos-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.videos-title i {
    margin-right: 8px;
    color: var(--accent-orange);
}

.video-item {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.video-item:last-child {
    border-bottom: none;
}

.video-item-thumb {
    position: relative;
    width: 70px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.video-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, .7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    margin-left: 2px;
}

.video-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.video-item-title {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

/* ── Vertical Video Row ─────────────────────────────────────────────────── */
.vertical-video-section {
    margin-top: 24px;
}

.vertical-video-section .section-title h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.vertical-video-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.vertical-video-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.18s ease;
}

.vertical-video-card:hover {
    transform: translateY(-3px);
}

.vertical-video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    flex-shrink: 0;
}

.vertical-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vertical-video-city {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e85d04;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    z-index: 2;
    white-space: nowrap;
}

.vertical-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    transition: background 0.18s ease;
}

.vertical-video-card:hover .vertical-video-play {
    background: rgba(0, 0, 0, 0.35);
}

.vertical-video-play i {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    color: #e85d04;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    padding-left: 3px;
}

.vertical-video-title {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 900px) {
    .vertical-video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 580px) {
    .vertical-video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .vertical-video-title {
        font-size: 11px;
    }
}

/* ── End Vertical Video Row ─────────────────────────────────────────────── */

/* ============================================================================
   NEWS FEED & NEWS CARDS
   ============================================================================ */
.news-feed {
    background: var(--bg-primary);
    padding: 16px;
    min-height: 100vh;
}

/* Live News Block */
.live-news-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0.3;
    }
}

.live-text {
    background: var(--accent-red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.live-headline {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

/* Hero Video */
.hero-video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.hero-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-red);
    cursor: pointer;
}

.video-overlay-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* News Card */
.news-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    background: var(--card-hover);
    padding: 14px 12px;
    margin: 0 -12px;
    border-radius: 4px;
}

.news-card-content {
    flex: 1;
}

/* Interview Badge */
.interview-badge {
    display: inline-block;
    background: var(--accent-orange);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    padding: 2px 8px;
    margin-bottom: 4px;
    font-weight: 600;
}

/* News Title */
.news-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.news-title strong {
    font-weight: 700;
    color: var(--accent-blue);
}

.news-title p {
    margin: 0;
}

/* News Meta */
.news-meta {
    margin-bottom: 6px;
}

.news-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.category-tag {
    display: inline-block;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px;
    background: var(--bg-secondary);
    color: var(--accent-blue);
    margin-bottom: 6px;
}

/* Share Row */
.share-row {
    display: flex;
    gap: 8px;
}

.share-btn {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    color: var(--accent-orange);
}

/* News Thumbnail */
.news-thumb {
    width: 110px;
    height: 90px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    position: relative;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 110 / 90;
    contain: strict;
}

/* Search Results Page */
.search-result-card {
    border-radius: 6px;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 8px;
}

.search-result-card:hover {
    background: var(--card-hover);
    padding: 14px 8px;
    margin: 0;
    border-radius: 6px;
}

.search-result-card .news-thumb {
    width: 120px;
    height: 90px;
    border-radius: 6px;
    flex-shrink: 0;
}

.search-result-card .news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.search-result-time {
    font-size: 11px;
    color: var(--text-muted);
}

.search-result-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.search-read-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-orange);
}

/* ── Live badge inline ─────────────────────────────────────────────── */
.live-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

/* ── Home page Banner Slider ────────────────────────────────────────── */
.banner-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    border-bottom: 1px solid var(--border-color);
}

.banner-slide {
    display: none;
    width: 100%;
}

.banner-slide.active {
    display: block;
    animation: bannerFadeIn 0.45s ease;
}

@keyframes bannerFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.banner-slide a {
    display: block;
    text-decoration: none;
    position: relative;
}

.banner-slide-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.banner-slide-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 28px 14px 10px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.72));
    flex-wrap: wrap;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.42);
    color: #fff;
    border: none;
    font-size: 30px;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.banner-arrow:hover { background: rgba(0,0,0,0.72); }
.banner-prev { left: 10px; }
.banner-next { right: 10px; }

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    border: none;
    cursor: pointer;
    transition: background 0.2s, width 0.2s;
    padding: 0;
}

.banner-dot.active {
    background: #fff;
    width: 22px;
    border-radius: 4px;
}

.home-banner-cat {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--accent-orange);
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.home-banner-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    width: 100%;
}

.home-banner-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: var(--accent-orange);
    background: transparent;
    border: 1px solid var(--accent-orange);
    border-radius: 10px;
    padding: 1px 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.home-banner-tag:hover {
    background: var(--accent-orange);
    color: #fff;
    text-decoration: none;
}

@media (min-width: 768px) {
    .banner-slide-img {
        height: 480px;
    }

    .banner-slide-meta {
        padding: 60px 20px 16px;
    }

    .home-banner-title {
        font-size: 22px;
        -webkit-line-clamp: 2;
    }

    .banner-arrow {
        width: 50px;
        height: 50px;
        font-size: 36px;
    }

    .banner-dots {
        bottom: 14px;
    }
}

@media (min-width: 1200px) {
    .banner-slide-img {
        height: 540px;
    }
}

/* ── Category / feed section headers ──────────────────────────────── */
.feed-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 8px;
    border-bottom: 2px solid var(--accent-orange);
    margin-top: 24px;
    margin-bottom: 4px;
}

.feed-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.feed-section-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-orange);
    text-decoration: none;
}

.feed-section-more:hover {
    text-decoration: underline;
}

.news-thumb .play-btn-overlay {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.video-duration {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 2px;
}

/* No News Message */
.no-news-message {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 0;
}

.retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--primary-color, #e53e3e);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.retry-btn:hover {
    opacity: 0.85;
}

/* ============================================================================
   SECTION STYLES
   ============================================================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 8px;
    border-bottom: 2px solid var(--accent-orange);
    margin: 20px 0 12px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.all-news-btn {
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.all-news-btn:hover {
    background: var(--accent-orange);
    color: white;
}

/* ============================================================================
   CATEGORIES GRID
   ============================================================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 20px 0 32px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.category-card-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4), transparent);
    padding: 20px 12px 12px;
}

.category-card-title {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ============================================================================
   FOOTER STYLES
   ============================================================================ */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 24px 16px;
    margin-top: 40px;
}

.footer-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 12px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.footer-row a {
    color: var(--accent-blue);
    text-decoration: underline;
}

.footer-divider {
    color: var(--text-muted);
}

.footer-copyright {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* ============================================================================
   LOADING & ERROR STYLES
   ============================================================================ */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

[data-theme="light"] #loading-overlay {
    background: rgba(255, 255, 255, 0.9);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner-ring {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 152, 0, 0.2);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 65px;
    height: 65px;
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    width: 80px;
    height: 80px;
    animation-delay: 0.4s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 16px;
    margin-top: 10px;
}

.error-alert {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: calc(100% - 40px);
    background: var(--bg-secondary);
    border-left: 5px solid #ff6b6b;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    padding: 0;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.error-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 16px 20px;
}

.error-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.error-text {
    flex: 1;
}

.error-text strong {
    display: block;
    color: #ff6b6b;
    font-size: 16px;
    margin-bottom: 6px;
}

.error-text p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.error-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.error-close:hover {
    color: #ff6b6b;
}

/* ============================================================================
   CATEGORY NAVIGATION (STICKY TABS)
   ============================================================================ */
.category-nav {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 60px;
    z-index: 100;
    width: 100%;
}

.category-nav-container {
    display: flex;
    align-items: flex-start;
    width: 100%;
    position: relative;
    margin: 0 auto;
    max-width: 1280px;
    padding: 0 20px;
}

.category-nav ul {
    display: flex;
    list-style: none;
    width: 100%;
    overflow-x: auto;
    padding: 10px 0;
    margin: 0;
}

.category-nav ul li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-nav ul li a {
    color: var(--text-primary);
    display: inline-block;
    padding: 10px 16px;
    transition: color 0.3s;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.category-nav ul li a:hover {
    color: var(--accent-orange);
}

.category-nav ul li a.active {
    border-bottom: 3px solid var(--accent-orange);
    color: var(--accent-orange);
    font-weight: 600;
}

/* ============================================================================
   LEFT NAVIGATION ITEMS (SIDEBAR)
   ============================================================================ */
.left-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    height: 44px;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
}

.left-nav-item:hover {
    background: var(--card-hover);
    border-left-color: var(--accent-red);
}

.left-nav-item.active {
    background: var(--card-hover);
    border-left-color: var(--accent-red);
    font-weight: 700;
}

.left-nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--sidebar-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.live-badge {
    background: var(--accent-red);
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: auto;
    font-weight: 700;
    flex-shrink: 0;
}

.left-nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.sidebar-section-label {
    font-size: 11px;
    color: var(--text-muted);
    padding: 8px 16px;
    font-weight: 600;
    text-transform: uppercase;
}

.state-links {
    display: flex;
    flex-wrap: wrap;
    padding: 8px 16px;
    gap: 8px;
}

.state-link {
    font-size: 12px;
    color: var(--text-muted);
    padding: 2px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.state-link:hover {
    color: var(--accent-orange);
}

/* ============================================================================
   APP DOWNLOAD SECTION
   ============================================================================ */
.app-download-section {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.app-download-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.app-badge {
    width: 100%;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.app-badge.google {
    background: #34A853;
    color: white;
}

.app-badge.google:hover {
    opacity: 0.9;
}

.app-badge.apple {
    background: #000;
    color: white;
}

.app-badge.apple:hover {
    opacity: 0.9;
}

/* ============================================================================
   SOCIAL ICONS
   ============================================================================ */
.social-icons {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    justify-content: center;
    border-top: 1px solid var(--border-color);
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.social-icon.fb {
    background: #1877F2;
    color: white;
}

.social-icon.fb:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

.social-icon.tw {
    background: #000;
    color: white;
}

.social-icon.tw:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

.social-icon.ig {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.social-icon.ig:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

.social-icon.yt {
    background: #FF0000;
    color: white;
}

.social-icon.yt:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */
@media (max-width: 768px) {

    /* ── Bottom navigation bar ── */
    .header-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        background: var(--header-bg);
        border-top: 2px solid var(--border-color);
        justify-content: space-around;
        padding: 6px 0 max(6px, env(safe-area-inset-bottom));
        gap: 0;
        box-shadow: 0 -2px 10px var(--shadow);
        flex: unset;
    }

    .header-nav .header-nav-item {
        flex-direction: column;
        gap: 3px;
        font-size: 10px;
        font-weight: 600;
        padding: 4px 8px;
        flex: 1;
        justify-content: center;
        text-align: center;
        border-radius: 0;
    }

    .header-nav .header-nav-item i {
        font-size: 20px;
    }

    .header-nav .header-nav-item.active {
        color: var(--accent-orange);
        background: transparent;
    }

    /* ── Hamburger hidden (removed) ── */
    .hamburger-btn {
        display: none;
    }

    /* ── Category scroll strip: mobile only ── */
    .category-scroll-bar {
        display: flex;
    }

    /* ── Body bottom padding to clear fixed bottom nav ── */
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }

    /* ── Grid / layout ── */
    .main-grid {
        grid-template-columns: 1fr;
    }

    .left-sidebar {
        position: fixed;
        left: -220px;
        top: 100px;
        width: 220px;
        height: calc(100vh - 100px);
        z-index: 50;
        transition: left 0.3s;
    }

    .left-sidebar.open {
        left: 0;
    }

    .right-sidebar {
        display: none;
    }

    /* ── Card tweaks ── */
    .news-feed {
        padding: 12px;
    }

    .news-thumb {
        width: 80px;
        height: 60px;
    }

    .news-title {
        font-size: 14px;
    }

    .section-title {
        font-size: 15px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
        margin: 16px 0 24px 0;
        padding: 12px;
    }

    .category-card {
        height: 160px;
    }

    .category-card-title {
        font-size: 13px;
    }
}