/* =========================================================
   NewsTRP - Advanced Google News Clone Stylesheet
   Typography: Outfit & Comic Sans MS
   Icons: Google Material Symbols Outlined
   Color Palette: Pure Vibrant Solids (STRICTLY NO GRADIENTS)
   Responsive: Mobile / Android First & Desktop
   ========================================================= */

@import url('../fonts/fonts.css');

:root {
    /* Pure Solid Primary Colors (NO GRADIENTS) */
    --google-blue: #1a73e8;
    --google-red: #ea4335;
    --google-yellow: #fbbc04;
    --google-green: #34a853;
    
    /* Vibrant Solid Accent Palette */
    --solid-purple: #7c3aed;
    --solid-orange: #ea580c;
    --solid-teal: #0d9488;
    --solid-pink: #e11d48;
    --solid-emerald: #059669;
    --solid-indigo: #4f46e5;
    --solid-cyan: #0891b2;
    --solid-amber: #d97706;

    /* Solid Neutral Canvas (Ultra High Contrast Light Mode) */
    --bg-main: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #e2e8f0;
    --text-primary: #0f172a;    /* Crisp Deep Obsidian / Pure Readability */
    --text-secondary: #1e293b;  /* High Contrast Slate */
    --text-muted: #475569;      /* Clear Readable Meta */
    --border-color: #cbd5e1;    /* Defined Crisp Borders */
    --border-strong: #94a3b8;

    /* Typography */
    --font-outfit: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-comics: 'Comic Sans MS', 'Comic Neue', cursive, sans-serif;

    /* Sizing & Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    --header-height: 64px;
}

/* Dark Mode Theme (Pure Solid Darks - NO GRADIENTS) */
body.dark-mode {
    --bg-main: #0b0f19;
    --bg-surface: #111827;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --border-strong: #475569;
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-outfit);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
}

/* Google Material Symbols (Fixed Alignment & Flex Center) */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
    flex-shrink: 0;
    user-select: none;
}

/* Comic Accent Styles */
.font-comic {
    font-family: var(--font-comics) !important;
}

