:root {
    --primary-hue: 230;
    --primary: hsl(var(--primary-hue), 85%, 60%);
    --primary-dark: hsl(var(--primary-hue), 85%, 45%);
    --accent: hsl(280, 85%, 60%);

    --bg-dark: hsl(220, 20%, 10%);
    --bg-card: hsla(220, 20%, 16%, 0.6);
    --text-main: hsl(0, 0%, 100%);
    --text-muted: hsl(220, 10%, 70%);

    --glass-border: 1px solid hsla(0, 0%, 100%, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    top: 0 !important;
    /* Fix Google Translate pushing body down */
}

/* HIDE ALL GOOGLE TRANSLATE UI */
#google_translate_element,
.goog-te-banner-frame,
.goog-te-gadget,
.skiptranslate,
body>.skiptranslate {
    display: none !important;
}

/* Dynamic Background */
.glass-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 20%, hsla(260, 60%, 20%, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, hsla(200, 60%, 20%, 0.4) 0%, transparent 40%);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(15, 20, 35, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    cursor: pointer;
}

.highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 8px 20px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.search-box.hidden {
    display: none;
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 250px;
    font-size: 0.95rem;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-box button {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.search-box button:hover {
    transform: scale(1.15);
}

.icon-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* Manual refresh button styles */
#manual-refresh[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

#manual-refresh.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Source badge styles */
#source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-left: 6px;
}

#source-badge.server {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
}

#source-badge.remote {
    background: rgba(52, 152, 219, 0.08);
    color: #3498db;
}

#source-badge.fallback {
    background: rgba(231, 76, 60, 0.08);
    color: #e74c3c;
}

/* Language Scroller - CLEAN WITH SEARCH */
.lang-scroll-wrap {
    background: linear-gradient(135deg, rgba(20, 25, 45, 0.98), rgba(30, 35, 55, 0.98));
    border-bottom: 2px solid rgba(80, 120, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 12px 0;
    overflow: hidden;
    position: relative;
}

/* Region Search Container */
.lang-search-container {
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    position: relative;
}

.lang-search-container::before {
    content: '🌍 Choose Your Region for Global News';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(80, 120, 255, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.05);
    }
}

.region-search-input {
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 25px;
    padding: 10px 24px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    max-width: 450px;
    transition: all 0.3s;
    font-family: var(--font-body);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.region-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.region-search-input:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(80, 120, 255, 0.5), 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
}

.lang-scroll {
    display: inline-block;
    padding-left: 20px;
    padding-right: 20px;
    animation: ticker 120s linear infinite;
    white-space: nowrap;
}

.lang-scroll:hover {
    animation-play-state: paused;
}

.lang-pill {
    display: inline-block;
    padding: 8px 18px;
    margin-right: 14px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(80, 120, 255, 0.2), rgba(150, 80, 255, 0.2));
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.lang-pill:hover,
.lang-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 8px 25px rgba(80, 120, 255, 0.6);
}

/* Ticker */
.ticker-wrap {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    height: 40px;
    align-items: center;
    overflow: hidden;
}

