/* ZIPNEWS - Optimized CSS */

/* CSS Custom Properties - Consistent Design System */
:root {
    --max-width: 1400px;
    --content-padding: 24px;
    --mobile-padding: 16px;
    --header-height: 72px;
    --market-ticker-height: 40px;
    --news-ticker-height: 28px;
}

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

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: #fff;
    color: #000;
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

/* Unified Container System */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding);
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--mobile-padding);
    }
}

/* Market Ticker */
.market-ticker {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 101;
    height: var(--market-ticker-height);
    width: 100%;
}

.market-ticker-container {
    max-width: var(--max-width);
    margin: 0 auto;
    overflow: hidden;
    height: 100%;
}

.ticker-track {
    display: flex;
    gap: 40px;
    animation: scroll 60s linear infinite;
    white-space: nowrap;
    padding: 8px var(--content-padding);
}

@media (max-width: 768px) {
    .ticker-track {
        padding: 6px var(--mobile-padding);
    }
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.ticker-symbol {
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

.ticker-price {
    color: #000;
    font-family: 'Courier New', monospace;
}

.ticker-change {
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.ticker-change.positive {
    color: #16a34a;
}

.ticker-change.negative {
    color: #dc2626;
}

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

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

.ticker-flag {
    font-size: 14px;
    margin-right: 4px;
}

/* News Ticker */
.news-ticker {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 28px;
    min-height: 28px;
    width: 100%;
}

.news-ticker-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.news-ticker-label {
    background: #E53935;
    color: white;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: var(--content-padding);
}

.news-ticker-content {
    flex: 1;
    overflow: hidden;
    margin-right: var(--content-padding);
}

.news-ticker-track {
    display: flex;
    gap: 40px;
    animation: scroll-news 20s linear infinite;
    will-change: transform;
}

@media (max-width: 768px) {
    .news-ticker-label {
        margin-left: var(--mobile-padding);
        padding: 4px 8px;
        font-size: 9px;
    }

    .news-ticker-content {
        margin-right: var(--mobile-padding);
    }

    /* Make news ticker much faster on mobile - 8s instead of 20s */
    .news-ticker-track {
        animation: scroll-news 8s linear infinite;
    }
}

.news-ticker-item {
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.2s;
}

.news-ticker-item:hover {
    opacity: 0.7;
}

.ticker-favicon {
    width: 14px;
    height: 14px;
    margin: 0 4px;
    vertical-align: middle;
    border-radius: 2px;
}

@keyframes scroll-news {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-25%);
    }
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 0;
    position: fixed;
    top: 28px;
    left: 0;
    right: 0;
    z-index: 999;
    width: 100%;
    height: 72px;
    min-height: 72px;
}

.header-content {
    max-width: var(--max-width);
    padding: 0 var(--content-padding);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-svg {
    height: 40px;
    width: auto;
}

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 4px 8px 4px 20px;
    transition: background 0.2s;
}

.search-form:focus-within {
    background: #e8e8e8;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 15px;
    outline: none;
    color: #000;
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s;
}

.search-button:hover {
    color: #000;
}

.search-button svg {
    width: 20px;
    height: 20px;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

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

.suggestion-item:hover {
    background: #f5f5f5;
}

.suggestion-icon {
    color: #999;
    font-size: 16px;
}

.suggestion-text {
    flex: 1;
    font-size: 15px;
    color: #333;
}

.suggestion-corrected {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.suggestion-lang {
    font-size: 12px;
    color: #999;
}

.search-container {
    position: relative;
}

/* Holiday Widget - Flat Minimalistic Design */
.holiday-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.holiday-widget:hover {
    background: #ececec;
    border-color: #d0d0d0;
}

.holiday-widget.bank-holiday {
    background: #fff3e0;
    border-color: #ffe0b2;
    color: #e65100;
}

.holiday-widget.bank-holiday:hover {
    background: #ffe0b2;
}

.holiday-widget.market-holiday {
    background: #e3f2fd;
    border-color: #bbdefb;
    color: #1565c0;
}

.holiday-widget.market-holiday:hover {
    background: #bbdefb;
}

.holiday-widget.both-holiday {
    background: #fce4ec;
    border-color: #f8bbd0;
    color: #c2185b;
}

.holiday-widget.both-holiday:hover {
    background: #f8bbd0;
}

.holiday-widget.weekend {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #666;
}

.holiday-widget.weekend:hover {
    background: #ececec;
}

.holiday-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.holiday-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 16px;
    min-width: 280px;
    max-width: 320px;
    display: none;
    z-index: 10000;
}


.holiday-dropdown.active {
    display: block;
}

.holiday-dropdown-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.upcoming-holiday {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.upcoming-holiday:last-child {
    border-bottom: none;
}

.upcoming-holiday-date {
    font-size: 12px;
    color: #666;
}

.upcoming-holiday-name {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    margin-top: 2px;
}

.upcoming-holiday-tags {
    margin-top: 4px;
    display: flex;
    gap: 6px;
}

.holiday-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #666;
}

.holiday-tag.bank {
    background: #fff3e0;
    color: #e65100;
}

.holiday-tag.market {
    background: #e3f2fd;
    color: #1976d2;
}


/* Main Navigation */
.main-nav {
    padding: 12px var(--content-padding);
    display: flex;
    gap: 32px;
    overflow-x: auto;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    position: fixed;
    top: 100px; /* 28px ticker + 72px header */
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    width: 100%;
    max-width: var(--max-width);
}

@media (max-width: 768px) {
    .main-nav {
        padding: 12px var(--mobile-padding);
        gap: 24px;
        left: 0;
        transform: none;
        max-width: 100%;
    }
}

.main-nav a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #E53935;
    border-bottom-color: #E53935;
}

/* Category Header */
.category-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 32px 24px 0;
}

.category-header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.category-title {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: capitalize;
}

.subcategory-nav {
    display: flex;
    gap: 28px;
    overflow-x: auto;
}

.subcategory-nav a {
    padding: 12px 0;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
}

.subcategory-nav a.active {
    color: #000;
    border-bottom-color: #000;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 150px; /* Space for fixed header: 28px ticker + 72px header + 50px nav */
    padding: 32px 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
}

/* Content Area */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Layout Pattern 1: 3-Column Small Cards */
.layout-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

/* Perplexity-Style Source Count Badge */
.source-count-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: transform 0.2s ease;
}

.source-count-badge:hover {
    transform: scale(1.05);
}