/* Solid Utility Classes */
.bg-blue { background-color: var(--google-blue) !important; color: #ffffff !important; }
.bg-red { background-color: var(--google-red) !important; color: #ffffff !important; }
.bg-yellow { background-color: var(--google-yellow) !important; color: #000000 !important; }
.bg-green { background-color: var(--google-green) !important; color: #ffffff !important; }
.bg-purple { background-color: var(--solid-purple) !important; color: #ffffff !important; }
.bg-orange { background-color: var(--solid-orange) !important; color: #ffffff !important; }
.bg-teal { background-color: var(--solid-teal) !important; color: #ffffff !important; }
.bg-pink { background-color: var(--solid-pink) !important; color: #ffffff !important; }
.bg-emerald { background-color: var(--solid-emerald) !important; color: #ffffff !important; }

.c-blue { color: var(--google-blue) !important; }
.c-red { color: var(--google-red) !important; }
.c-yellow { color: var(--google-yellow) !important; }
.c-green { color: var(--google-green) !important; }

/* =========================================================
   Solid Badges & Contrast Rules (NO FONT COLOR CLASH)
   ========================================================= */
.badge-solid {
    font-family: var(--font-comics);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* Light / Yellow background contrast override (Pure Black text on Yellow) */
.badge-solid[style*="#fbbc04"],
.badge-solid[style*="rgb(251, 188, 4)"],
.badge-solid[style*="rgb(251,188,4)"],
.badge-solid[style*="yellow"],
.badge-solid.bg-yellow {
    color: #0f172a !important;
    text-shadow: none !important;
}

.source-badge {
    font-family: var(--font-comics);
    font-size: 11px;
    font-weight: 800;
    padding: 2.5px 8px;
    border-radius: var(--radius-sm);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.source-badge[style*="#fbbc04"],
.source-badge[style*="rgb(251, 188, 4)"],
.source-badge[style*="rgb(251,188,4)"],
.source-badge[style*="yellow"] {
    color: #0f172a !important;
    text-shadow: none !important;
}

/* Source / Publisher Logos */
.source-logo-img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: contain;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.source-logo-sm {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.source-logo-lg {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    padding: 2px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Solid Buttons (Pure Solid, Zero Gradients, High Contrast Typography) */
.btn-solid {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.1s;
    line-height: 1.3;
}

.btn-solid:hover {
    opacity: 0.92;
}

.btn-solid:active {
    transform: translateY(1px);
}

.btn-blue { background-color: var(--google-blue) !important; color: #ffffff !important; }
.btn-red { background-color: var(--google-red) !important; color: #ffffff !important; }
.btn-yellow { background-color: var(--google-yellow) !important; color: #0f172a !important; }
.btn-green { background-color: var(--google-green) !important; color: #ffffff !important; }
.btn-purple { background-color: var(--solid-purple) !important; color: #ffffff !important; }
.btn-orange { background-color: var(--solid-orange) !important; color: #ffffff !important; }
.btn-dark { background-color: #0f172a !important; color: #ffffff !important; }

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* =========================================================
   Top Bar / Google News Header
   ========================================================= */
.top-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(8px, 2vw, 32px);
    gap: clamp(6px, 1.2vw, 16px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-toggle-btn {
    display: none;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    user-select: none;
    flex-shrink: 0;
}

.brand-icon {
    font-size: 26px;
    color: var(--google-blue);
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.4px;
    white-space: nowrap;
}

.brand-badge {
    font-family: var(--font-comics);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--google-red);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Centered Google-style Search Bar - Fluid Stretch & Safe Shrink */
.header-search {
    flex: 1 1 120px;
    min-width: 44px;
    max-width: 760px;
    margin: 0 clamp(4px, 1vw, 14px);
    transition: max-width 0.2s ease;
}

.search-form {
    display: flex;
    align-items: center;
    background-color: var(--bg-main);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    padding: 4px 14px;
    height: 42px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.search-form:focus-within {
    border-color: var(--google-blue);
    background-color: var(--bg-surface);
    box-shadow: 0 1px 3px rgba(60,64,67,0.15), 0 2px 8px 4px rgba(60,64,67,0.1);
}

.search-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
    margin-right: 8px;
    flex-shrink: 0;
}

.search-icon-btn:hover {
    color: var(--google-blue);
}

.search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    font-family: var(--font-main);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.search-clear-btn {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.search-clear-btn:hover {
    color: var(--text-primary);
}

/* Header Tools & Actions */
.header-right {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.8vw, 10px);
    flex-shrink: 0;
    position: relative;
}

.weather-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    height: 38px;
    box-sizing: border-box;
}

.weather-chip:hover {
    background-color: var(--bg-hover);
}

.weather-chip .material-symbols-outlined {
    font-size: 18px;
    color: var(--google-yellow);
}

.weather-chip .weather-city {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
    padding: 0;
    box-sizing: border-box;
}

.header-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-strong);
}

.header-btn.active {
    background-color: #e8f0fe;
    color: var(--google-blue);
    border-color: #c2e7ff;
}

body.dark-mode .header-btn.active {
    background-color: #1e3a8a;
    color: #93c5fd;
    border-color: #1d4ed8;
}

.admin-link-btn:hover {
    color: var(--solid-purple);
}

/* =========================================================
   Breaking News Alert Banner
   ========================================================= */
.breaking-banner {
    background-color: var(--google-red);
    color: #ffffff;
    padding: 8px 20px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.breaking-content {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.breaking-tag {
    font-family: var(--font-comics);
    background-color: #ffffff;
    color: var(--google-red);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.breaking-text {
    flex: 1;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.breaking-link {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 700;
    font-size: 12.5px;
    flex-shrink: 0;
}

/* =========================================================
   Google News Sticky Category Navigation Bar (Slide Controller)
   ========================================================= */
.category-nav-bar {
    position: sticky;
    top: 64px;
    z-index: 990;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    width: 100%;
}

.category-nav-wrapper {
    position: relative;
    max-width: 1560px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 clamp(8px, 1.8vw, 24px);
    width: 100%;
    box-sizing: border-box;
}

/* Edge Fade Gradients */
.category-nav-wrapper::before,
.category-nav-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 4;
    transition: opacity 0.25s ease;
}

.category-nav-wrapper::before {
    left: clamp(40px, 4vw, 54px);
    background: linear-gradient(to right, var(--bg-surface), transparent);
    opacity: 0;
}

.category-nav-wrapper.has-scroll-left::before {
    opacity: 1;
}

.category-nav-wrapper::after {
    right: clamp(40px, 4vw, 54px);
    background: linear-gradient(to left, var(--bg-surface), transparent);
    opacity: 1;
}

.category-nav-wrapper.at-scroll-end::after {
    opacity: 0;
}

/* Slide Chevron Navigation Buttons */
.cat-nav-scroll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    flex-shrink: 0;
    z-index: 6;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-nav-scroll-btn:hover {
    background-color: var(--bg-hover);
    color: var(--google-blue);
    border-color: var(--google-blue);
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.2);
}

.cat-nav-scroll-btn:active {
    transform: scale(0.94);
}

.cat-nav-scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.category-nav-inner {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    white-space: nowrap;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    -webkit-overflow-scrolling: touch;
    padding: 0 8px;
}

.category-nav-inner::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}

.cat-tab:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
    border-radius: 6px 6px 0 0;
}

.cat-tab.active {
    color: var(--google-blue);
    font-weight: 700;
    border-bottom: 3px solid var(--google-blue);
    background-color: transparent;
}

body.dark-mode .cat-tab.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.cat-tab .tab-icon {
    font-size: 18px;
}

.cat-nav-divider {
    width: 1px;
    height: 20px;
    background-color: var(--border-strong);
    margin: 0 8px;
    flex-shrink: 0;
}

.cat-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* =========================================================
   Full-Page Spacious Layout Containers (Stretch to all Screen Sizes)
   ========================================================= */
.google-news-wrapper,
.app-container {
    max-width: 1560px;
    margin: 0 auto;
    padding: 24px clamp(16px, 2.8vw, 40px) 64px;
    width: 100%;
    box-sizing: border-box;
    transition: max-width 0.2s ease;
}

.center-feed {
    width: 100%;
    min-width: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(16px, 2vw, 24px);
    gap: 12px;
    flex-wrap: wrap;
}

.section-title {
    font-size: clamp(20px, 2.2vw, 25px);
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Fluid responsive news grid stretching across all resolutions */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
    gap: clamp(16px, 1.8vw, 24px);
}

/* =========================================================
   Google News Home Feed UI/UX
   ========================================================= */

/* Briefing Top Header */
.briefing-top-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.briefing-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.briefing-main-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.dynamic-greeting-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.greeting-icon {
    font-size: 28px;
    color: #f59e0b;
    vertical-align: middle;
    transition: color 0.3s ease;
}

.greeting-user-name {
    color: var(--google-blue);
}

.briefing-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.briefing-date {
    font-weight: 600;
    color: var(--text-secondary);
}

.briefing-dot {
    color: var(--border-strong);
}

.briefing-time {
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.briefing-tz-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background-color: var(--border-color);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

/* Hero Briefing Broadcasts Deck */
.briefing-broadcasts-deck {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 8px;
    width: 100%;
}

.hero-broadcast-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}

.hero-broadcast-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.broadcast-body-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 240px;
}

.broadcast-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(26, 115, 232, 0.1);
    color: var(--google-blue);
    flex-shrink: 0;
}

.broadcast-icon-wrap .material-symbols-outlined {
    font-size: 22px;
}

.broadcast-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.broadcast-headline-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.broadcast-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--google-blue);
}

.broadcast-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.broadcast-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.broadcast-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.broadcast-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--google-blue);
    color: #ffffff !important;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.broadcast-cta-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.broadcast-dismiss-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.broadcast-dismiss-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Color theme variations */
.hero-broadcast-card.theme-blue .broadcast-badge,
.hero-broadcast-card.theme-blue .broadcast-cta-btn {
    background: #1a73e8;
}
.hero-broadcast-card.theme-blue .broadcast-icon-wrap {
    background: rgba(26, 115, 232, 0.1);
    color: #1a73e8;
}

.hero-broadcast-card.theme-emerald .broadcast-badge,
.hero-broadcast-card.theme-emerald .broadcast-cta-btn {
    background: #10b981;
}
.hero-broadcast-card.theme-emerald .broadcast-icon-wrap {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.hero-broadcast-card.theme-amber .broadcast-badge,
.hero-broadcast-card.theme-amber .broadcast-cta-btn {
    background: #d97706;
}
.hero-broadcast-card.theme-amber .broadcast-icon-wrap {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.hero-broadcast-card.theme-rose .broadcast-badge,
.hero-broadcast-card.theme-rose .broadcast-cta-btn {
    background: #e11d48;
}
.hero-broadcast-card.theme-rose .broadcast-icon-wrap {
    background: rgba(244, 63, 94, 0.1);
    color: #e11d48;
}

.hero-broadcast-card.theme-purple .broadcast-badge,
.hero-broadcast-card.theme-purple .broadcast-cta-btn {
    background: #7c3aed;
}
.hero-broadcast-card.theme-purple .broadcast-icon-wrap {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.hero-broadcast-card.theme-dark .broadcast-badge,
.hero-broadcast-card.theme-dark .broadcast-cta-btn {
    background: #1e293b;
}
.hero-broadcast-card.theme-dark .broadcast-icon-wrap {
    background: rgba(51, 65, 85, 0.15);
    color: #334155;
}

/* Dark mode adjustments */
body.dark-mode .hero-broadcast-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
body.dark-mode .broadcast-title {
    color: #f8fafc;
}
body.dark-mode .broadcast-desc {
    color: #94a3b8;
}
body.dark-mode .briefing-tz-badge {
    background-color: #334155;
    color: #cbd5e1;
}

@media (max-width: 768px) {
    .hero-broadcast-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .broadcast-actions-right {
        width: 100%;
        justify-content: space-between;
    }
}


/* Integrated Header Weather Capsule */
.briefing-weather-capsule {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.capsule-icon-wrap {
    color: var(--google-yellow);
    display: flex;
    align-items: center;
}

.capsule-weather-icon {
    font-size: 32px;
}

.capsule-temp-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.capsule-temp {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.capsule-city {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.capsule-condition {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Google News 2-Column Main Layout (Compact & Dense) */
.gn-main-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 24px;
}

.gn-primary-stream {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gn-secondary-stream {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Hallmark Google News Lead Hero Card */
.gn-lead-card,
.gn-news-card.gn-card-hero {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.gn-lead-card:hover,
.gn-news-card.gn-card-hero:hover {
    border-color: var(--google-blue);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.gn-lead-body {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    padding: 22px 24px;
}

.gn-lead-thumb-wrap {
    width: 100%;
    height: 100%;
    min-height: 180px;
    max-height: 225px;
    border-radius: var(--radius-md, 10px);
    overflow: hidden;
    background-color: var(--bg-hover);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gn-lead-thumb-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

.gn-lead-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1);
}

.gn-news-card.gn-card-hero:hover .gn-lead-thumb-wrap img {
    transform: scale(1.04);
}

.gn-lead-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gn-source-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.gn-source-favicon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: contain;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.gn-source-favicon.sm {
    width: 14px;
    height: 14px;
}

.gn-source-favicon.md {
    width: 22px;
    height: 22px;
}

.gn-source-name {
    font-weight: 700;
    color: var(--text-primary);
}

.gn-dot {
    color: var(--text-muted);
}

.gn-time {
    color: var(--text-muted);
    font-size: 12px;
}

.gn-cat-pill {
    font-family: var(--font-comics);
    font-size: 10.5px;
    font-weight: 800;
    padding: 1.5px 7px;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 0.3px;
    display: inline-block;
}

.gn-lead-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.gn-lead-title a {
    color: inherit;
    text-decoration: none;
}

.gn-lead-title a:hover {
    color: var(--google-blue);
    text-decoration: underline;
}

.gn-lead-snippet {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gn-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.gn-coverage-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background-color: #e8f0fe;
    color: var(--google-blue);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #c2e7ff;
    transition: all 0.15s ease;
}

.gn-coverage-btn:hover {
    background-color: #d2e3fc;
}

body.dark-mode .gn-coverage-btn {
    background-color: #1e3a8a;
    color: #93c5fd;
    border-color: #1d4ed8;
}

/* Full Coverage Header Banner (Light & Dark Theme Harmonious) */
.full-coverage-banner {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.full-coverage-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.full-coverage-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background-color: #e8f0fe;
    color: var(--google-blue);
    border: 1px solid #c2e7ff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-comics);
}

.full-coverage-tag .material-symbols-outlined {
    font-size: 17px;
}

body.dark-mode .full-coverage-tag {
    background-color: #1e3a8a;
    color: #93c5fd;
    border-color: #1d4ed8;
}

.full-coverage-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.full-coverage-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.gn-action-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gn-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gn-icon-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.gn-icon-btn.active {
    color: var(--google-blue);
}

.gn-icon-btn .material-symbols-outlined {
    font-size: 18px;
}

.gn-lead-thumb-wrap {
    width: 100%;
    height: 155px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-hover);
}

.gn-lead-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.gn-lead-card:hover .gn-lead-thumb-wrap img {
    transform: scale(1.02);
}

/* =========================================================
   Hero Section 4-Grid News Style (Compact & Clean)
   ========================================================= */
.gn-hero-subgrid-section {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-main);
    padding: 12px 14px 12px;
    transition: background-color 0.2s ease;
}

/* 4-Grid Layout inside Hero Section */
.gn-hero-subgrid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Compact Individual Grid Card */
.gn-hero-grid-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
    height: 100%;
}

.gn-hero-grid-card:hover {
    transform: translateY(-2px);
    border-color: var(--google-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Small Compact News Image */
.gn-hero-grid-media {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    background-color: var(--bg-hover);
}

.gn-hero-grid-img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.gn-hero-grid-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1);
}

.gn-hero-grid-card:hover .gn-hero-grid-media img {
    transform: scale(1.06);
}

.gn-hero-grid-cat-pill {
    position: absolute;
    bottom: 4px;
    left: 4px;
    font-size: 8.5px;
    font-weight: 800;
    color: #ffffff;
    padding: 1.5px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    pointer-events: none;
    font-family: var(--font-comics, inherit);
}

/* Compact Content */
.gn-hero-grid-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 7px 8px 6px;
}

.gn-hero-grid-content .gn-source-row {
    margin-bottom: 2px;
    font-size: 10.5px;
    gap: 4px;
}

.gn-hero-grid-content .gn-source-favicon {
    width: 13px;
    height: 13px;
}

.gn-hero-grid-headline {
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
    margin: 1px 0 6px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gn-hero-grid-headline a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.gn-hero-grid-headline a:hover {
    color: var(--google-blue);
    text-decoration: underline;
}

/* Properly Placed Full Coverage Button & Quick Actions Pinned to Bottom */
.gn-hero-grid-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: auto;
    padding-top: 5px;
    border-top: 1px solid var(--border-color);
}

.gn-hero-grid-coverage-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2.5px 7px;
    border-radius: var(--radius-full, 9999px);
    background-color: #e8f0fe;
    color: var(--google-blue);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #c2e7ff;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.gn-hero-grid-coverage-btn .material-symbols-outlined {
    font-size: 11px;
}

.gn-hero-grid-coverage-btn:hover {
    background-color: #d2e3fc;
    border-color: #a8c7fa;
}

.gn-hero-grid-actions .gn-icon-btn {
    width: 22px;
    height: 22px;
}

.gn-hero-grid-actions .gn-icon-btn .material-symbols-outlined {
    font-size: 13px !important;
}

body.dark-mode .gn-hero-grid-card {
    background-color: var(--bg-surface);
}

body.dark-mode .gn-hero-grid-coverage-btn {
    background-color: #1e3a8a;
    color: #93c5fd;
    border-color: #1d4ed8;
}

body.dark-mode .gn-hero-grid-coverage-btn:hover {
    background-color: #2563eb;
    color: #ffffff;
}

@media (max-width: 1040px) {
    .gn-hero-subgrid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 680px) {
    .gn-lead-body {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    .gn-lead-thumb-wrap {
        order: -1;
        min-height: 180px;
        height: 190px;
    }
}

@media (max-width: 540px) {
    .gn-hero-subgrid-4 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .gn-hero-subgrid-section {
        padding: 10px 10px;
    }
}

/* Section Header in Core Stream */
.gn-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.gn-section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================================
   Universal Modular News Cards (Grid, Box, List, Compact, Popup, Hero)
   Fully responsive across Mobile (320px+), Tablet, Desktop & Ultra-wide
   ========================================================= */
.gn-news-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.gn-news-card:hover {
    border-color: var(--google-blue);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

body.dark-mode .gn-news-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border-color: #8ab4f8;
}

/* Top Stories Briefing Grid (2 Columns, perfectly aligned with right sidebar at row 3) */
.gn-briefing-top-stories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 680px) {
    .gn-briefing-top-stories-grid {
        grid-template-columns: 1fr;
    }
}

/* Full-Width 4-Column News Cards Grid (Top Stories Extended & Category Shelves) */
.gn-top-stories-extended-section {
    margin-top: 24px;
    margin-bottom: 24px;
}

.gn-cards-grid-4col,
.gn-shelf-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 1000px) {
    .gn-cards-grid-4col,
    .gn-shelf-grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gn-cards-grid-4col,
    .gn-shelf-grid-4col {
        grid-template-columns: 1fr;
    }
}

/* Legacy & Adaptive Headline Cards Grid */
.gn-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 10px;
}

/* 1. GRID VARIANT (Standard Box Card) */
.gn-news-card.gn-card-grid,
.gn-story-card {
    padding: 11px 13px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.gn-card-top {
    margin-bottom: 6px;
}

.gn-card-body-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.gn-card-text {
    flex: 1;
    min-width: 0;
}

.gn-story-title {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.gn-story-title a {
    color: inherit;
    text-decoration: none;
}

.gn-story-title a:hover {
    color: var(--google-blue);
    text-decoration: underline;
}

.gn-story-snippet {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gn-card-thumb {
    width: 72px;
    height: 58px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--bg-hover);
    flex-shrink: 0;
}

.gn-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. BOX VARIANT (Featured Media Card) */
.gn-news-card.gn-card-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.gn-box-media {
    position: relative;
    width: 100%;
    height: 150px;
    background-color: var(--bg-hover);
    overflow: hidden;
}

.gn-box-media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.gn-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.gn-news-card.gn-card-box:hover .gn-box-media img {
    transform: scale(1.03);
}

.gn-box-badges {
    position: absolute;
    bottom: 8px;
    left: 10px;
    z-index: 2;
    display: flex;
    gap: 6px;
}

.gn-box-content {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.gn-box-title {
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.35;
    margin: 4px 0 6px;
    color: var(--text-primary);
}

.gn-box-title a {
    color: inherit;
    text-decoration: none;
}

.gn-box-title a:hover {
    color: var(--google-blue);
    text-decoration: underline;
}

.gn-box-snippet {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 3. LIST VARIANT (Horizontal Stream Strip) */
.gn-news-card.gn-card-list {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    min-width: 0;
}

.gn-list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gn-list-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin: 4px 0 6px;
    color: var(--text-primary);
}

.gn-list-title a {
    color: inherit;
    text-decoration: none;
}

.gn-list-title a:hover {
    color: var(--google-blue);
    text-decoration: underline;
}

.gn-list-snippet {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gn-list-thumb {
    width: 105px;
    height: 82px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--bg-hover);
    flex-shrink: 0;
}

.gn-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 4. COMPACT & POPUP RELATED VARIANT */
.gn-news-card.gn-card-compact,
.modal-related-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    text-decoration: none;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    min-width: 0;
}

.gn-news-card.gn-card-compact:hover,
.modal-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border-color: var(--google-blue);
}

.modal-related-card-content,
.gn-compact-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-related-meta,
.gn-compact-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.modal-related-title,
.gn-compact-title {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-related-card:hover .modal-related-title,
.gn-news-card.gn-card-compact:hover .gn-compact-title {
    color: var(--google-blue);
}

.modal-related-thumb,
.gn-compact-thumb {
    width: 62px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    background-color: var(--bg-main);
}

/* Google News Nested Perspectives inside Story Cards */
.gn-card-perspectives {
    margin-top: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gn-perspectives-header {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--google-blue);
}

.gn-perspectives-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gn-card-perspective-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
}

.gn-card-perspective-source {
    font-weight: 700;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.gn-card-perspective-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 1;
}

.gn-card-perspective-link:hover {
    color: var(--google-blue);
    text-decoration: underline;
}

.gn-card-perspective-time {
    font-size: 10.5px;
    color: var(--text-muted);
    white-space: nowrap;
}

.gn-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
    margin-top: 6px;
}

.gn-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gn-mini-coverage-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--google-blue);
    text-decoration: none;
}

.gn-mini-coverage-link .material-symbols-outlined {
    font-size: 14px;
}

.gn-mini-coverage-link:hover {
    text-decoration: underline;
}

/* Secondary Stream Cards (Trending, Publishers, Newsletter) */
.gn-side-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.gn-side-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border-color);
}

.gn-side-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.gn-badge-pill {
    font-family: var(--font-comics);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--google-red);
    color: #ffffff;
}

.gn-view-all-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--google-blue);
    text-decoration: none;
}

.gn-view-all-link:hover {
    text-decoration: underline;
}

/* Trending List */
.gn-trending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gn-trending-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}

.gn-trending-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.gn-trending-rank {
    font-size: 18px;
    font-weight: 900;
    color: var(--border-strong);
    width: 20px;
    line-height: 1;
    text-align: center;
}

.gn-trending-content {
    flex: 1;
}

.gn-trending-link {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.4;
    display: block;
}

.gn-trending-link:hover {
    color: var(--google-blue);
}

/* Publishers List */
.gn-publishers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gn-publisher-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
    text-decoration: none;
    transition: background 0.15s ease;
}

.gn-publisher-row:hover {
    background-color: var(--bg-hover);
}

.gn-publisher-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gn-publisher-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
}

.gn-reliability-score {
    font-family: var(--font-comics);
    font-size: 11px;
    font-weight: 800;
    color: var(--google-green);
}

/* Newsletter Card */
.gn-newsletter-card {
    background-color: var(--bg-surface);
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    text-align: center;
    margin-top: auto;
}

.gn-nl-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #e8f0fe;
    color: var(--google-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

body.dark-mode .gn-nl-icon-wrap {
    background-color: #1e3a8a;
    color: #93c5fd;
}

.gn-nl-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.gn-nl-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

.gn-nl-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gn-nl-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.gn-nl-input:focus {
    border-color: var(--google-blue);
}

.gn-nl-btn {
    width: 100%;
    padding: 9px 14px;
    background-color: var(--google-blue);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.gn-nl-btn:hover {
    opacity: 0.92;
}

/* =========================================================
   Google News Category Topic Shelves (Dense 3-4 Rows Per Category)
   ========================================================= */
.gn-shelves-section {
    margin-top: 24px;
    border-top: 2px solid var(--border-color);
    padding-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gn-category-shelf {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gn-category-shelf:hover {
    border-color: rgba(26, 115, 232, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.gn-shelf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    flex-wrap: wrap;
}

.gn-shelf-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gn-shelf-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gn-shelf-icon-badge .material-symbols-outlined {
    font-size: 20px;
}

.gn-shelf-title {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.2px;
}

.gn-shelf-count-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    background-color: var(--bg-main);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.gn-shelf-more-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--google-blue);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 9999px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    transition: all 0.15s ease;
}

.gn-shelf-more-link:hover {
    background-color: var(--bg-hover);
    color: var(--google-blue);
    border-color: var(--google-blue);
}

/* Category Grid: 4 columns, 3-4 full rows of cards with zero gaps */
.gn-shelf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 1000px) {
    .gn-shelf-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gn-shelf-grid {
        grid-template-columns: 1fr;
    }
    .gn-shelf-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Empty feed card */
.empty-feed-card {
    text-align: center;
    padding: 56px 24px;
    background-color: var(--bg-surface);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.empty-icon {
    font-size: 56px;
    color: var(--google-blue);
    margin-bottom: 12px;
}

.empty-feed-card h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.empty-feed-card p {
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

/* Toast alert */
.alert-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 13.5px;
}

.success-toast {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

/* =========================================================
   Standard Cards & Details for Other Pages
   ========================================================= */
.news-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.15s ease;
}

.news-card:hover {
    border-color: var(--google-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.news-card-body {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin: 8px 0 12px;
}

.news-card-text {
    flex: 1;
}

.news-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
}

.news-card-title a:hover {
    color: var(--google-blue);
}

.news-card-thumb {
    width: 96px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-hover);
    flex-shrink: 0;
}

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

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.action-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.action-btn.active {
    background-color: #e8f0fe;
    color: var(--google-blue);
    border-color: #c2e7ff;
}

.coverage-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    background-color: #e8f0fe;
    color: var(--google-blue);
    text-decoration: none;
    border: 1px solid #c2e7ff;
}

body.dark-mode .coverage-pill {
    background-color: #1e3a8a;
    color: #93c5fd;
    border-color: #1d4ed8;
}

/* =========================================================
   Rebuilt Article Reader Page Styles
   ========================================================= */
.article-reader-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

/* Reader Navigation & Breadcrumbs Bar */
.reader-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.reader-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-secondary);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.reader-back-btn:hover {
    background-color: var(--bg-hover);
    color: var(--google-blue);
    border-color: var(--google-blue);
}

.reader-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.breadcrumb-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb-item:hover {
    color: var(--google-blue);
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 14px;
}

.breadcrumb-current {
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Reader Header */
.reader-header {
    margin-bottom: 28px;
}

.reader-tag-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.reader-category-badge {
    font-family: var(--font-comics);
    font-size: 12.5px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.reader-badge-icon {
    font-size: 16px;
}

.reader-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 18px;
    letter-spacing: -0.6px;
}

/* Reader Meta Row */
.reader-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13.5px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.reader-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.reader-source-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.source-logo-img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 2px;
    border: 1px solid var(--border-color);
}

.verified-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--solid-emerald);
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

body.dark-mode .verified-pill {
    background-color: #064e3b;
    border-color: #059669;
    color: #6ee7b7;
}

.meta-separator {
    color: var(--border-strong);
    user-select: none;
}

.reader-author-info,
.reader-time-info,
.reader-read-time,
.reader-views-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.reader-author-info .material-symbols-outlined,
.reader-time-info .material-symbols-outlined,
.reader-read-time .material-symbols-outlined,
.reader-views-count .material-symbols-outlined {
    font-size: 16px;
    color: var(--text-muted);
}

.reader-meta-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Featured Figure */
.reader-featured-figure {
    margin: 24px 0 32px;
}

.reader-featured-img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    background-color: var(--bg-surface);
}

.reader-image-caption {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
    padding: 0 4px;
}

/* Reader Body Typography */
.reader-body {
    font-size: 18px;
    line-height: 1.85;
    color: var(--text-primary);
    margin-bottom: 48px;
}

.reader-lead-summary {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 18.5px;
    color: var(--text-primary);
}

.reader-content-text p {
    margin-bottom: 20px;
}

.reader-content-text strong {
    font-weight: 700;
}

.reader-content-text a {
    color: var(--google-blue);
    text-decoration: underline;
    font-weight: 600;
}

.reader-empty-note {
    font-style: italic;
    color: var(--text-muted);
    background-color: var(--bg-surface);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Reader Publisher Callout Box */
.reader-source-box {
    background-color: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 50px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.reader-source-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reader-source-logo-lg {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 4px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.reader-source-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.reader-source-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.reader-source-subtext {
    font-size: 13px;
    color: var(--text-muted);
}

.reader-site-link {
    color: var(--google-blue);
    font-weight: 600;
    text-decoration: none;
}

.reader-site-link:hover {
    text-decoration: underline;
}

.btn-visit-source {
    background-color: var(--google-blue);
    color: #ffffff;
    padding: 11px 22px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.25);
    flex-shrink: 0;
}

.btn-visit-source:hover {
    background-color: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(26, 115, 232, 0.35);
}

/* Perspectives Section */
.reader-perspectives-section {
    padding-top: 36px;
    border-top: 2px solid var(--border-color);
}

.reader-perspectives-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.perspectives-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.perspectives-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--text-primary);
}

.news-card-inner {
    flex: 1;
}

.news-card-footer-action {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.perspective-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--google-blue);
    text-decoration: none;
}

.perspective-link:hover {
    text-decoration: underline;
}

/* =========================================================
   Interactive Article Preview Popup Modal (Google News Reader Dialog)
   ========================================================= */
.article-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.article-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.article-modal-container {
    width: 100%;
    max-width: 860px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.article-modal-dialog {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-modal-overlay.open .article-modal-dialog {
    transform: translateY(0) scale(1);
}

/* Modal Header Bar */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    flex-shrink: 0;
    gap: 12px;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-category-pill {
    font-family: var(--font-comics);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    background-color: var(--google-blue);
}

.modal-category-pill .material-symbols-outlined {
    font-size: 14px;
}

.modal-read-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.modal-read-time .material-symbols-outlined {
    font-size: 14px;
}


.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.modal-action-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.modal-action-btn:hover {
    background-color: var(--bg-hover);
    color: var(--google-blue);
}

.modal-action-btn.active {
    background-color: #e8f0fe;
    color: var(--google-blue);
    border-color: #c2e7ff;
}

.modal-close-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-left: 4px;
}

.modal-close-btn:hover {
    background-color: #fee2e2;
    color: var(--google-red);
    border-color: #fca5a5;
}

/* Modal Body Scroll Area */
.modal-body-scroll {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    overscroll-behavior: contain;
}

.modal-body-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-body-scroll::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}

/* Modal Content Elements */
.modal-article-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.modal-source-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-source-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid var(--border-color);
}

.modal-source-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.1px;
}

.modal-meta-sep {
    color: var(--border-strong);
}

.modal-author-text,
.modal-date-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.modal-author-text .material-symbols-outlined,
.modal-date-text .material-symbols-outlined {
    font-size: 14px;
    color: var(--text-muted);
}

/* Small Image & Story Overview ("Small image & fit all", single content block) */
.modal-story-overview {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.modal-small-img-wrap {
    flex: 0 0 190px;
    max-width: 190px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-small-img {
    width: 100%;
    height: 125px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
}

.modal-small-img-caption {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-lead-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.modal-lead-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--google-blue);
    margin-bottom: 8px;
}

.modal-lead-eyebrow .material-symbols-outlined {
    font-size: 15px;
}

.modal-story-content {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text-primary);
}

.modal-story-content p {
    margin-bottom: 12px;
}

.modal-story-content p:last-child {
    margin-bottom: 0;
}

/* 4 Related Topic News Cards Section */
.modal-related-section {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}

.modal-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modal-related-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-related-heading {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-related-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background-color: rgba(26, 115, 232, 0.1);
    color: var(--google-blue);
}

.modal-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 650px) {
    .modal-related-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.modal-related-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.modal-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--google-blue);
}