.ticker-heading {
    background: linear-gradient(135deg, #ff4d4d, #ff6b6b);
    color: #fff;
    padding: 0 1.2rem;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    z-index: 2;
    letter-spacing: 2px;
}

.ticker {
    white-space: nowrap;
    animation: ticker 80s linear infinite;
    padding-left: 20px;
    font-size: 0.9rem;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Main Layout Grid */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 2rem;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ff4d4d;
    font-weight: 700;
    font-size: 0.8rem;
}

.dot {
    width: 8px;
    height: 8px;
    background: #ff4d4d;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff4d4d;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

/* Hero Card */
.hero-card {
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    margin-bottom: 3rem;
    background: var(--bg-card);
    border: var(--glass-border);
    transition: transform 0.3s;
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.hero-tag {
    background: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: inline-block;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: white;
}

.hero-summary {
    color: #ddd;
    max-width: 800px;
}

/* News Grid with Dynamic Layout */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
    padding-bottom: 2rem;
}

/* Base Card Styles */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
}

.card:hover {
    background: hsla(220, 20%, 22%, 0.9);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px -10px rgba(80, 120, 255, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Large Featured Cards */
.card-large {
    grid-column: span 2;
}

.card-featured {
    border: 2px solid var(--primary);
    box-shadow: 0 10px 40px rgba(80, 120, 255, 0.2);
}

/* Card Image Wrapper */
.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-large .card-image-wrapper {
    height: 320px;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.85);
}

.card:hover .card-image {
    transform: scale(1.08);
    filter: brightness(1);
}

/* Category Badge on Image */
.card-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Card Content */
.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Card Meta Info */
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    gap: 0.5rem;
}

.card-source,
.card-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-source {
    color: var(--primary);
    font-weight: 600;
}

.card-source ion-icon,
.card-time ion-icon {
    font-size: 1rem;
}

/* Card Title */
.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.card:hover .card-title {
    color: var(--primary);
}

.card-large .card-title {
    font-size: 2rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* Card Summary */
.card-summary {
    font-size: 0.95rem;
    color: #ccc;
    flex-grow: 1;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-large .card-summary {
    -webkit-line-clamp: 4;
    line-clamp: 4;
    font-size: 1rem;
}

/* Card Link */
.card-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(80, 120, 255, 0.1);
    transition: all 0.3s;
}

.card-link:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar Widgets */
.widget {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget h3 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 3px solid var(--accent);
    padding-left: 0.8rem;
}

.trending-list {
    list-style: none;
}

.trending-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: padding-left 0.2s;
}

.trending-list li:hover {
    padding-left: 10px;
    color: var(--primary);
}

.ad-container {
    margin-bottom: 2rem;
    text-align: center;
}

.ad-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-box {
    background: rgba(255, 255, 255, 0.05);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-top: 5px;
    color: var(--text-muted);
}

.input-group {
    display: flex;
    margin-top: 1rem;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border-radius: 4px 0 0 4px;
}

.input-group button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0 15px;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

/* Floating AI News Anchor FAB */
.ai-anchor-fab {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(80, 100, 255, 0.5);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.ai-anchor-fab:hover {
    transform: scale(1.1) rotate(10deg);
}

.ai-ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.6;
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.ai-tooltip {
    position: absolute;
    right: 85px;
    background: rgba(15, 20, 35, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    font-weight: 500;
    pointer-events: none;
}

.ai-anchor-fab:hover .ai-tooltip {
    opacity: 1;
}


/* AI Interface (Chat Panel) */
.ai-interface {
    position: fixed;
    bottom: 120px;
    right: 40px;
    width: 380px;
    max-width: 90vw;
    height: 500px;
    background: rgba(20, 25, 40, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 1;
    transform: scale(1);
}

.ai-interface.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

.ai-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px 20px 0 0;
}

.ai-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.ai-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.ai-close:hover {
    color: white;
}

.ai-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-message {
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
    max-width: 90%;
    animation: fadeIn 0.3s ease;
}

.bot-message {
    background: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.user-message {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-controls {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 20px 20px;
}

.ai-control-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.ai-control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ai-control-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
}

.ai-control-btn.primary:hover {
    opacity: 0.9;
}

.ai-control-btn.delete {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
}


/* Skeleton Loading Animations */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
    height: 250px;
}

.skeleton-hero {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

.skeleton-text {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    height: 20px;
    border-radius: 4px;
    margin: 10px 0;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}


/* Modern Footer */
.modern-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f121a;
    padding: 4rem 0 0;
    margin-top: 6rem;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: white;
}

.brand-col p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-input-group input {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    color: white;
    outline: none;
}

.footer-input-group button {
    background: var(--primary);
    border: none;
    width: 40px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

/* Mobile Responsive */
/* ================================================
   MOBILE RESPONSIVE STYLES
   ================================================ */

@media (max-width: 900px) {

    /* Layout */
    .main-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }

    /* Hide desktop-only elements */
    .ticker-wrap {
        display: none;
    }

    /* Header adjustments */
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
        justify-content: center;
        padding: 0.5rem 0;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .search-box {
        width: 100%;
        max-width: 400px;
    }

    /* Language selector - mobile optimized */
    .lang-search-container::before {
        font-size: 0.65rem;
        padding: 3px 12px;
        top: -18px;
    }

    .region-search-input {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

    .lang-pill {
        padding: 6px 14px;
        font-size: 0.85rem;
        margin-right: 10px;
    }

    /* Hero card - smaller on mobile */
    .hero-card {
        height: 300px;
        margin-bottom: 2rem;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero-summary {
        font-size: 0.9rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-overlay {
        padding: 1.5rem;
    }

    /* News grid - single column on small screens */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    /* All cards same size on mobile */
    .card-large {
        grid-column: span 1;
    }

    .card-large .card-image-wrapper {
        height: 220px;
    }

    .card-large .card-title {
        font-size: 1.4rem;
    }

    .card-large .card-summary {
        font-size: 0.95rem;
    }

    .card-image-wrapper {
        height: 200px;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .card-summary {
        font-size: 0.9rem;
    }

    .card-meta {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    .card-content {
        padding: 1.2rem;
    }

    /* Section headers */
    .section-header h2 {
        font-size: 1.5rem;
    }

    /* Sidebar widgets */
    .widget {
        padding: 1.2rem;
    }

    .widget h3 {
        font-size: 1.2rem;
    }

    /* Footer - stack columns */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-col {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 1.5rem;
    }

    .footer-col:last-child {
        border-bottom: none;
    }

    .social-links {
        justify-content: center;
    }

    .footer-input-group {
        max-width: 350px;
        margin: 0 auto;
    }

    /* AI Chatbot - full screen on mobile */
    .ai-anchor-fab {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        bottom: 20px;
        right: 20px;
    }

    .ai-interface {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 75vh;
        max-height: 75vh;
        border-radius: 20px 20px 0 0;
    }

    .ai-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    .ai-control-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 120px;
        font-size: 0.85rem;
        padding: 8px;
    }
}

/* Extra small phones - 480px and below */
@media (max-width: 480px) {
    .logo {
        font-size: 1.1rem;
    }

    .hero-card {
        height: 250px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-summary {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .card-content {
        padding: 1rem;
    }

    .ai-control-btn {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .nav-links {
        gap: 0.6rem;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Skeletons */
.skeleton {
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.5;
    }
}



/* ========================================
   ENHANCED IMAGE LOADING
   ======================================== */
.image-placeholder {
    width: 100%;
    height: 100%;
    background: #151a28;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: shimmer-load 1.5s infinite;
    z-index: 1;
}

.image-placeholder::after {
    content: "Loading Visuals...";
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 0;
}

@keyframes shimmer-load {
    100% {
        transform: translateX(100%);
    }
}

.image-placeholder img {
    opacity: 0;
    transition: opacity 0.6s ease-out;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.image-placeholder.loaded img {
    opacity: 1;
}

.image-placeholder.loaded::before,
.image-placeholder.loaded::after {
    display: none;
    /* Hide loader elements once image is ready */
}


/* ========================================
   NEWS INTELLIGENCE DASHBOARD - PROFESSIONAL ANALYTICS
   ======================================== */

.intelligence-panel {
    position: fixed;
    right: -500px;
    top: 50%;
    transform: translateY(-50%);
    width: 480px;
    max-height: 90vh;
    background: linear-gradient(135deg,
            rgba(15, 20, 35, 0.98) 0%,
            rgba(25, 30, 45, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px 0 0 20px;
    box-shadow: -15px 0 60px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(52, 152, 219, 0.15);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-right: none;
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.intelligence-panel.active {
    right: 0;
}

.intelligence-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 250px;
    background: linear-gradient(135deg,
            rgba(52, 152, 219, 0.1) 0%,
            rgba(41, 128, 185, 0.05) 100%);
    filter: blur(60px);
    pointer-events: none;
}

/* Intel Header */
.intel-header {
    position: relative;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 20, 35, 0.5);
    z-index: 1;
}

.intel-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.intel-icon {
    font-size: 1.8rem;
    color: #3498db;
    filter: drop-shadow(0 0 10px rgba(52, 152, 219, 0.6));
}

.intel-title h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 0;
    color: #fff;
    font-weight: 700;
}

.intel-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.7rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(52, 152, 219, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(52, 152, 219, 0.8);
    }
}

.intel-controls {
    display: flex;
    gap: 0.5rem;
}

.intel-minimize-btn,
.intel-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.intel-minimize-btn:hover {
    background: rgba(241, 196, 15, 0.2);
    border-color: rgba(241, 196, 15, 0.4);
}

.intel-close-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.4);
}

/* Intel Content */
.intel-content {
    position: relative;
    padding: 1.2rem;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    z-index: 1;
}

.intel-content::-webkit-scrollbar {
    width: 6px;
}

.intel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.intel-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 10px;
}

/* Intel Loading */
.intel-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border: 4px solid rgba(52, 152, 219, 0.1);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Data Cards */
.data-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(52, 152, 219, 0.15);
    border-radius: 16px;
    padding: 1.3rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.data-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-header ion-icon {
    font-size: 1.4rem;
    color: #3498db;
}

.card-header h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin: 0;
    color: #ecf0f1;
    flex: 1;
}

.source-count {
    font-size: 0.75rem;
    color: #7f8c8d;
    padding: 0.3rem 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 220px;
    margin-bottom: 1rem;
}

.chart-container canvas {
    max-height: 220px;
}

/* Trend Stats */
.trend-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.stat-badge {
    padding: 0.4rem 0.9rem;
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.stat-badge.negative {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.3);
}

/* Sources List */
.sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.source-item {
    display: flex;
    align-items: center;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border-left: 3px solid #3498db;
    transition: all 0.3s;
}

.source-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.source-icon {
    width: 36px;
    height: 36px;
    background: rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.9rem;
    font-size: 1.2rem;
}

.source-details {
    flex: 1;
}

.source-name {
    font-weight: 600;
    color: #ecf0f1;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.source-meta {
    font-size: 0.75rem;
    color: #95a5a6;
}

.credibility-stars {
    color: #f39c12;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* Timeline Container */
.timeline-container {
    position: relative;
    padding: 1rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0.6rem;
    bottom: -0.5rem;
    width: 2px;
    background: linear-gradient(180deg, #3498db, rgba(52, 152, 219, 0.2));
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    background: #3498db;
    border-radius: 50%;
    border: 2px solid rgba(15, 20, 35, 1);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.6);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.timeline-time {
    font-size: 0.75rem;
    color: #3498db;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.timeline-text {
    font-size: 0.9rem;
    color: #bdc3c7;
    line-height: 1.5;
}

/* Geographic Container */
.geo-container {
    position: relative;
    height: 200px;
    margin-bottom: 1rem;
}

.geo-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.geo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.geo-flag {
    font-size: 1.5rem;
    margin-right: 0.6rem;
}

.geo-name {
    flex: 1;
    color: #ecf0f1;
    font-size: 0.9rem;
    font-weight: 500;
}

.geo-count {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.geo-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 0.4rem;
    overflow: hidden;
}

.geo-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 10px;
    transition: width 0.8s ease;
}

/* Keyword Cloud */
.keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.5rem 0;
}

.keyword-tag {
    padding: 0.5rem 1rem;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(52, 152, 219, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.keyword-tag:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.keyword-tag.large {
    font-size: 1.1rem;
    padding: 0.6rem 1.2rem;
}

.keyword-tag.medium {
    font-size: 0.95rem;
}

.keyword-tag.small {
    font-size: 0.8rem;
}

/* Intelligence Button on Cards */
.intelligence-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    margin-top: 0.5rem;
}

.intelligence-btn ion-icon {
    font-size: 1.1rem;
}

.intelligence-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
}

.intelligence-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .intelligence-panel {
        right: -100%;
        width: 95%;
        max-width: 100%;
        border-radius: 0;
        max-height: 95vh;
    }

    .intelligence-panel.active {
        right: 0;
    }

    .chart-container {
        height: 180px;
    }
}

.ai-lens-panel {
    position: fixed;
    right: -450px;
    top: 50%;
    transform: translateY(-50%);
    width: 420px;
    max-height: 85vh;
    background: linear-gradient(135deg,
            rgba(30, 35, 55, 0.95) 0%,
            rgba(20, 25, 45, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px 0 0 24px;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(80, 120, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    z-index: 9999;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.ai-lens-panel.active {
    right: 0;
}

.ai-lens-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg,
            rgba(80, 120, 255, 0.15) 0%,
            rgba(150, 80, 255, 0.15) 100%);
    filter: blur(40px);
    opacity: 0.6;
    animation: holographicShift 10s ease-in-out infinite;
}

@keyframes holographicShift {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-30px) scale(1.1);
        opacity: 0.8;
    }
}

/* AI Header */
.ai-lens-header {
    position: relative;
    padding: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg,
            rgba(80, 120, 255, 0.1) 0%,
            rgba(150, 80, 255, 0.05) 100%);
    z-index: 1;
}

.ai-lens-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.ai-brain-icon {
    font-size: 2rem;
    animation: brainPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(80, 120, 255, 0.8));
}

@keyframes brainPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(80, 120, 255, 0.8));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px rgba(150, 80, 255, 0.9));
    }
}