.source-icons {
    display: flex;
    gap: -2px;
}

.source-icons img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -4px;
}

.source-icons img:first-child {
    margin-left: 0;
}

.source-text {
    color: #666;
    white-space: nowrap;
}

.card-small {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-small-image {
    width: 100%;
    height: 200px !important;
    max-height: 200px !important;
    background: #f5f5f5;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.card-small-image img {
    width: 100%;
    height: 100% !important;
    max-height: 200px !important;
    object-fit: cover;
    object-position: center 20%; /* More headroom for faces */
    transition: transform 0.3s;
    display: block;
}

.card-small:hover .card-small-image img {
    transform: scale(1.05);
}

.card-small h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    flex-grow: 1;
    margin-bottom: 8px;
}

.card-small h3 a {
    color: #000;
    text-decoration: none;
}

.card-small h3 a:hover {
    color: #0066cc;
}

.card-credit {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Layout Pattern 2: Featured Large Card */
.layout-featured {
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.card-featured {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 32px;
    cursor: pointer;
}

.card-featured-image {
    width: 100%;
    height: 280px !important;
    max-height: 280px !important;
    background: #f5f5f5;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.card-featured-image img {
    width: 100%;
    height: 100% !important;
    max-height: 280px !important;
    object-fit: cover;
    object-position: center 20%; /* More headroom for faces */
    transition: transform 0.3s;
    display: block;
}

.card-featured:hover .card-featured-image img,
.layout-featured:hover .card-featured-image img {
    transform: scale(1.05);
}

.card-featured-content h2 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 16px;
}

.card-featured-content h2 a {
    color: #000;
    text-decoration: none;
}

.card-featured-content h2 a:hover {
    color: #0066cc;
}

/* Layout Pattern 3: Section with 4-Column Cards */
.section-header {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
}

.layout-4col {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.card-medium {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-medium-image {
    width: 100%;
    height: 160px !important;
    max-height: 160px !important;
    background: #f5f5f5;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.card-medium-image img {
    width: 100%;
    height: 100% !important;
    max-height: 160px !important;
    object-fit: cover;
    object-position: center 20%; /* More headroom for faces */
    transition: transform 0.3s;
    display: block;
}

.card-medium:hover .card-medium-image img {
    transform: scale(1.05);
}

.card-medium h4 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    flex-grow: 1;
    margin-bottom: 8px;
}

.card-medium h4 a {
    color: #000;
    text-decoration: none;
}

.card-medium h4 a:hover {
    color: #0066cc;
}

/* Trending Section (10 cards per row, responsive) */
.trending-section {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 2px solid #e0e0e0;
}

/* Breaking News header wrapper */
.trending-header-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 24px;
}

/* Icon on left */
.trending-icon-left {
    width: 48px;
    height: 48px;
}

/* Title on right in red */
.trending-title {
    font-size: 32px;
    font-weight: 700;
    color: #E53935 !important;
    margin: 0;
}

/* Old styles for backwards compatibility */
.trending-header {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.trending-icon {
    color: #E53935;
    width: 32px;
    height: 32px;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
}

.trending-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border: 1px solid #f0f0f0;
}

.trending-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #e0e0e0;
}

.trending-card-image {
    width: 100% !important;
    height: 80px !important;
    max-height: 80px !important;
    min-height: 80px !important;
    background: #f5f5f5;
    overflow: hidden !important;
    position: relative;
    flex-shrink: 0 !important;
}

.trending-card-image img {
    width: 100% !important;
    height: 80px !important;
    max-height: 80px !important;
    min-height: 80px !important;
    object-fit: cover !important;
    object-position: center 20% !important;
    transition: transform 0.3s;
    display: block !important;
}

.trending-card:hover .trending-card-image img {
    transform: scale(1.05);
}

/* Source count badge (Perplexity-style) */
.source-count-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 3px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.trending-card-content {
    padding: 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.trending-card-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.trending-card-source {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: auto;
    padding-top: 4px;
}

.trending-card-source .source-favicon {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    object-fit: contain;
}

/* Trending card meta container - holds favicons and time */
.trending-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 6px;
    font-size: 9px;
}

/* Source picker styles */
.trending-card-sources {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

/* Favicon stack container for overlapping effect */
.favicon-stack {
    display: flex;
    align-items: center;
    position: relative;
    margin-right: 2px;
}

.trending-card-sources .source-favicon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 1.5px solid #fff;
    transition: all 0.2s;
    background: #f5f5f5;
    position: relative;
}

/* Overlapping effect - each favicon overlaps the previous one */
.favicon-stack .source-favicon:not(:first-child) {
    margin-left: -8px;
}

/* Z-index for stacking order */
.favicon-stack .source-favicon:nth-child(1) { z-index: 3; }
.favicon-stack .source-favicon:nth-child(2) { z-index: 2; }
.favicon-stack .source-favicon:nth-child(3) { z-index: 1; }

.trending-card-sources .source-favicon:hover {
    border-color: #0066cc;
    transform: scale(1.15);
    z-index: 10 !important;
}

.trending-card-sources .source-favicon.active {
    border-color: #0066cc;
}

