/* Bengali News PWA - Premium Modern Dark Theme */

:root {
    /* Background Colors - Deeper & Richer */
    --bg-primary: #0a0a12;
    --bg-secondary: #12121f;
    --bg-card: rgba(25, 25, 40, 0.8);
    --bg-hover: rgba(45, 45, 70, 0.6);
    --bg-glass: rgba(20, 20, 35, 0.7);

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Border & Dividers */
    --border: rgba(99, 102, 241, 0.15);
    --border-glow: rgba(99, 102, 241, 0.3);

    /* Accent Colors - Purple/Cyan Theme */
    --accent-primary: #6366f1;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --accent-glow: rgba(99, 102, 241, 0.4);

    /* Legacy accent support */
    --accent: #8b5cf6;
    --accent-light: #a78bfa;

    /* Status Colors */
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    --warning: #f59e0b;

    /* Premium Gradients */
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --gradient-3: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    --gradient-card: linear-gradient(145deg, rgba(30, 30, 50, 0.9) 0%, rgba(20, 20, 35, 0.95) 100%);

    /* Shadows - Premium with color tints */
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 0.1);

    /* Glassmorphism */
    --glass-blur: blur(20px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: var(--glass-border);
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.logo i {
    font-size: 24px;
    color: var(--accent);
}

.logo h2 {
    font-size: 18px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-group {
    margin-bottom: 25px;
}

.nav-header {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 5px;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    font-weight: 500;
    border-left: 3px solid var(--accent-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    padding: 30px;
    padding-right: 40px;
}

/* Mobile Nav */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: var(--glass-border);
    padding: 10px 0;
    z-index: 1000;
    justify-content: space-around;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    gap: 5px;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-item.active {
    color: var(--accent-primary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
}

/* Base News Grid (Restored) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Cards */
.news-card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    border: var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    height: 100%;
    /* Ensure card fills grid cell */
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.news-card:hover::before {
    opacity: 1;
}

.news-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* Standard property */
    /* Limit title to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 4.2em;
    /* Fixed height for consistency (1.4 * 3) */
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: auto;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Dashboard Hero */
.dashboard-hero {
    background: var(--gradient-hero);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: var(--glass-border);
    box-shadow: var(--shadow-card);
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: url('https://img.freepik.com/free-vector/global-data-security-personal-data-security-cyber-data-security-online-concept-illustration-internet-security-information-privacy-protection_1150-37336.jpg?w=740&t=st=1685890875~exp=1685891475~hmac=693933c0bd011be777320c22c0791480f2d4e68e42f9b1772183556098063004');
    background-size: cover;
    opacity: 0.1;
    mask-image: linear-gradient(to left, black, transparent);
    -webkit-mask-image: linear-gradient(to left, black, transparent);
}

.dashboard-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.dashboard-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    max-width: 600px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        margin-bottom: 70px;
        padding: 15px;
    }

    .bottom-nav {
        display: flex;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Hero Polish */
    .dashboard-hero {
        padding: 20px !important;
        margin-bottom: 15px !important;
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        border-radius: 12px;
    }

    .dashboard-hero h1 {
        font-size: 1.4rem !important;
        margin-bottom: 0 !important;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .dashboard-hero p {
        display: none;
    }

    .news-card .news-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Utilities */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-light);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   CALENDAR WIDGET STYLES
   ========================================= */
.calendar-widget {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

.calendar-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.calendar-header {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.calendar-container {
    padding: 0;
}

.time-display {
    display: flex;
    flex-direction: column;
}

.current-time {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 5px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -1px;
}

.current-date {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.greeting {
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bengali-date-display {
    text-align: right;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bengali-day {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-light);
    line-height: 1;
}

.bengali-month-year {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.bengali-weekday {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.special-day-alert {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
}

.special-day-alert.high {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-left: 4px solid #ef4444;
}

.special-day-alert.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
    border-left: 4px solid #f59e0b;
}

.special-day-alert.low {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    border-left: 4px solid #3b82f6;
}

.special-day-alert i {
    font-size: 1.1rem;
}

.calendar-events {
    padding: 15px 20px;
}

.calendar-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.event-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.event-item.active {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    min-width: 40px;
    height: 40px;
    border-radius: 6px;
    padding: 2px;
}

.event-date .day {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.event-date .day-bn {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1;
}

.event-details {
    flex: 1;
}

.event-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.event-name-bn {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.calendar-footer {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.calendar-location {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 600px) {
    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .bengali-date-display {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .event-list {
        grid-template-columns: 1fr;
    }
}

/* Lunar Event Styles (Purnima/Amavasya) */
.lunar-event {
    background: rgba(255, 193, 7, 0.1) !important;
    border-left: 4px solid #ffc107 !important;
}

.lunar-event.purnima {
    background: rgba(255, 215, 0, 0.15) !important;
    border-left-color: #ffd700 !important;
}

.lunar-event.amavasya {
    background: rgba(100, 116, 139, 0.15) !important;
    border-left-color: #64748b !important;
}

.special-day-alert.lunar-event.purnima {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.05));
    color: #fcd34d;
    border-left: 4px solid #ffd700;
}

.special-day-alert.lunar-event.amavasya {
    background: linear-gradient(90deg, rgba(100, 116, 139, 0.2), rgba(71, 85, 105, 0.05));
    color: #94a3b8;
    border-left: 4px solid #64748b;
}

/* ===============================================
   COMPACT CALENDAR EVENTS LAYOUT
   =============================================== */
.calendar-events-compact {
    padding: 12px;
}

.calendar-events-compact .calendar-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.event-list-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.event-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.event-row.today {
    background: rgba(249, 115, 22, 0.1);
    border-left-color: var(--accent);
}

.event-row.purnima {
    background: rgba(255, 215, 0, 0.08);
    border-left-color: #ffd700;
}

.event-row.amavasya {
    background: rgba(100, 116, 139, 0.08);
    border-left-color: #64748b;
}

.event-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.event-date-box .date-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.event-date-box .date-month {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

.event-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.event-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.event-text {
    min-width: 0;
    flex: 1;
}

.event-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-title-bn {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Optimization */
@media (max-width: 600px) {
    .calendar-events-compact {
        padding: 10px;
    }

    .event-row {
        padding: 8px 10px;
        gap: 10px;
    }

    .event-date-box {
        min-width: 40px;
        padding: 4px 6px;
    }

    .event-date-box .date-num {
        font-size: 1rem;
    }

    .event-title {
        font-size: 0.85rem;
    }

    .event-icon {
        font-size: 1rem;
    }
}

/* Mobile Stats Bar - Hidden on Desktop */
.mobile-stats-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-stats-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: var(--bg-card);
        padding: 12px 15px;
        margin-bottom: 15px;
        border-radius: 12px;
        border: 1px solid var(--border);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* Mobile Category Nav (Global) */
.mobile-cat-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-cat-nav {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding: 10px 15px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
    }

    .mobile-cat-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border-radius: 20px;
        background: var(--bg-primary);
        color: var(--text-muted);
        text-decoration: none;
        font-size: 13px;
        border: 1px solid var(--border);
        flex-shrink: 0;
    }

    .mobile-cat-pill.active {
        background: rgba(249, 115, 22, 0.1);
        color: var(--accent);
        border-color: var(--accent);
        font-weight: 500;
    }
}

/* Hot Topic Banner */
.hot-topic-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.02) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.hot-topic-banner .badge {
    background: #ef4444;
    color: white;
    margin-bottom: 12px;
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hot-topic-banner h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.4;
    color: var(--text-primary);
}

.hot-topic-banner .keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.keyword-tag {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* PREMIUM DASHBOARD LAYOUT (Grid + Stats) */
.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
}

.stat-info h3 {
    font-size: 28px;
    margin: 0;
    font-weight: 700;
    line-height: 1;
}

.stat-info p {
    margin: 5px 0 0 0;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Premium Grid */
.news-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
}

.news-card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
}

.news-card-premium:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-badge {
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.premium-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .news-grid-premium {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   MODAL STYLES (AI Content Studio)
   ========================================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active,
.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    max-height: 60vh;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }

    .modal-content {
        max-height: 85vh;
        border-radius: 12px;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-body {
        padding: 15px;
        max-height: 55vh;
    }

    .modal-footer {
        padding: 12px 15px;
        flex-wrap: wrap;
    }

    .modal-footer .btn {
        flex: 1;
        min-width: 80px;
    }
}

/* =========================================
   LARGE EDITOR MODAL (Added for AI Studio)
   ========================================= */
.modal-content.large-editor {
    max-width: 900px;
    height: 85vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-content.large-editor .modal-body {
    flex: 1;
    overflow: hidden;
    /* Let editor container handle scroll */
    padding: 0;
    display: flex;
    flex-direction: column;
}

#editor-container {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    padding: 20px;
}

/* Custom Scrollbar for Editor */
#editor-container::-webkit-scrollbar {
    width: 8px;
}

#editor-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

#editor-container::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}

#editor-container::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* Quill Toolbar Customization */
.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    background: var(--bg-card);
    padding: 10px !important;
}

.ql-container.ql-snow {
    border: none !important;
}

.ql-editor {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--text-primary);
    min-height: 100%;
}

.ql-toolbar .ql-stroke {
    stroke: var(--text-secondary) !important;
}

.ql-toolbar .ql-fill {
    fill: var(--text-secondary) !important;
}

.ql-toolbar .ql-picker {
    color: var(--text-secondary) !important;
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    max-width: 90%;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: var(--success);
}

.toast.success i {
    color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

.toast.error i {
    color: var(--danger);
}

/* =========================================
   TICKER STYLES
   ========================================= */
.ticker-container {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    border: 1px solid var(--border);
}

.ticker-label {
    background: var(--accent);
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    padding: 0 15px;
}

.ticker {
    display: flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 25px;
    color: var(--text-secondary);
    font-size: 13px;
}

.ticker-item i {
    color: var(--danger);
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .ticker-container {
        margin-bottom: 15px;
    }

    .ticker-label {
        padding: 10px 12px;
        font-size: 11px;
    }
}

/* =========================================
   AI STUDIO - COMPLETE REDESIGN
   ========================================= */

/* Main Container */
.ai-studio-container {
    max-width: 1000px;
    margin: 0 auto;
}

.ai-studio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.ai-studio-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-studio-header .btn-hack {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
    font-size: 13px;
    border-radius: 20px;
}

/* Configuration Panel */
.ai-config-panel {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.9), rgba(20, 20, 35, 0.95));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ai-config-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #a78bfa;
    font-weight: 600;
    cursor: pointer;
}

.ai-config-header i {
    font-size: 14px;
}

.ai-config-header span {
    flex: 1;
}

.ai-config-header .toggle-icon {
    transition: transform 0.3s;
}

.ai-config-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* Form Layout */
.ai-form-group {
    margin-bottom: 20px;
}

.ai-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ai-form-group input,
.ai-form-group textarea,
.ai-form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
}

.ai-form-group input:focus,
.ai-form-group textarea:focus,
.ai-form-group select:focus {
    border-color: #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
    outline: none;
}

.ai-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.ai-form-group input::placeholder,
.ai-form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Form Row (2 columns) */
.ai-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .ai-form-row {
        grid-template-columns: 1fr;
    }
}

/* Select Dropdown Styling */
.ai-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a78bfa' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.ai-form-group select option {
    background: #1e1e2e;
    color: var(--text-primary);
    padding: 10px;
}

/* Generate Button */
.ai-generate-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.ai-generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.ai-generate-btn:hover::before {
    left: 100%;
}

.ai-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.ai-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ai-generate-btn.loading {
    pointer-events: none;
}

.ai-generate-btn .spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Generated Content Section */
.ai-content-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ai-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border);
}

.ai-content-header h3 {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    margin: 0;
}

.ai-content-actions {
    display: flex;
    gap: 8px;
}

.ai-content-actions .btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.ai-content-body {
    padding: 20px;
    min-height: 200px;
}

.ai-content-body .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    text-align: center;
}