.ai-lens-title h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0;
    background: linear-gradient(135deg, #5078ff 0%, #9650ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(80, 120, 255, 0.5);
    animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(80, 120, 255, 0.5);
    }

    50% {
        box-shadow: 0 0 25px rgba(150, 80, 255, 0.8);
    }
}

.ai-lens-controls {
    display: flex;
    gap: 0.5rem;
}

.ai-minimize-btn,
.ai-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.ai-minimize-btn:hover {
    background: rgba(255, 200, 0, 0.3);
    border-color: rgba(255, 200, 0, 0.5);
    transform: scale(1.1);
}

.ai-close-btn:hover {
    background: rgba(255, 80, 80, 0.3);
    border-color: rgba(255, 80, 80, 0.5);
    transform: scale(1.1) rotate(90deg);
}

/* AI Content */
.ai-lens-content {
    position: relative;
    padding: 1.5rem;
    max-height: calc(85vh - 100px);
    overflow-y: auto;
    z-index: 1;
}

.ai-lens-content::-webkit-scrollbar {
    width: 6px;
}

.ai-lens-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.ai-lens-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
}

/* AI Loading */
.ai-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.ai-loader {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.ai-pulse {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    animation: pulseWave 1.5s ease-in-out infinite;
}

.ai-pulse:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-pulse:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulseWave {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 0 rgba(80, 120, 255, 0);
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 20px rgba(80, 120, 255, 0.8);
    }
}