.modal-related-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-related-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.modal-related-source-logo {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    object-fit: contain;
}

.modal-related-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-related-card:hover .modal-related-title {
    color: var(--google-blue);
}

.modal-related-thumb {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    background-color: var(--bg-main);
}

/* Modal Sticky Footer Action Bar */
.modal-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    flex-shrink: 0;
}

.modal-footer-source {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-footer-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 2px;
}

.modal-footer-source-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-footer-timestamp {
    font-size: 11px;
    color: var(--text-muted);
}

.modal-footer-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-btn-see-full {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background-color: var(--google-blue);
    text-decoration: none;
    transition: all 0.15s ease;
}

.modal-btn-see-full:hover {
    background-color: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.modal-btn-see-full .material-symbols-outlined {
    font-size: 16px;
}

.modal-btn-close-footer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-btn-close-footer:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* Modal Skeleton Loading Shimmer */
.modal-loading-skeleton {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skeleton-line,
.skeleton-circle,
.skeleton-small-thumb {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border-color) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-title {
    height: 24px;
    width: 85%;
    border-radius: 6px;
}

.skeleton-title-sub {
    height: 20px;
    width: 65%;
    border-radius: 6px;
}

.skeleton-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
}

.skeleton-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.skeleton-badge {
    width: 70px;
    height: 16px;
    border-radius: 4px;
}

.skeleton-time {
    width: 90px;
    height: 14px;
}

.skeleton-overview-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin: 8px 0;
}