/* Source count text - very small and compact */
.source-count-text {
    font-size: 9px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

/* Trending card time - very small and compact */
.trending-card-time {
    font-size: 9px;
    color: #999;
    font-weight: 400;
    white-space: nowrap;
    flex-shrink: 0;
}

/* +X more indicator for additional sources */
.more-sources {
    font-size: 8px;
    color: #fff;
    background: #666;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-left: -8px;
    border: 1.5px solid #fff;
    position: relative;
    z-index: 0;
}

.view-all-sources {
    font-size: 10px;
    color: #0066cc;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

.view-all-sources:hover {
    color: #0052a3;
}


/* Feed Ad Container - Only visible when ad loads */
.feed-ad-container {
    margin: 32px 0;
    padding: 20px 0;
    text-align: center;
    min-height: 0;
}

.feed-ad-container:empty,
.feed-ad-container .adsbygoogle:empty {
    display: none;
    margin: 0;
    padding: 0;
}

.feed-ad-container .adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* Hide parent container if ad doesn't load */
.feed-ad-container:has(.adsbygoogle[data-ad-status="unfilled"]) {
    display: none;
}

/* Category Section (Grouped Layout for Home Page) */
.category-section {
    margin-bottom: 24px;
}

.category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
}

.category-section-title {
    font-size: 22px;
    font-weight: 600;
    text-transform: capitalize;
}

.category-count {
    font-size: 14px;
    color: #999;
    font-weight: 400;
}

.category-more-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.category-more-button:hover {
    color: #000;
    transform: translateX(2px);
}

.view-all-container {
    text-align: center;
    padding-top: 20px;
}

.view-all-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.view-all-button:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Compact Card (UPSC-style for grouped layout) */
.compact-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.compact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.compact-card.has-ai-summary .ai-summary-badge {
    display: block;
}

.ai-summary-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(26, 115, 232, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    display: none;
}

.trending-badge-article {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

.trending-badge-article::before {
    content: '🔥';
    font-size: 10px;
}

.compact-card-image {
    width: 100% !important;
    height: 140px !important;
    max-height: 140px !important;
    min-height: 140px !important;
    background: #f5f5f5;
    overflow: hidden !important;
    position: relative;
    flex-shrink: 0 !important;
}

.compact-card-image img {
    width: 100% !important;
    height: 140px !important;
    max-height: 140px !important;
    min-height: 140px !important;
    object-fit: cover !important;
    object-position: center 20% !important;
    transition: transform 0.3s;
    display: block !important;
}

.compact-card:hover .compact-card-image img {
    transform: scale(1.05);
}

.compact-card-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.compact-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-card-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: auto;
}

.compact-card-sources {
    display: flex;
    align-items: center;
    gap: 4px;
}

.compact-card-sources .source-favicon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    opacity: 0.6;
}

.compact-card-sources .source-favicon.active {
    opacity: 1;
    border-color: #1a73e8;
}

.compact-card-sources .source-favicon:hover {
    transform: scale(1.15);
    opacity: 1;
}

.view-all-sources-compact {
    background: #f0f0f0;
    border: none;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: background 0.2s;
}

.view-all-sources-compact:hover {
    background: #e0e0e0;
}

.compact-card-source {
    color: #1a73e8;
    font-weight: 500;
}

.compact-card-time {
    color: #999;
}

/* Layout Pattern 4: 2-Column Large Cards */
.layout-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.card-large {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-large-image {
    width: 100%;
    height: 240px !important;
    max-height: 240px !important;
    background: #f5f5f5;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.card-large-image img {
    width: 100%;
    height: 100% !important;
    max-height: 240px !important;
    object-fit: cover;
    object-position: center 20%; /* More headroom for faces */
    transition: transform 0.3s;
    display: block;
}

.card-large:hover .card-large-image img {
    transform: scale(1.05);
}

.card-large h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

.card-large h3 a {
    color: #000;
    text-decoration: none;
}

.card-large h3 a:hover {
    color: #0066cc;
}

.card-large-summary {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 8px;
}

/* Layout Pattern 5: List View (More News Section) */
.layout-list {
    padding-bottom: 32px;
    border-bottom: 1px solid #e0e0e0;
}

.list-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
}

.card-list {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.card-list-content {
    flex: 1;
}

.card-list-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.card-list h5 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.card-list h5 a {
    color: #000;
    text-decoration: none;
}

.card-list h5 a:hover {
    color: #0066cc;
}

.card-list-image {
    width: 120px;
    min-width: 120px;
    height: 80px;
    background: #f5f5f5;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.card-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; /* More headroom for faces */
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 150px;
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-ad {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
    border-radius: 4px;
    min-height: 0;
}

/* Hide sidebar ad container when ad doesn't load */
.sidebar-ad:empty,
.sidebar-ad .adsbygoogle:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
}

.sidebar-ad .adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* Hide parent container if ad doesn't load */
.sidebar-ad:has(.adsbygoogle[data-ad-status="unfilled"]) {
    display: none;
}

.sidebar-ad-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Metadata */
.article-meta {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.article-meta-flex {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

/* Share Button */
.share-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: auto;
    outline: none;
    transition: background 0.2s;
}

.share-btn:hover {
    background: #f0f0f0;
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: #666;
}

.share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 8px;
    min-width: 160px;
    z-index: 1000;
    display: none;
}

.share-menu.active {
    display: block;
}

.share-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
    text-decoration: none;
}

.share-menu-item:hover {
    background: #f5f5f5;
}

.share-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Footer */
.footer {
    background: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    padding: 48px 24px 24px;
    margin-top: 64px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    color: #000;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #000;
}

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.footer-bottom p {
    margin: 8px 0;
}

.footer-legal {
    font-size: 12px;
    color: #999;
}


/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* ========================================
   MOBILE-FIRST RESPONSIVE DESIGN (CLEAN SLATE)
   ======================================== */

/* Base Mobile Styles (320px - 768px) */