/* AI Sections */
.ai-section {
    margin-bottom: 2rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
}

.ai-section:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(80, 120, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(80, 120, 255, 0.1);
}

.ai-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.ai-section-header ion-icon {
    font-size: 1.5rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(80, 120, 255, 0.6));
}

.ai-section-header h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-main);
}

/* Smart Insights List */
.ai-insight-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-insight-list li {
    padding: 0.8rem 0 0.8rem 2rem;
    position: relative;
    color: #e0e0e0;
    line-height: 1.6;
    border-left: 3px solid rgba(80, 120, 255, 0.3);
    margin-bottom: 0.8rem;
    background: rgba(80, 120, 255, 0.05);
    border-radius: 0 8px 8px 0;
    transition: all 0.3s;
}

.ai-insight-list li::before {
    content: '✦';
    position: absolute;
    left: 0.5rem;
    color: var(--primary);
    font-size: 1.2rem;
}

.ai-insight-list li:hover {
    background: rgba(80, 120, 255, 0.1);
    border-left-color: var(--accent);
    transform: translateX(5px);
}

/* Simple Text */
.ai-simple-text {
    color: #d0d0d0;
    line-height: 1.7;
    font-size: 0.95rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 4px solid rgba(150, 80, 255, 0.4);
}

/* Sentiment Meter */
.sentiment-meter {
    padding: 1rem 0;
}