.skeleton-small-thumb {
    width: 190px;
    height: 120px;
    border-radius: 8px;
    flex-shrink: 0;
}

.skeleton-overview-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-p {
    height: 14px;
    width: 100%;
    border-radius: 4px;
}

.skeleton-p.short {
    width: 60%;
}

/* Dark Mode Modal Enhancements */
body.dark-mode .article-modal-dialog {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer-bar {
    background-color: #0d1322;
    border-color: var(--border-color);
}

body.dark-mode .modal-story-overview,
body.dark-mode .modal-related-section {
    background-color: #0d1322;
    border-color: var(--border-color);
}

body.dark-mode .modal-related-card {
    background-color: #1e293b;
    border-color: var(--border-color);
}

body.dark-mode .modal-related-card:hover {
    background-color: #24344d;
    border-color: var(--google-blue);
}

body.dark-mode .modal-action-btn,
body.dark-mode .modal-close-btn,
body.dark-mode .modal-btn-close-footer {
    background-color: #1e293b;
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .modal-action-btn:hover,
body.dark-mode .modal-btn-close-footer:hover {
    background-color: #334155;
}

body.dark-mode .modal-publisher-card {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.12), rgba(52, 168, 83, 0.08));
    border-color: var(--border-color);
}

/* Responsive Breakpoints for Modal */
@media (max-width: 768px) {
    .article-modal-overlay {
        padding: 8px;
        align-items: center;
    }
    .article-modal-container {
        max-width: 100%;
        max-height: 94vh;
    }
    .article-modal-dialog {
        border-radius: 14px;
        max-height: 94vh;
    }
    .modal-body-scroll {
        padding: 14px 16px;
    }
    .modal-article-title {
        font-size: 19px;
    }
    .modal-story-overview {
        flex-direction: column;
        gap: 12px;
        padding: 10px;
    }
    .modal-small-img-wrap {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
    .modal-small-img {
        height: 150px;
    }
    .modal-related-grid {
        grid-template-columns: 1fr;
    }
    .modal-footer-bar {
        padding: 10px 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .modal-footer-buttons {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    .modal-btn-see-full,
    .modal-btn-close-footer {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
}
    .reader-title {
        font-size: 24px;
    }
    .reader-source-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .btn-visit-source {
        width: 100%;
        justify-content: center;
    }
    .reader-nav-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile Off-canvas Drawer */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.mobile-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: var(--bg-surface);
    z-index: 2001;
    box-shadow: 4px 0 16px rgba(0,0,0,0.2);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding: 20px 16px;
    box-sizing: border-box;
}

.mobile-drawer-overlay.open .mobile-drawer {
    transform: translateX(280px);
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}

.nav-link-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link-item.active {
    background-color: #e8f0fe;
    color: var(--google-blue);
    font-weight: 700;
}

body.dark-mode .nav-link-item.active {
    background-color: #1e3a8a;
    color: #93c5fd;
}

/* =========================================================
   Responsive Breakpoints - Perfectly Fitting All Header Icons & Buttons
   ========================================================= */

@media (max-width: 1200px) {
    .weather-chip .weather-city {
        display: none !important;
    }
    .pill-label {
        max-width: 80px;
    }
    .header-search {
        max-width: 520px;
    }
}

@media (max-width: 1024px) {
    .gn-main-layout {
        grid-template-columns: 1fr;
    }
    .gn-lead-body {
        grid-template-columns: 1fr 240px;
    }
}

@media (max-width: 992px) {
    .top-header {
        height: 58px;
        padding: 0 10px;
        gap: 8px;
    }
    .brand-name {
        font-size: 19px;
    }
    .header-search {
        max-width: 380px;
        margin: 0 4px;
    }
    .search-form {
        height: 38px;
        padding: 2px 10px;
    }
    .search-input {
        font-size: 13px;
    }
    .header-right {
        gap: 5px;
    }
    /* Collapse text & caret on Country and Language selector pills to sleek circular icon buttons */
    .header-select-pill .pill-label,
    .header-select-pill .pill-caret {
        display: none !important;
    }
    .header-select-pill {
        padding: 0 !important;
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        justify-content: center !important;
        border-radius: var(--radius-full) !important;
    }
    .header-btn {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
    }
    .header-btn .material-symbols-outlined {
        font-size: 19px;
    }
    .weather-chip {
        height: 34px !important;
        padding: 4px 8px !important;
        font-size: 12px !important;
        gap: 4px !important;
    }
    .weather-chip .material-symbols-outlined {
        font-size: 17px !important;
    }
    .user-avatar-btn {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
    }
    .user-avatar-initials {
        font-size: 14px !important;
    }
    .btn-header-auth {
        height: 34px !important;
        padding: 5px 11px !important;
        font-size: 12.5px !important;
    }
    .btn-header-auth .auth-icon {
        font-size: 17px !important;
    }
}

@media (max-width: 768px) {
    .mobile-toggle-btn {
        display: none !important;
    }
    .mobile-drawer-overlay {
        display: none !important;
    }
    .top-header {
        height: 54px;
        padding: 0 8px;
        gap: 6px;
    }
    .brand-name {
        font-size: 17px;
    }
    .header-search {
        display: flex;
        flex: 1 1 50px;
        min-width: 44px;
        max-width: none;
        margin: 0 3px;
    }
    .search-form {
        height: 36px;
        padding: 2px 8px;
    }
    .search-input {
        font-size: 12.5px;
    }
    .search-icon-btn {
        margin-right: 4px;
    }
    .search-icon-btn .material-symbols-outlined {
        font-size: 18px;
    }
    /* ALL icons and buttons strictly visible and fitted */
    .header-right {
        display: flex !important;
        gap: 4px !important;
    }
    .header-right .header-dropdown-wrap {
        display: inline-block !important;
    }
    .header-right .header-btn {
        display: flex !important;
        width: 32px !important;
        min-width: 32px !important;
        height: 32px !important;
    }
    .header-right .header-btn .material-symbols-outlined {
        font-size: 18px !important;
    }
    .header-select-pill {
        width: 32px !important;
        min-width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        justify-content: center !important;
    }
    .header-select-pill .material-symbols-outlined {
        font-size: 18px !important;
    }
    .weather-chip {
        height: 32px !important;
        padding: 3px 6px !important;
        font-size: 11.5px !important;
        gap: 3px !important;
    }
    .weather-chip .material-symbols-outlined {
        font-size: 16px !important;
    }
    .weather-chip .weather-city {
        display: none !important;
    }
    .user-avatar-btn {
        width: 32px !important;
        min-width: 32px !important;
        height: 32px !important;
    }
    .user-avatar-initials {
        font-size: 13px !important;
    }
    .btn-header-auth {
        height: 32px !important;
        padding: 4px 8px !important;
        font-size: 12px !important;
        gap: 4px !important;
    }
    .btn-header-auth .auth-icon {
        font-size: 16px !important;
    }

    /* Fixed popup cards guaranteed inside screen bounds on mobile */
    .header-menu-card,
    .user-dropdown-card {
        position: fixed !important;
        top: 56px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        max-width: calc(100vw - 16px) !important;
        margin: 0 auto !important;
        max-height: calc(85vh - 60px) !important;
        overflow-y: auto !important;
        z-index: 1250 !important;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28) !important;
    }

    .briefing-weather-capsule {
        display: none;
    }
    .google-news-wrapper,
    .app-container {
        padding: 12px 12px 64px;
    }
    .gn-lead-body {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 14px;
    }
    .gn-lead-thumb-wrap {
        height: 180px;
        order: -1;
    }
    .gn-lead-title {
        font-size: 18px;
    }
    .gn-cards-grid,
    .news-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .reader-title {
        font-size: 20px;
    }
}

@media (max-width: 540px) {
    .top-header {
        height: 50px;
        padding: 0 6px;
        gap: 4px;
    }
    .brand-name {
        font-size: 16px;
    }
    .header-search {
        min-width: 40px;
        margin: 0 2px;
    }
    .search-form {
        height: 33px;
        padding: 1px 7px;
    }
    .search-input {
        font-size: 12px;
    }
    .header-right {
        gap: 3px !important;
    }
    .header-right .header-btn,
    .header-select-pill,
    .user-avatar-btn {
        width: 30px !important;
        min-width: 30px !important;
        height: 30px !important;
    }
    .header-right .header-btn .material-symbols-outlined,
    .header-select-pill .material-symbols-outlined {
        font-size: 17px !important;
    }
    .weather-chip {
        height: 30px !important;
        padding: 2px 5px !important;
        font-size: 11px !important;
        gap: 2px !important;
    }
    .weather-chip .material-symbols-outlined {
        font-size: 15px !important;
    }
    /* Compact icon-only Sign In button for small screens */
    .btn-header-auth {
        width: 30px !important;
        min-width: 30px !important;
        height: 30px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: var(--radius-full) !important;
    }
    .btn-header-auth .auth-text {
        display: none !important;
    }
    .btn-header-auth .auth-icon {
        font-size: 17px !important;
        margin: 0 !important;
    }

    .header-menu-card,
    .user-dropdown-card {
        top: 52px !important;
        left: 6px !important;
        right: 6px !important;
        max-width: calc(100vw - 12px) !important;
    }
}

@media (max-width: 380px) {
    .top-header {
        height: 46px;
        padding: 0 4px;
        gap: 3px;
    }
    .brand-name {
        font-size: 14.5px;
        letter-spacing: -0.5px;
    }
    .header-search {
        min-width: 34px;
        margin: 0 1px;
    }
    .search-form {
        height: 30px;
        padding: 0 5px;
    }
    .search-input {
        font-size: 11px;
    }
    .search-input::placeholder {
        font-size: 10.5px;
    }
    .search-icon-btn {
        margin-right: 2px;
    }
    .search-icon-btn .material-symbols-outlined {
        font-size: 15px;
    }
    .header-right {
        gap: 2px !important;
    }
    .header-right .header-btn,
    .header-select-pill,
    .user-avatar-btn,
    .btn-header-auth {
        width: 27px !important;
        min-width: 27px !important;
        height: 27px !important;
    }
    .header-right .header-btn .material-symbols-outlined,
    .header-select-pill .material-symbols-outlined,
    .btn-header-auth .auth-icon {
        font-size: 15px !important;
    }
    .weather-chip {
        width: 27px !important;
        min-width: 27px !important;
        height: 27px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: var(--radius-full) !important;
    }
    .weather-chip .weather-temp,
    .weather-chip .weather-city {
        display: none !important;
    }
    .weather-chip .material-symbols-outlined {
        font-size: 15px !important;
    }
    .user-avatar-initials {
        font-size: 11px !important;
    }

    .header-menu-card,
    .user-dropdown-card {
        top: 48px !important;
        left: 4px !important;
        right: 4px !important;
        max-width: calc(100vw - 8px) !important;
    }
}

/* =========================================================
   NewsTRP - User Authentication, Dropdown, Modal & Profile
   ========================================================= */

/* Header Auth Action Buttons (Replaces Gear Icon) */
.header-auth-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-header-auth {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 9999px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
}

.btn-header-signin {
    background-color: var(--google-blue, #1a73e8);
    color: #ffffff;
    border-color: var(--google-blue, #1a73e8);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

body.dark-mode .btn-header-signin {
    background-color: #8ab4f8;
    color: #202124;
    border-color: #8ab4f8;
}

.btn-header-signin:hover {
    background-color: #1557b0;
    border-color: #1557b0;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.35);
}

body.dark-mode .btn-header-signin:hover {
    background-color: #aecbfa;
    border-color: #aecbfa;
    color: #202124;
}

.btn-header-auth .auth-icon {
    font-size: 18px;
}

/* Authenticated User Menu Dropdown */
.user-menu-dropdown-wrapper {
    position: relative;
}

.user-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--google-blue, #1a73e8);
    background-color: var(--google-blue, #1a73e8);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.user-avatar-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.25);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-initials {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
}

.user-dropdown-card {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 290px;
    background-color: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #dadce0);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.16);
    padding: 14px;
    display: none;
    z-index: 1200;
    animation: dropdownFadeIn 0.15s ease-out;
}

body.dark-mode .user-dropdown-card {
    background-color: #202124;
    border-color: #3c4043;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.user-dropdown-card.show {
    display: block;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
}

.user-dropdown-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--google-blue, #1a73e8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.user-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown-info {
    overflow: hidden;
}

.user-dropdown-info .user-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-info .user-email {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-info .user-loc-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--google-blue, #1a73e8);
    margin-top: 3px;
    font-weight: 600;
}

.user-dropdown-divider {
    height: 1px;
    background-color: var(--border-color, #e0e0e0);
    margin: 8px 0;
}

body.dark-mode .user-dropdown-divider {
    background-color: #3c4043;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s ease;
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.user-dropdown-item:hover {
    background-color: var(--bg-hover, rgba(0,0,0,0.05));
}

body.dark-mode .user-dropdown-item:hover {
    background-color: #303134;
}

.user-dropdown-item .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-secondary);
}

/* =========================================================
   Auth Popup Modal (Sign In / Register)
   ========================================================= */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
    overflow-y: auto;
}

.auth-modal-overlay.open {
    display: flex !important;
    z-index: 999999 !important;
}

.auth-modal-container {
    width: 100%;
    max-width: 460px;
    margin: auto;
}

.auth-modal-dialog {
    background-color: var(--bg-card, #ffffff);
    border-radius: 18px;
    border: 1px solid var(--border-color, #dadce0);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode .auth-modal-dialog {
    background-color: #202124;
    border-color: #3c4043;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--border-color, #dadce0);
}

body.dark-mode .auth-modal-header {
    border-color: #3c4043;
}

.auth-modal-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-modal-brand .brand-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-modal-subtitle {
    font-size: 11px;
    font-weight: 700;
    background-color: var(--bg-hover, #f1f3f4);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 6px;
}

body.dark-mode .auth-modal-subtitle {
    background-color: #303134;
}

.auth-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.auth-modal-close:hover {
    background-color: var(--bg-hover, rgba(0,0,0,0.06));
    color: var(--text-primary);
}

/* Modal Navigation Tabs */
.auth-tabs-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--bg-hover, #f8f9fa);
    border-bottom: 1px solid var(--border-color, #dadce0);
}

body.dark-mode .auth-tabs-nav {
    background-color: #171717;
    border-color: #3c4043;
}

.auth-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.auth-tab .tab-ico {
    font-size: 18px;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    color: var(--google-blue, #1a73e8);
    border-bottom-color: var(--google-blue, #1a73e8);
    background-color: var(--bg-card, #ffffff);
}

body.dark-mode .auth-tab.active {
    background-color: #202124;
    color: #8ab4f8;
    border-bottom-color: #8ab4f8;
}

/* Dynamic Alert Box */
.auth-alert {
    margin: 16px 24px 0;
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 500;
}

.auth-alert.alert-error {
    background-color: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
}

.auth-alert.alert-success {
    background-color: #def7ec;
    color: #03543f;
    border: 1px solid #bcf0da;
}

body.dark-mode .auth-alert.alert-error {
    background-color: #3f1515;
    color: #fca5a5;
    border-color: #7f1d1d;
}

body.dark-mode .auth-alert.alert-success {
    background-color: #0f2e1e;
    color: #86efac;
    border-color: #14532d;
}

.auth-modal-body {
    padding: 20px 24px 24px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .auth-grid-row {
        grid-template-columns: 1fr;
    }
}

.auth-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 12px;
    font-size: 19px;
    color: var(--text-secondary);
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border-radius: 9px;
    border: 1px solid var(--border-color, #dadce0);
    background-color: var(--bg-card, #ffffff);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.dark-mode .auth-input {
    background-color: #2b2c2f;
    border-color: #3c4043;
}

.auth-input:focus {
    border-color: var(--google-blue, #1a73e8);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.auth-toggle-pwd {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.auth-toggle-pwd:hover {
    color: var(--text-primary);
}

.auth-row-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: var(--text-secondary);
}

.auth-geo-notice {
    background-color: var(--bg-hover, #f1f3f4);
    border-radius: 9px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    border: 1px solid var(--border-color, #e0e0e0);
}

body.dark-mode .auth-geo-notice {
    background-color: #2a2b2e;
    border-color: #3c4043;
}

.geo-notice-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    overflow: hidden;
}

.geo-notice-info .geo-icon {
    font-size: 16px;
    color: var(--google-blue, #1a73e8);
    flex-shrink: 0;
}

.geo-notice-info .geo-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-geo-refresh {
    background-color: var(--google-blue, #1a73e8);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.btn-geo-refresh:hover {
    opacity: 0.9;
}

.auth-submit-btn {
    width: 100%;
    padding: 12px 18px;
    background-color: var(--google-blue, #1a73e8);
    color: #ffffff;
    border: none;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    margin-top: 4px;
}

.auth-submit-btn:hover {
    background-color: #1557b0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.auth-submit-btn.btn-success-solid {
    background-color: #16a34a;
}

.auth-submit-btn.btn-success-solid:hover {
    background-color: #15803d;
}

.auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-footer-prompt {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.auth-switch-link {
    color: var(--google-blue, #1a73e8);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch-link:hover {
    text-decoration: underline;
}

/* Spinner */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

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

/* =========================================================
   User Profile Dashboard Page
   ========================================================= */
.profile-container {
    max-width: 1080px;
    margin: 30px auto;
    padding: 0 20px 60px;
}

.profile-hero-card {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #dadce0);
    border-radius: 18px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.dark-mode .profile-hero-card {
    background: #202124;
    border-color: #3c4043;
}

.profile-hero-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-large-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--google-blue, #1a73e8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    overflow: hidden;
    border: 3px solid rgba(26, 115, 232, 0.3);
    flex-shrink: 0;
}

.profile-large-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-hero-details h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.profile-hero-details .profile-meta-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--text-secondary);
}

.badge-role {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-status-active {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
    background-color: #dcfce7;
    color: #15803d;
}

.profile-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 860px) {
    .profile-hero-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-grid-layout {
        grid-template-columns: 1fr;
    }
}

.profile-section-card {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #dadce0);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.dark-mode .profile-section-card {
    background: #202124;
    border-color: #3c4043;
}

.section-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

body.dark-mode .section-card-title {
    border-color: #3c4043;
}

.section-card-title .title-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.telemetry-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.telemetry-spec-item {
    background-color: var(--bg-hover, #f8f9fa);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #eaedf1);
}

body.dark-mode .telemetry-spec-item {
    background-color: #28292c;
    border-color: #3c4043;
}

.telemetry-spec-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.telemetry-spec-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

/* =========================================================
   Separate Country & Language Dropdown Selectors
   ========================================================= */
.header-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.header-select-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-main);
    line-height: 1.2;
    white-space: nowrap;
}

.header-select-pill:hover,
.header-select-pill.open {
    background-color: var(--bg-hover);
    border-color: var(--border-strong);
}

.pill-flag-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pill-label {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
}

.pill-caret {
    font-size: 18px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.header-select-pill.open .pill-caret {
    transform: rotate(180deg);
}

/* Dropdown Menu Floating Card (Guaranteed inside screen boundaries) */
.header-menu-card {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: 280px;
    max-width: min(280px, calc(100vw - 16px));
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
    z-index: 1060;
    display: none;
    overflow: hidden;
    box-sizing: border-box;
}

.header-menu-card.show {
    display: block;
    animation: menuPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes menuPop {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.menu-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface);
}

.menu-card-close {
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.menu-card-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.menu-card-body {
    max-height: 380px;
    overflow-y: auto;
    padding: 6px 0;
}

/* Country Options List */
.country-options-list,
.lang-options-list {
    display: flex;
    flex-direction: column;
}

.country-option-item,
.lang-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.12s ease;
    font-size: 13.5px;
    font-weight: 600;
}

.country-option-item:hover,
.lang-option-item:hover {
    background-color: var(--bg-hover);
}

.country-option-item.selected,
.lang-option-item.selected {
    background-color: #eff6ff;
    color: var(--google-blue);
    font-weight: 700;
}

body.dark-mode .country-option-item.selected,
body.dark-mode .lang-option-item.selected {
    background-color: #1e3a8a;
    color: #93c5fd;
}

.country-opt-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.country-opt-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.country-opt-code,
.lang-opt-code {
    display: none !important;
}

.lang-opt-icon {
    font-size: 18px;
    color: var(--royal-purple, #7c3aed);
    flex-shrink: 0;
}

.country-opt-check,
.lang-opt-check {
    font-size: 16px;
    color: var(--google-blue);
    flex-shrink: 0;
}

body.dark-mode .country-opt-check,
body.dark-mode .lang-opt-check {
    color: #60a5fa;
}

.lang-opt-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lang-opt-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lang-opt-native {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.menu-card-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    text-align: center;
}

.menu-reset-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
}

.menu-reset-link:hover {
    color: var(--google-blue);
}

/* Country Flag Image Display (Crisp and Responsive across all OS) */
.country-flag-img {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    border-radius: 3px;
    vertical-align: middle;
    object-fit: cover;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Active Locale Banner across Feeds (Removed from platform) */
.active-locale-banner {
    display: none !important;
}

.active-locale-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.active-locale-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    background: #e8f0fe;
    color: #1a73e8;
    font-weight: 700;
    font-size: 12.5px;
}

body.dark-mode .active-locale-badge {
    background: #1e3a8a;
    color: #93c5fd;
}

.active-locale-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Strict: No Footer in Frontend (Google News Layout) */
footer, .site-footer, .footer, .app-footer, .main-footer {
    display: none !important;
}

/* =========================================================
   Explore Page (Discovery Engine) Styling
   ========================================================= */
.explore-hero-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 16px);
    padding: 28px 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.explore-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(26, 115, 232, 0.08);
    color: var(--google-blue, #1a73e8);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.explore-hero-title {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.2;
}

.explore-hero-sub {
    font-size: 14.5px;
    color: var(--text-secondary);
    margin: 0 0 16px;
    max-width: 680px;
    line-height: 1.5;
}

.explore-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.explore-stat-capsule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-hover, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 12.5px;
    color: var(--text-primary);
}

body.dark-mode .explore-stat-capsule {
    background: #1e293b;
    border-color: #334155;
}

.explore-search-box {
    max-width: 640px;
}

.explore-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.explore-search-ico {
    position: absolute;
    left: 14px;
    font-size: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.explore-input-field {
    width: 100%;
    padding: 12px 42px 12px 44px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body, #ffffff);
    color: var(--text-primary);
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

body.dark-mode .explore-input-field {
    background-color: #1e293b;
    border-color: #334155;
}

.explore-input-field:focus {
    border-color: var(--google-blue);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.explore-clear-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 50%;
}

.explore-clear-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.explore-filter-hint {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 6px;
    padding-left: 14px;
}

/* Explore Nav Pills */
.explore-nav-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 24px;
    scrollbar-width: none;
}

.explore-nav-pills::-webkit-scrollbar {
    display: none;
}

.explore-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.explore-nav-pill:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.explore-nav-pill.active {
    background: var(--google-blue, #1a73e8);
    color: #ffffff;
    border-color: var(--google-blue, #1a73e8);
}

/* Tags Cloud */
.explore-tags-cloud-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 12px);
    margin-bottom: 28px;
}

.explore-tags-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.explore-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.explore-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    transition: all 0.15s ease;
}

.explore-tag-chip:hover {
    background: rgba(26, 115, 232, 0.1);
    color: var(--google-blue);
    border-color: var(--google-blue);
}

/* Topic Hubs Grid */
.explore-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.explore-topic-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 12px);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.explore-topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--google-blue);
}

.explore-topic-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.explore-topic-body {
    flex: 1;
    min-width: 0;
}

.explore-topic-name {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explore-topic-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.explore-topic-pill {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    padding-left: 6px;
}

.explore-topic-arrow {
    font-size: 16px;
    color: var(--text-muted);
    transition: transform 0.15s ease;
}

.explore-topic-card:hover .explore-topic-arrow {
    transform: translateX(4px);
    color: var(--google-blue);
}

/* Google News Newsstand Publisher Cards - Horizontal Sliding Carousel */
.newsstand-slider-wrapper {
    position: relative;
    width: 100%;
}

.newsstand-slider-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsstand-slide-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.newsstand-slide-arrow:hover {
    background: var(--google-blue);
    color: #ffffff;
    border-color: var(--google-blue);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.35);
}

.newsstand-slide-arrow.disabled,
.newsstand-slide-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.newsstand-floating-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    transition: all 0.2s ease;
}

.newsstand-floating-arrow.prev {
    left: -18px;
}

.newsstand-floating-arrow.next {
    right: -18px;
}

.newsstand-floating-arrow:hover {
    background: var(--google-blue);
    color: #ffffff;
    border-color: var(--google-blue);
    transform: translateY(-50%) scale(1.08);
}

.newsstand-floating-arrow.disabled,
.newsstand-floating-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .newsstand-floating-arrow {
        display: none !important;
    }
}

.explore-publishers-grid.newsstand-slider-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 6px 4px 18px;
    margin: 0;
}

.explore-publishers-grid.newsstand-slider-track::-webkit-scrollbar {
    display: none;
}

.newsstand-card {
    flex: 0 0 340px;
    min-width: 320px;
    max-width: 360px;
    width: 340px;
    scroll-snap-align: start;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .newsstand-card {
        flex: 0 0 86vw;
        min-width: 280px;
        max-width: 320px;
        width: 86vw;
    }
}

.newsstand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-color: var(--google-blue);
}

.newsstand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.newsstand-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.newsstand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 2px;
    flex-shrink: 0;
}

.newsstand-brand-info {
    min-width: 0;
}

.newsstand-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.newsstand-name {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.newsstand-verified-ico {
    font-size: 16px;
    color: var(--google-blue, #1a73e8);
    flex-shrink: 0;
}

.newsstand-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.newsstand-loc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.newsstand-lang {
    font-size: 9.5px;
    font-weight: 700;
    font-family: monospace;
    background: var(--bg-hover);
    padding: 1px 4px;
    border-radius: 3px;
    color: var(--text-secondary);
}

.newsstand-site-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--bg-hover);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.newsstand-site-btn:hover {
    background: var(--google-blue);
    color: #ffffff;
}

.newsstand-articles-list {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.newsstand-article-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
}

.newsstand-article-item:last-child {
    border-bottom: none;
}

.newsstand-article-item:hover {
    background-color: var(--bg-hover);
}

.newsstand-art-content {
    flex: 1;
    min-width: 0;
}

.newsstand-art-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.38;
    color: var(--text-primary);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.newsstand-article-item:hover .newsstand-art-title {
    color: var(--google-blue);
}

.newsstand-art-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.newsstand-art-time-ico {
    font-size: 13px;
}

.newsstand-art-thumb-wrap {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-hover);
}

.newsstand-art-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.newsstand-empty-notice {
    padding: 24px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    justify-content: center;
}

.newsstand-footer {
    padding: 11px 18px;
    background: var(--bg-hover, #f8fafc);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

body.dark-mode .newsstand-footer {
    background: #1e293b;
}

.newsstand-see-more-link {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--google-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.15s ease;
}

.newsstand-see-more-link:hover {
    gap: 7px;
    text-decoration: underline;
}

/* Regional Editions Grid */
.explore-editions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.explore-edition-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 12px);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.explore-edition-card:hover {
    transform: translateY(-2px);
    border-color: var(--google-blue);
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.explore-edition-card.current {
    border-color: var(--google-blue);
    background: rgba(26, 115, 232, 0.05);
}

.explore-edition-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.explore-edition-info strong {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.explore-edition-info span {
    font-size: 11px;
    color: var(--text-muted);
}

/* =========================================================
   Android & Mobile Bottom App Navigation Bar (Material 3)
   ========================================================= */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    z-index: 998;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px calc(env(safe-area-inset-bottom, 0px));
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.mob-nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 0;
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
}

.mob-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 26px;
    border-radius: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mob-nav-icon {
    font-size: 22px;
    transition: transform 0.15s ease;
}

.mob-nav-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.1px;
    transition: color 0.15s ease;
}

.mob-nav-badge {
    position: absolute;
    top: -2px;
    right: 4px;
    background-color: var(--google-red, #ea4335);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 4.5px;
    border-radius: 9999px;
    min-width: 15px;
    text-align: center;
    line-height: 1.2;
    border: 1.5px solid var(--bg-surface);
}

/* Material 3 Active State Pill */
.mob-nav-tab.active {
    color: var(--google-blue, #1a73e8);
}

.mob-nav-tab.active .mob-nav-icon-wrap {
    background-color: rgba(26, 115, 232, 0.14);
    color: var(--google-blue, #1a73e8);
}

body.dark-mode .mob-nav-tab.active .mob-nav-icon-wrap {
    background-color: rgba(66, 133, 244, 0.25);
    color: #8ab4f8;
}

.mob-nav-tab:active .mob-nav-icon {
    transform: scale(0.92);
}

/* Hide mobile bottom nav when modal reader is active */
body.modal-open .mobile-bottom-nav {
    display: none !important;
}

/* =========================================================
   Android Material Style Profile & Settings Components
   ========================================================= */
.android-page-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 16px 80px;
}

/* Android App Bar / Header */
.android-app-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.android-app-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.android-back-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.android-back-icon-btn:hover {
    background-color: var(--bg-hover);
}

.android-app-bar-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

/* Android User Hero Header */
.android-profile-hero {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.android-profile-header-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.android-avatar-large {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background-color: var(--google-blue, #1a73e8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(26, 115, 232, 0.25);
    border: 3px solid var(--bg-surface);
}

.android-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.android-profile-header-info {
    flex: 1;
    min-width: 200px;
}

.android-profile-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.android-profile-handle {
    font-size: 13.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.android-badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-chip-blue {
    background: #e8f0fe;
    color: #1a73e8;
}

.badge-chip-green {
    background: #dcfce7;
    color: #166534;
}

/* Android Stats Counter Row */
.android-stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.android-stat-box {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    background: var(--bg-hover, #f8fafc);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

body.dark-mode .android-stat-box {
    background: #1e293b;
}

.android-stat-number {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.android-stat-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Android Grouped Settings / Preference Card */
.android-group-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    margin-bottom: 18px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.android-group-header {
    padding: 14px 18px 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--google-blue, #1a73e8);
    display: flex;
    align-items: center;
    gap: 6px;
}

.android-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.15s ease;
}

.android-list-item:last-child {
    border-bottom: none;
}

.android-list-item.clickable:hover {
    background-color: var(--bg-hover);
}

.android-list-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.android-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(26, 115, 232, 0.08);
    color: var(--google-blue, #1a73e8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.android-item-icon.red {
    background: rgba(234, 67, 53, 0.08);
    color: var(--google-red, #ea4335);
}

.android-item-icon.green {
    background: rgba(52, 168, 83, 0.08);
    color: var(--google-green, #34a853);
}

.android-item-icon.purple {
    background: rgba(124, 58, 237, 0.08);
    color: var(--royal-purple, #7c3aed);
}

.android-item-text {
    flex: 1;
    min-width: 0;
}

.android-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.android-item-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.android-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Android Toggle Switch */
.android-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.android-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.android-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color, #cbd5e1);
    transition: 0.25s;
    border-radius: 34px;
}

.android-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.25s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .android-slider {
    background-color: var(--google-blue, #1a73e8);
}

input:checked + .android-slider:before {
    transform: translateX(20px);
}

/* Android Form Inputs */
.android-input-field {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}

.android-input-field:focus {
    border-color: var(--google-blue);
}

/* =========================================================
   Admin Analytics Dashboard Styles
   ========================================================= */
.analytics-status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ga-connected {
    background-color: #dcfce7;
    border: 1px solid #86efac;
    color: #14532d;
}

.ga-disconnected {
    background-color: #fef3c7;
    border: 1px solid #fde047;
    color: #78350f;
}

.analytics-bar-item {
    margin-bottom: 12px;
}

.analytics-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary, #1e293b);
}

.analytics-progress-track {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.analytics-progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.4s ease;
}

.activity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