.ai-content-body .empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Thumbnail Studio Section */
.ai-thumbnail-section {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.05), rgba(234, 88, 12, 0.02));
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.ai-thumbnail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.ai-thumbnail-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fb923c;
    margin: 0;
}

.ai-thumbnail-header .badge {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 20px;
}

.thumbnail-concepts {
    margin-bottom: 15px;
}

.thumbnail-concept {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.thumbnail-concept i {
    color: #fb923c;
    margin-top: 3px;
}

.thumbnail-prompt-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
}

.thumbnail-prompt-box label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thumbnail-prompt-box code {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #fbbf24;
    word-break: break-word;
    line-height: 1.6;
}

.btn-thumbnail {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

/* Script Type Quick Select (Grid) */
.script-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.script-type-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.script-type-card:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-3px);
}

/* FIX: Ensure Editor takes full width in Saved View */
.ai-content-section .ql-container {
    font-size: 16px;
    height: 100%;
}

.ai-content-section .ql-editor {
    width: 100% !important;
    max-width: 100% !important;
    padding: 25px !important;
    margin: 0 !important;
    box-sizing: border-box;
    color: var(--text-primary);
}

.script-type-card.active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.script-type-card .icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.script-type-card h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.script-type-card p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-studio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .ai-studio-header h1 {
        font-size: 1.4rem;
    }

    .ai-config-panel {
        padding: 20px 15px;
        border-radius: 16px;
    }

    .ai-generate-btn {
        padding: 16px 20px;
        font-size: 15px;
    }

    .script-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .script-type-card {
        padding: 14px 10px;
    }

    .script-type-card .icon {
        font-size: 24px;
    }

    .script-type-card h4 {
        font-size: 12px;
    }

    .ai-content-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .ai-content-actions {
        width: 100%;
    }

    .ai-content-actions .btn {
        flex: 1;
    }

    .ai-thumbnail-section {
        padding: 15px;
    }
}