.sentiment-bar {
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sentiment-fill {
    height: 100%;
    background: linear-gradient(90deg,
            #ff4d4d 0%,
            #ffaa00 50%,
            #4dff88 100%);
    border-radius: 20px;
    transition: width 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 15px currentColor;
    position: relative;
}

.sentiment-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.sentiment-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.sentiment-emoji {
    font-size: 2rem;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* Quick Takes List */
.ai-quick-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-quick-list li {
    padding: 0.7rem 0 0.7rem 1.8rem;
    position: relative;
    color: #e0e0e0;
    line-height: 1.5;
    margin-bottom: 0.6rem;
    transition: all 0.3s;
}

.ai-quick-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: bold;
}

.ai-quick-list li:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Context Text */
.ai-context-text {
    color: #d0d0d0;
    line-height: 1.7;
    font-size: 0.93rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 4px solid rgba(80, 200, 255, 0.4);
}

/* AI Button on Cards */
.ai-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(80, 120, 255, 0.4);
    margin-top: 0.5rem;
}

.ai-trigger-btn::before {
    content: '🤖';
    font-size: 1.1rem;
}

.ai-trigger-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(80, 120, 255, 0.6),
        0 0 20px rgba(150, 80, 255, 0.4);
}

.ai-trigger-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .ai-lens-panel {
        right: -100%;
        width: 90%;
        max-width: 100%;
        border-radius: 0;
        max-height: 90vh;
    }

    .ai-lens-panel.active {
        right: 0;
    }
}