/* Mobile Header - Compact */
@media (max-width: 768px) {
    /* Remove body margin/padding and prevent horizontal scroll */
    html, body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        max-width: 100vw;
        width: 100%;
    }

    /* Market ticker - compact on mobile */
    .market-ticker {
        height: 32px;
    }

    .ticker-track {
        padding: 6px 0;
    }

    .ticker-item {
        font-size: 11px;
    }

    .header {
        padding: 8px 12px;
        /* Keep sticky top value from main definition */
    }

    .header-content {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .logo-svg {
        height: 26px;
    }

    /* Hide holiday widget on mobile */
    .holiday-widget {
        display: none;
    }

    /* Hide/compact language toggle on mobile */
    .language-toggle {
        display: none !important; /* Hide completely on mobile - use nav drawer instead */
    }

    /* Compact personalization button on mobile */
    .personalize-toggle {
        width: 32px;
        height: 32px;
        margin-left: 4px;
        border-width: 1px;
    }

    .personalize-toggle svg {
        width: 16px;
        height: 16px;
    }

    /* Search - Collapsed to Icon Only */
    .search-container {
        flex: 0 0 auto;
        max-width: none;
        margin: 0;
        position: relative;
    }

    .search-container.collapsed .search-form {
        width: 40px;
        padding: 8px;
        background: transparent;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .search-container.collapsed .search-input {
        width: 0;
        padding: 0;
        opacity: 0;
        pointer-events: none;
    }

    .search-container.expanded .search-form {
        position: fixed;
        top: 10px;
        left: 12px;
        right: 12px;
        width: calc(100% - 24px);
        z-index: 1001;
        background: #fff;
        border: 1px solid #e0e0e0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        border-radius: 24px;
        padding: 8px 16px;
    }

    .search-container.expanded .search-input {
        width: 100%;
        opacity: 1;
        pointer-events: auto;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .search-button {
        flex-shrink: 0;
    }

    /* Hamburger Menu Button */
    .hamburger-menu {
        display: flex !important; /* Force display on mobile */
        flex-direction: column;
        justify-content: space-between;
        width: 26px;
        height: 20px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1002;
        margin-left: 8px;
        flex-shrink: 0;
    }

    .hamburger-menu span {
        display: block;
        height: 3px;
        width: 100%;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Mobile Navigation Drawer */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-nav-drawer {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 85%;
        height: 100%;
        background: #fff;
        z-index: 1000;
        overflow-y: auto;
        transition: right 0.3s ease;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-drawer.active {
        right: 0;
    }

    .mobile-nav-header {
        padding: 16px;
        border-bottom: 1px solid #e0e0e0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10;
    }

    .mobile-nav-logo {
        height: 28px;
        width: auto;
    }

    .mobile-nav-close {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #666;
        padding: 0;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav-links {
        padding: 8px 0;
    }

    .mobile-nav-links a {
        display: block;
        padding: 14px 20px;
        color: #333;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        transition: background 0.2s;
        border-left: 3px solid transparent;
    }

    .mobile-nav-links a:hover,
    .mobile-nav-links a.active {
        background: #f5f5f5;
        border-left-color: #E53935;
        color: #E53935;
    }

    /* Hide desktop navigation */
    .main-nav {
        display: none;
    }

    /* Mobile: Category Header */
    .category-header {
        padding: 20px 12px 0;
    }

    .category-title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .subcategory-nav {
        gap: 16px;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .subcategory-nav::-webkit-scrollbar {
        display: none;
    }

    /* Mobile: Main Container - Dense Grid */
    .main-container {
        margin-top: 150px; /* Maintain space for fixed header on mobile */
        padding: 12px;
        gap: 16px;
        grid-template-columns: 1fr;
        max-width: 100vw;
        width: 100%;
        overflow-x: hidden;
    }

    .content-area {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Mobile: Dense 3-Column Grid (YouTube-style) */
    .layout-3col,
    .layout-4col {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        padding-bottom: 12px;
    }

    .layout-2col {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* Compact Cards for Mobile */
    .compact-card {
        border-radius: 6px;
    }

    .compact-card-image {
        height: 85px !important;
        max-height: 85px !important;
        min-height: 85px !important;
    }

    .compact-card-image img {
        height: 85px !important;
        max-height: 85px !important;
        min-height: 85px !important;
    }

    .compact-card-content {
        padding: 6px 8px;
    }

    .compact-card-title {
        font-size: 11px;
        line-height: 1.25;
        -webkit-line-clamp: 2;
        margin-bottom: 4px;
    }

    .compact-card-summary {
        font-size: 10px;
        -webkit-line-clamp: 1;
        margin-bottom: 4px;
        display: none; /* Hide summary on mobile to save space */
    }

    .compact-card-meta {
        font-size: 8px;
    }

    .compact-card-source {
        font-size: 8px;
    }

    /* Small Cards - Mobile Optimized */
    .card-small-image {
        height: 100px;
    }

    .card-small h3 {
        font-size: 13px;
        line-height: 1.3;
    }

    /* Medium Cards - Mobile */
    .card-medium-image {
        height: 90px;
    }

    .card-medium h4 {
        font-size: 12px;
    }

    /* Large Cards - Stack on Mobile */
    .card-large-image {
        height: 140px;
    }

    .card-large h3 {
        font-size: 16px;
    }

    .card-large-summary {
        font-size: 13px;
    }

    /* Featured Card - Stack Vertically */
    .card-featured {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-featured-image {
        height: 180px;
    }

    .card-featured-content h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    /* List Cards - Compact */
    .card-list {
        gap: 10px;
        padding: 12px 0;
    }

    .card-list-image {
        width: 80px;
        min-width: 80px;
        height: 60px;
    }

    .card-list h5 {
        font-size: 13px;
    }

    .card-list-time {
        font-size: 11px;
    }

    /* Trending Grid - Mobile 4 columns */
    .trending-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .trending-card-image {
        height: 60px !important;
        max-height: 60px !important;
        min-height: 60px !important;
    }

    .trending-card-image img {
        height: 60px !important;
        max-height: 60px !important;
        min-height: 60px !important;
    }

    .trending-card-content {
        padding: 6px;
    }

    .trending-card-title {
        font-size: 10px;
        -webkit-line-clamp: 2;
    }

    /* Topics Grid - Single Column */
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .topic-column {
        padding: 12px;
    }

    .topic-column-header {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .topics-header {
        font-size: 20px;
    }

    /* Sources - Single Column */
    .sources-carousel {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sources-header h2 {
        font-size: 20px;
    }

    /* Footer - Ultra Compact on Mobile */
    .footer {
        padding: 8px 12px;
        margin-top: 20px;
        background: #fff;
        border-top: 1px solid #f0f0f0;
    }

    .footer-content {
        display: none; /* Hide all footer columns on mobile */
    }

    .footer-bottom {
        margin: 0;
        padding: 0;
        border-top: none;
        font-size: 9px;
        color: #999;
    }

    .footer-bottom p {
        margin: 2px 0;
        line-height: 1.3;
    }

    .footer-legal {
        display: none; /* Hide jurisdiction text on mobile */
    }

    /* Hide Sidebar on Mobile */
    .sidebar {
        display: none;
    }

    /* Mobile: Article Preview Modal - Dynamic Full Screen */
    .article-preview-overlay {
        padding: 0 !important;
        align-items: flex-end !important;
        justify-content: flex-end !important;
    }

    .article-preview-modal {
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        height: 90vh !important;
        max-height: 90vh !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
        transform: translateY(100vh) !important;
    }

    .article-preview-overlay.active .article-preview-modal {
        transform: translateY(0) !important;
    }

    .article-preview-hero {
        height: 200px !important;
        max-height: 200px !important;
        border-radius: 20px 20px 0 0 !important;
    }

    .article-preview-close {
        top: 12px !important;
        right: 12px !important;
        width: 36px !important;
        height: 36px !important;
        background: rgba(0, 0, 0, 0.9) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
    }

    .article-preview-content {
        padding: 1rem !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .article-preview-title {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.75rem !important;
    }

    .article-preview-meta {
        font-size: 0.75rem !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
    }

    .article-preview-ai-summary {
        font-size: 0.875rem !important;
        line-height: 1.6 !important;
    }

    /* PWA Install Banner - Mobile Only */
    .install-banner-content {
        padding: 10px 12px;
        gap: 10px;
    }

    .install-banner-icon {
        width: 36px;
        height: 36px;
    }

    .install-banner-text strong {
        font-size: 13px;
    }

    .install-banner-text span {
        font-size: 11px;
    }

    .install-banner-button {
        padding: 7px 14px;
        font-size: 12px;
    }

    .install-banner-close {
        width: 26px;
        height: 26px;
        font-size: 18px;
    }

    /* Location Banner - Bottom Sheet */
    .location-banner {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: none;
        border-radius: 12px 12px 0 0;
        border-bottom: none;
        border-left: none;
        border-right: none;
    }

    /* Personalization Toggle - Mobile */
    .personalize-toggle {
        width: 36px;
        height: 36px;
        margin-left: 6px;
    }

    .personalize-toggle svg {
        width: 16px;
        height: 16px;
    }

    .personalization-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        font-size: 12px;
        padding: 12px 16px;
    }
}

/* Small Mobile Devices (< 480px) - Extra Dense */
@media (max-width: 480px) {
    /* Even denser 2-column grid on very small screens */
    .layout-3col,
    .layout-4col {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .trending-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .compact-card-image {
        height: 100px !important;
        max-height: 100px !important;
        min-height: 100px !important;
    }

    .compact-card-image img {
        height: 100px !important;
        max-height: 100px !important;
        min-height: 100px !important;
    }

    .card-small-image,
    .card-medium-image {
        height: 110px;
    }

    .install-banner-text span {
        display: none;
    }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-container {
        margin-top: 150px; /* Space for fixed header */
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .layout-3col,
    .layout-4col {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .layout-2col {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-featured {
        grid-template-columns: 1fr;
    }

    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        position: static;
    }
}

/* Desktop (1025px+) - Keep existing desktop styles */
@media (min-width: 1025px) {
    /* Desktop styles already defined above, no changes needed */
    .hamburger-menu,
    .mobile-nav-overlay,
    .mobile-nav-drawer {
        display: none;
    }
}

/* Location Permission Banner */
.location-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 16px;
    max-width: 400px;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.location-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.location-banner-content svg {
    color: #1976d2;
    flex-shrink: 0;
    margin-top: 2px;
}

.location-banner-text {
    flex: 1;
}

.location-banner-text strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
    color: #000;
}

.location-banner-text p {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.location-banner-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.location-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.location-btn-allow {
    background: #1976d2;
    color: #fff;
}

.location-btn-allow:hover {
    background: #1565c0;
}

.location-btn-dismiss {
    background: #f5f5f5;
    color: #666;
}

.location-btn-dismiss:hover {
    background: #e0e0e0;
}


/* Layout Pattern: Topic Columns (Google News Style) */
.layout-topics {
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
}

.topics-header {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.topics-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.topic-column {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.topic-column-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* TEMPORARY: Bihar Election Column Styling (until Nov 20, 2025) */
.bihar-election-column {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    position: relative;
    overflow: hidden;
}

.bihar-election-column::before {
    content: '🗳️';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 48px;
    opacity: 0.1;
}

.bihar-election-column .topic-column-header {
    color: #e65100;
    border-bottom-color: #ff9800;
    font-size: 18px;
}

.bihar-election-column .topic-icon {
    font-size: 22px;
}

.topic-column-icon {
    font-size: 24px;
}

.topic-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.topic-card:last-child {
    margin-bottom: 0;
}

.topic-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.topic-card-source {
    font-size: 12px;
    font-weight: 600;
    color: #0066cc;
}

.topic-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.topic-card-title a {
    color: #000;
    text-decoration: none;
}

.topic-card-title a:hover {
    color: #0066cc;
}

.topic-card-image {
    width: 100%;
    height: 140px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.topic-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; /* More headroom for faces */
    transition: transform 0.3s;
}

.topic-card:hover .topic-card-image img {
    transform: scale(1.05);
}

.topic-card-time {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}


.topic-icon {
    font-size: 20px;
    filter: grayscale(20%);
}

/* Sources Section (Google News Style) */
.sources-section {
    padding: 48px 0 64px;
    margin-top: 48px;
    border-top: 2px solid #e0e0e0;
}

.sources-header {
    margin-bottom: 32px;
}

.sources-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #000;
}

.sources-header p {
    font-size: 14px;
    color: #666;
}

.sources-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.source-showcase-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.source-showcase-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.source-showcase-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.source-favicon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}

.source-logo-name {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    flex: 1;
}

.source-showcase-label {
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    display: inline-block;
    width: fit-content;
}

.source-stories {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.source-story-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.source-story-item:hover {
    background: #f8f9fa;
}

.source-story-content {
    flex: 1;
}

.source-story-category {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.source-story-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.source-story-image {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.source-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; /* More headroom for faces */
}

.source-showcase-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.source-showcase-time {
    font-size: 12px;
    color: #999;
}


/* Article Preview Modal - Redesigned */
.article-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-preview-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.article-preview-modal {
    background: #000; /* Black background like PDF */
    border-radius: 1.25rem;
    max-width: 800px; /* Wider for desktop like PDF */
    min-width: 320px;
    width: 92%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 0, 0, 0.1);
    transform: translateY(30px) scale(0.92);
    transition: transform 0.4s cubic-bezier(0, 0, 0.2, 1);
    position: relative;
    overflow: visible;
}

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

.article-preview-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-preview-close:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg) scale(1.05);
}

.article-preview-close svg {
    width: 1rem;
    height: 1rem;
    stroke: #fff;
    stroke-width: 2.5;
}

.article-preview-hero {
    width: 100%;
    height: 500px; /* Much taller like PDF - 60-70% of modal */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 1.25rem 1.25rem 0 0;
    overflow: visible;
    position: relative;
    flex-shrink: 0;
    z-index: 1;
}

/* Dark gradient overlay for text readability */
.hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.9) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Container for title and meta at bottom of hero */
.hero-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 2;
}

/* Title overlaid on hero image - larger and at bottom */
.article-preview-title-overlay {
    color: white;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* PDF Design: Hero content overlay with gradient */
.hero-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 32px 8px 32px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 20%,
        rgba(0, 0, 0, 0.7) 60%,
        rgba(0, 0, 0, 0.95) 100%
    );
    z-index: 2;
}

/* Edge-to-edge horizontal line below hero - Brand Red */
.hero-content-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #E63946;
}

/* PDF Design: Hero title */
.hero-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 16px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* PDF Design: Source circles container */
.hero-sources-circles {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

/* PDF Design: Individual source circle */
.hero-source-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-source-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* PDF Design: +N more circle */
.hero-source-more {
    background: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    color: #000;
}

/* Meta row: sources circles on left, publisher on right */
.article-preview-meta-overlay {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}

/* Source circles row */
.sources-circles {
    display: flex;
    align-items: center;
    gap: 8px;
}

.source-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.source-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sources-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-left: 4px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Publisher text on the right */
.publisher-text {
    color: white;
    font-size: 15px;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.article-preview-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; /* More headroom - show upper portion */
    transition: object-position 0.3s ease;
}

/* For portrait images (taller than wide), show upper portion for faces */
.article-preview-hero img[data-orientation="portrait"] {
    object-position: center 25%;
}

/* For landscape images (wider than tall), show upper portion for faces */
.article-preview-hero img[data-orientation="landscape"] {
    object-position: center 15%;
}

/* For square-ish images */
.article-preview-hero img[data-orientation="square"] {
    object-position: center 20%;
}

/* Placeholder for articles without images */
.article-preview-hero-placeholder {
    background: #f5f5f5; /* Light gray background */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.placeholder-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 8px;
}

.placeholder-text {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    text-align: center;
    padding: 0 20px;
}

/* Dark content card for modern design */
.article-preview-content {
    background: #1a1a1a; /* Dark background */
    color: #ffffff; /* White text */
    padding: 30px;
    position: relative;
    z-index: 5;
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    border-radius: 0 0 1.25rem 1.25rem;
}

/* Summary text in dark theme */
.article-preview-summary {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
}

/* Read More button */
.article-preview-read-more {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 0;
    transition: color 0.2s ease;
}

.article-preview-read-more:hover {
    color: #ffffff;
}

/* No negative margin for placeholder */
.article-preview-hero-placeholder + .article-preview-content {
    margin-top: 0;
    padding-top: 16px;
}

/* Hide scrollbar but keep functionality */
.article-preview-content::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.article-preview-content {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.article-preview-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.625rem;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.article-preview-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: #cccccc;
    flex-wrap: wrap;
}

.article-preview-publisher {
    font-weight: 500;
    color: #ffffff;
}

.article-preview-time {
    color: #aaaaaa;
    font-size: 0.7rem;
}

.article-preview-share {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.article-preview-share:hover {
    background: #f5f5f5;
}

.article-preview-share svg {
    width: 1.125rem;
    height: 1.125rem;
    stroke: #666;
}

/* Article Preview Sources (Perplexity-style) */
.article-preview-sources {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0 -30px 16px -30px;
    position: relative;
    z-index: 100;
}

/* Single source styling - only show share button on right */
.article-preview-sources.single-source {
    justify-content: flex-end;
    padding: 6px 30px 12px;
    border-bottom: none;
}

.article-preview-sources-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.article-preview-share-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.2s;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 150;
}

.article-preview-share-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #E53935;
    transform: scale(1.1);
}

.article-preview-sources-header {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 500;
    color: #cccccc;
    white-space: nowrap;
}

.sources-icon {
    display: none;
    color: #1a73e8;
}

.sources-icon svg {
    width: 14px;
    height: 14px;
}

.sources-count {
    font-size: 9px;
    font-weight: 500;
    color: #aaaaaa;
    white-space: nowrap;
    margin-left: 6px;
}

.article-preview-sources-list {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: 4px;
}

.source-item {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 1.5px solid #fff;
    transition: all 0.2s;
    position: relative;
    background: #f5f5f5;
}

.source-item:not(:first-child) {
    margin-left: -8px;
}

.source-item:nth-child(1) { z-index: 10; }
.source-item:nth-child(2) { z-index: 9; }
.source-item:nth-child(3) { z-index: 8; }
.source-item:nth-child(4) { z-index: 7; }
.source-item:nth-child(5) { z-index: 6; }

.source-item.active {
    border-color: #1a73e8;
    transform: scale(1.15);
    z-index: 20 !important;
}

.source-item:hover {
    transform: scale(1.15);
    border-color: #0066cc;
    z-index: 15 !important;
}

.source-item-favicon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.source-item.more {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
}

.article-preview-read-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.article-preview-section {
    margin-bottom: 12px;
}

.article-preview-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-preview-section-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.7;
    color: #1a73e8;
}

.article-preview-ai-summary {
    color: #ffffff;
    line-height: 1.6;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    font-weight: 400;
}


.article-preview-rss-content {
    color: #444;
    line-height: 1.6;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.article-preview-rss-content p {
    margin-bottom: 0.75rem;
}

.article-preview-tags {
    font-size: 0.625rem;
    color: #bbb;
    line-height: 1.6;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

.article-preview-actions {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-preview-source-link {
    color: #5b9df9;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 400;
    transition: color 0.2s ease;
    display: inline-block;
}

.article-preview-source-link:hover {
    color: #8bb9ff;
    text-decoration: underline;
}

/* Mobile: TikTok-style fixed layout - image and text move together as one unit */
@media (max-width: 768px) {
    .article-preview-modal {
        max-width: 100vw;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    /* Larger image on mobile for TikTok-style */
    .article-preview-hero {
        height: 45vh;
        max-height: 45vh;
        border-radius: 0;
        flex-shrink: 0;
    }

    /* PDF Design: Mobile hero overlay adjustments */
    .hero-content-overlay {
        padding: 16px 20px 6px 20px;
    }

    .hero-title {
        font-size: 20px;
        line-height: 1.3;
        margin: 0 0 8px 0;
    }

    .hero-sources-circles {
        bottom: 12px;
        left: 12px;
    }

    .hero-source-circle {
        width: 32px;
        height: 32px;
    }

    .hero-source-more {
        font-size: 10px;
    }

    /* Fixed content area - no scrolling */
    .article-preview-content {
        flex: 1;
        overflow-y: hidden; /* No scrolling - fixed layout */
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        padding: 1rem;
        margin-top: -1.5rem; /* Overlap with image */
    }

    /* Compact spacing on mobile */
    .article-preview-title {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        /* Limit to 3 lines */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .article-preview-meta {
        margin-bottom: 0.75rem;
        font-size: 0.7rem;
    }

    .article-preview-sources {
        padding: 4px 1rem;
        margin: -8px -1rem 12px -1rem;
    }

    /* Summary - limit lines to fit in viewport */
    .article-preview-ai-summary {
        /* Limit to available space */
        display: -webkit-box;
        -webkit-line-clamp: 6;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.85rem;
        line-height: 1.4;
        flex: 1;
        margin-bottom: 0.75rem;
    }

    /* Actions at bottom */
    .article-preview-actions {
        margin-top: auto;
        padding-bottom: 0.5rem;
    }

    /* Close button positioning for mobile */
    .article-preview-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 2rem;
        height: 2rem;
    }

    /* Hide or minimize ad on mobile to save space */
    .article-preview-ad-slot {
        display: none;
    }
}

/* Floating Article Scroll (Mobile only - TikTok-style) */
.floating-article-scroll {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: auto;
}

.floating-article-scroll.hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.floating-scroll-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 16px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar */
.floating-scroll-track::-webkit-scrollbar {
    display: none;
}

.floating-scroll-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.floating-scroll-item {
    flex: 0 0 auto;
    width: 120px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.floating-scroll-item:active {
    transform: scale(0.92);
    opacity: 0.8;
}

.floating-scroll-thumbnail {
    width: 120px;
    height: 160px;
    border-radius: 12px;
    background-color: #222;
    background-size: cover;
    background-position: center;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.floating-scroll-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.floating-scroll-title {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.floating-scroll-source {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hide floating scroll on desktop */
@media (min-width: 769px) {
    .floating-article-scroll {
        display: none;
    }
}

/* AdSense Ad Slot - Dynamic sizing (user-first approach) */
.article-preview-ad-slot {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    min-height: 0; /* No fixed height - only takes space if ad loads */
    background: #ffffff;
    display: none; /* Hidden by default, shown via JS when needed */
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* Keep ad visible when it loads */
.article-preview-ad-slot .adsbygoogle {
    min-height: 50px; /* Reduced minimum */
    width: 100%;
    max-height: 250px; /* Cap maximum ad height */
}

/* Ad loads successfully */
.article-preview-ad-slot .adsbygoogle[data-ad-status="filled"] {
    height: auto;
}


/* Skeleton Loaders - Modern Loading State */
.skeleton-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.skeleton-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #e8e8e8 25%, #d0d0d0 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-content {
    padding: 16px;
}

.skeleton-title {
    height: 20px;
    background: linear-gradient(90deg, #e8e8e8 25%, #d0d0d0 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

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

.skeleton-text {
    height: 14px;
    background: linear-gradient(90deg, #e8e8e8 25%, #d0d0d0 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    width: 80%;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Staggered Article Loading Animation */
.article-card-enter {
    animation: slideInUp 0.4s ease forwards;
    opacity: 0;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progressive loading - hide until in viewport */
.article-card-lazy {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.article-card-lazy.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Personalization Toggle Button */
.personalize-toggle {
    background: none;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding: 0;
    margin-left: 12px;
}

.personalize-toggle:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

.personalize-toggle.active {
    background: #007bff;
    border-color: #007bff;
}

.personalize-toggle svg {
    width: 20px;
    height: 20px;
    stroke: #666;
    transition: all 0.3s ease;
}

.personalize-toggle.active svg {
    stroke: #fff;
}

.personalize-toggle .icon-on {
    display: none;
}

.personalize-toggle.active .icon-off {
    display: none;
}

.personalize-toggle.active .icon-on {
    display: block;
}

/* Personalization Toast Notification */
.personalization-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.personalization-toast.show {
    opacity: 1;
    transform: translateY(0);
}


/* PWA Install Banner */
.install-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 73px;
    z-index: 98;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

/* Hide install banner on desktop */
@media (min-width: 1024px) {
    .install-banner {
        display: none !important;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.install-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.install-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.install-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.install-banner-text strong {
    font-size: 16px;
    font-weight: 600;
}

.install-banner-text span {
    font-size: 13px;
    opacity: 0.9;
}

.install-banner-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.install-banner-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.install-banner-button:active {
    transform: translateY(0);
}

.install-banner-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.2s;
    flex-shrink: 0;
}

.install-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
}


/* ===== CATEGORY PAGE STYLES ===== */

/* Category Header */
.category-header {
    background: #fff;
    padding: 48px 24px 24px;
    border-bottom: 1px solid #e0e0e0;
}
.category-header-content {
    max-width: var(--max-width);
    margin: 0 auto;
}
.category-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #000;
}
.category-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* Articles Grid - YouTube Style */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 16px;
    margin-bottom: 48px;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--content-padding);
}

.article-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s;
    background: #fff;
}
.article-card:hover {
    transform: translateY(-2px);
}

.card-image {
    position: relative;
    width: 100%;
    height: 200px !important;
    max-height: 200px !important;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}
.card-image img {
    width: 100%;
    height: 100% !important;
    max-height: 200px !important;
    object-fit: cover;
    object-position: center;
    display: block;
}

.source-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}
.source-badge.premium {
    background: #fbbf24;
}
.source-badge.mainstream {
    background: #3b82f6;
}

.card-content {
    flex: 1;
}
.card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}
.source-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}
.source-name {
    font-weight: 500;
}
.separator {
    color: #ccc;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin: 48px 0;
}
.load-more-btn {
    padding: 12px 32px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.load-more-btn:hover:not(:disabled) {
    background: #e0e0e0;
}
.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .category-title {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 12px;
    }
    .category-title {
        font-size: 36px;
    }
    .category-header {
        padding: 32px 16px 16px;
    }
}

/* Source picker modal */
.source-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.source-picker-modal.active {
    display: flex;
}

.source-picker-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.source-picker-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.source-picker-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.source-picker-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.source-picker-close:hover {
    background: #f0f0f0;
}

.source-picker-list {
    padding: 12px;
}

.source-picker-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.source-picker-item:hover {
    background: #f5f5f5;
}

.source-picker-favicon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.source-picker-info {
    flex: 1;
}

.source-picker-name {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 2px;
}

.source-picker-preview {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .category-title {
        font-size: 32px;
    }
    .card-title {
        font-size: 15px;
        -webkit-line-clamp: 3;
    }
    .card-image {
        height: 180px !important;
        max-height: 180px !important;
    }
    .card-image img {
        height: 100% !important;
        max-height: 180px !important;
    }

    .source-picker-content {
        max-width: 95%;
        max-height: 90vh;
        border-radius: 8px;
    }

    .source-picker-header {
        padding: 16px;
    }

    .source-picker-title {
        font-size: 16px;
    }
}

/* Mobile Responsive Styles for New Modal Design */
@media (max-width: 768px) {
    .article-preview-modal {
        max-width: 100vw;
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    /* Increase hero height to 50% of viewport for better visual impact */
    .article-preview-hero {
        height: 50vh;
        min-height: 400px;
        max-height: 600px;
        border-radius: 0;
    }

    /* Adjust hero overlay padding - more space at bottom before red line */
    .hero-content-overlay {
        padding: 24px 20px 24px 20px;
    }

    .hero-overlay-content {
        padding: 20px;
    }

    /* Larger hero title on mobile */
    .hero-title {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .article-preview-title-overlay {
        font-size: 24px;
    }

    /* Make source circles larger and more visible on mobile */
    .source-item {
        width: 32px;
        height: 32px;
        border-width: 2px;
    }

    .source-item:not(:first-child) {
        margin-left: -12px;
    }

    .source-item.more {
        font-size: 12px;
    }

    .source-circle {
        width: 32px;
        height: 32px;
    }

    /* Larger source list text */
    .sources-text, .publisher-text {
        font-size: 14px;
    }

    .sources-count {
        font-size: 13px;
    }

    .article-preview-content {
        padding: 20px;
    }

    .article-preview-summary {
        font-size: 15px;
        line-height: 1.6;
    }

    /* More space for content section on mobile */
    .article-preview-meta {
        margin-bottom: 16px;
    }
}

/* Navigation Guide Overlay - First-time user onboarding */
.navigation-guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000; /* Above modal */
    animation: guideOverlayFadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

@keyframes guideOverlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.navigation-guide-overlay.guide-fade-out {
    animation: guideOverlayFadeOut 0.3s ease forwards;
}

@keyframes guideOverlayFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.navigation-guide-content {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: guideContentSlideUp 0.4s ease;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

@keyframes guideContentSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navigation-guide-header {
    margin-bottom: 24px;
    text-align: center;
    border-bottom: 1px solid rgba(230, 57, 70, 0.2);
    padding-bottom: 16px;
}

.navigation-guide-header h3 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.navigation-guide-header p {
    color: #aaaaaa;
    font-size: 14px;
    margin: 0;
}

.navigation-guide-instructions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.guide-instruction {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.guide-instruction:hover {
    background: rgba(255, 255, 255, 0.08);
}

.guide-key {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(230, 57, 70, 0.1);
    border: 2px solid #E63946;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E63946;
    font-weight: 600;
    font-size: 14px;
}

.guide-key svg {
    color: #E63946;
}

.guide-description {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.guide-description strong {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.guide-description span {
    color: #aaaaaa;
    font-size: 14px;
}

.navigation-guide-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(230, 57, 70, 0.2);
}

.navigation-guide-footer p {
    color: #888888;
    font-size: 13px;
    margin: 0 0 16px 0;
}

.navigation-guide-footer #guide-timer {
    color: #E63946;
    font-weight: 600;
}

.guide-dismiss-btn {
    background: #E63946;
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.guide-dismiss-btn:hover {
    background: #d32f3c;
    transform: translateY(-1px);
}

.guide-dismiss-btn:active {
    transform: translateY(0);
}

/* Mobile responsive for navigation guide */
@media (max-width: 768px) {
    .navigation-guide-content {
        padding: 24px;
        max-width: 90%;
    }

    .navigation-guide-header h3 {
        font-size: 20px;
    }

    .guide-instruction {
        gap: 12px;
        padding: 10px 12px;
    }

    .guide-key {
        width: 40px;
        height: 40px;
    }

    .guide-key svg {
        width: 20px;
        height: 20px;
    }

    .guide-description strong {
        font-size: 14px;
    }

    .guide-description span {
        font-size: 12px;
    }
}

/* Article Share Button */
.compact-card-meta-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-share-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
    border-radius: 50%;
}

.article-share-btn:hover {
    background: #f0f0f0;
    color: #E53935;
    transform: scale(1.1);
}

.article-share-btn svg {
    width: 16px;
    height: 16px;
}

/* Share Menu for Articles */
.article-share-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    padding: 8px;
    min-width: 200px;
    z-index: 2147483647;
    display: none;
}

.article-share-menu.active {
    display: block;
}

.article-share-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
    text-decoration: none;
}

.article-share-menu-item:hover {
    background: #f5f5f5;
}

.article-share-menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .article-share-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .compact-card-meta-right {
        gap: 8px;
    }
}

/* ============================================================================
   CONSENT BANNER - GDPR/CCPA Compliance
   ============================================================================ */

/* Consent Banner Overlay */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 2147483646; /* Just below share menu */
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: none;
}

.consent-banner.active {
    transform: translateY(0);
    display: block;
}

.consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.consent-content {
    display: flex;
    gap: 24px;
    align-items: center;
}

.consent-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.consent-text {
    flex: 1;
}

.consent-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.consent-text a {
    color: #E53935;
    text-decoration: underline;
}

.consent-text a:hover {
    color: #ff5252;
}

.consent-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.consent-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.consent-btn-primary {
    background: #E53935;
    color: #fff;
}

.consent-btn-primary:hover {
    background: #ff5252;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

.consent-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.consent-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.consent-btn-text {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
}

.consent-btn-text:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Consent Settings Modal */
.consent-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2147483646;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.consent-settings-modal.active {
    display: flex;
}

.consent-settings-content {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.consent-settings-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.consent-settings-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.consent-settings-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.consent-settings-close:hover {
    background: #f0f0f0;
    color: #000;
}

.consent-settings-body {
    padding: 24px;
}

.consent-category {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.consent-category:last-child {
    border-bottom: none;
}

.consent-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.consent-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.consent-category-required {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.consent-category-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.consent-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.consent-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.consent-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.consent-toggle input:checked + .consent-toggle-slider {
    background-color: #E53935;
}

.consent-toggle input:checked + .consent-toggle-slider:before {
    transform: translateX(24px);
}

.consent-toggle input:disabled + .consent-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.consent-settings-footer {
    padding: 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .consent-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .consent-icon {
        font-size: 32px;
    }

    .consent-actions {
        width: 100%;
    }

    .consent-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .consent-settings-content {
        max-height: 90vh;
    }
}