/* Old ai-studio-panel - keeping for backward compat */
.ai-studio-panel {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.ai-studio-panel h3 {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 15px;
}

.control-card h3 {
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-action-btn {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: var(--bg-primary);
    border-color: var(--accent);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
    font-size: 13px;
    margin-bottom: 10px;
}

.full-width {
    width: 100%;
}

/* Source Count Badge */
.source-count {
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Input Styles */
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Button Danger */
.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

/* MOBILE COMPACT STATS */
@media (max-width: 768px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 12px;
        border-radius: 12px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 8px;
    }

    .stat-info h3 {
        font-size: 20px;
    }

    .stat-info p {
        font-size: 11px;
    }

    .stat-card::after {
        display: none;
    }
}

/* =========================================
   MOBILE FLOATING ACTION BUTTON (FAB)
   Only visible on mobile - Viral Content
   ========================================= */
.viral-fab {
    display: none;
}

@media (max-width: 768px) {
    .viral-fab {
        display: flex;
        position: fixed;
        bottom: 85px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
        cursor: pointer;
        z-index: 999;
        border: none;
        transition: all 0.3s ease;
        animation: fabPulse 2s infinite;
    }

    .viral-fab:hover,
    .viral-fab:active {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    }

    .viral-fab .fab-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #fbbf24;
        color: #000;
        font-size: 10px;
        font-weight: bold;
        padding: 2px 6px;
        border-radius: 10px;
        min-width: 18px;
        text-align: center;
    }

    @keyframes fabPulse {

        0%,
        100% {
            box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
        }

        50% {
            box-shadow: 0 4px 25px rgba(239, 68, 68, 0.6);
        }
    }
}

/* =========================================
   CALENDAR WIDGET STYLES
   ========================================= */
.calendar-widget {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

.calendar-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.calendar-header {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.calendar-container {
    padding: 0;
}

.time-display {
    display: flex;
    flex-direction: column;
}

.current-time {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 5px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -1px;
}

.current-date {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.greeting {
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bengali-date-display {
    text-align: right;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bengali-day {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-light);
    line-height: 1;
}

.bengali-month-year {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.bengali-weekday {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.special-day-alert {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
}

.special-day-alert.high {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-left: 4px solid #ef4444;
}

.special-day-alert.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
    border-left: 4px solid #f59e0b;
}

.special-day-alert.low {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    border-left: 4px solid #3b82f6;
}

.special-day-alert i {
    font-size: 1.1rem;
}

.calendar-events {
    padding: 15px 20px;
}

.calendar-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.event-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.event-item.active {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    min-width: 40px;
    height: 40px;
    border-radius: 6px;
    padding: 2px;
}

.event-date .day {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.event-date .day-bn {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1;
}

.event-details {
    flex: 1;
}

.event-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.event-name-bn {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.calendar-footer {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.calendar-location {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 600px) {
    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .bengali-date-display {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .event-list {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   MOBILE PULL TO REFRESH
   ========================================= */
.pull-refresh-loader {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translate(-50%, -100px);
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0;
    pointer-events: none;
    border: 1px solid var(--border);
}

.pull-refresh-loader i {
    color: var(--accent);
    font-size: 16px;
}

.pull-refresh-loader .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(249, 115, 22, 0.3);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===============================================
   HORIZONTAL CALENDAR STYLES (Smart Compact View)
   =============================================== */
.calendar-events-compact {
    margin-top: 15px;
    position: relative;
    /* Fade effect on right to indicate crawl */
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
}

.calendar-section-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-list-horizontal {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 10px;
    /* Space for scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    scroll-behavior: smooth;
}

.event-list-horizontal::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.event-card-horizontal {
    min-width: 140px;
    max-width: 140px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.event-card-horizontal:active {
    transform: scale(0.98);
}

.event-card-horizontal.today {
    border-color: var(--accent);
    background: rgba(249, 115, 22, 0.1);
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.1);
}

.hc-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hc-date-badge {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 6px;
    color: var(--text-primary);
}

.event-card-horizontal.today .hc-date-badge {
    background: var(--accent);
    color: white;
}

.hc-icon {
    font-size: 1.2rem;
}

.hc-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hc-title-bn {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===============================================
   NEWS DETAIL PAGE STYLES
   =============================================== */
.news-detail-container {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.detail-main-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border);
    margin-bottom: 25px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.detail-meta-row {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.source-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.description-lead {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.action-bar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid var(--border);
    padding-top: 25px;
}

.related-sources-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border);
}

.related-sources-section h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.source-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.source-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.source-info {
    flex: 1;
}

.source-title {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 4px;
}

.source-title:hover {
    color: var(--accent);
    text-decoration: underline;
}

.source-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .detail-main-card {
        padding: 20px;
    }

    .detail-title {
        font-size: 1.5rem;
    }

    .source-item {
        padding: 12px;
    }
}

/* =========================================
   KEYWORD ADMIN TAB BUTTONS
   ========================================= */
.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, #ea580c 100%);
    border-color: transparent;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.tab-btn.active:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
}

/* Keyword Tag Pills */
.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.keyword-tag:hover {
    border-color: var(--accent);
    background: rgba(249, 115, 22, 0.1);
}

.keyword-tag .priority-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border-radius: 12px;
}

.keyword-tag .delete-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 2px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.keyword-tag .delete-btn:hover {
    opacity: 1;
}

/* AI Suggestion Card */
.ai-suggestion-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.ai-suggestion-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.ai-suggestion-card .entity-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.ai-suggestion-card .entity-type {
    font-size: 12px;
    padding: 3px 10px;
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border-radius: 12px;
    margin-left: 10px;
}

.ai-suggestion-card .mention-count {
    font-size: 12px;
    color: var(--accent);
    margin-left: 10px;
}

/* Mobile responsive for tabs */
@media (max-width: 600px) {
    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}