/* ===================================
   AI Current — News Dashboard
   Design System & Styles
   =================================== */

/* --- CSS Variables (AI Current Brand) --- */
:root {
    /* Primary */
    --lime: #BFF549;
    --lime-soft: rgba(191, 245, 73, 0.15);
    --lime-glow: rgba(191, 245, 73, 0.3);

    /* Backgrounds */
    --bg-deepest: #080A12;
    --bg-deep: #0D0F1A;
    --bg-main: #111322;
    --bg-card: #1A1D2E;
    --bg-card-hover: #1F2338;
    --bg-elevated: #242840;

    /* Accents */
    --orange: #FF6B35;
    --orange-soft: rgba(255, 107, 53, 0.15);
    --purple: #7B61FF;
    --purple-soft: rgba(123, 97, 255, 0.15);
    --coral: #FF4D6A;
    --teal: #2DD4BF;
    --teal-soft: rgba(45, 212, 191, 0.15);
    --sky: #38BDF8;
    --sky-soft: rgba(56, 189, 248, 0.15);
    --pink: #F472B6;
    --pink-soft: rgba(244, 114, 182, 0.15);
    --amber: #FBBF24;
    --amber-soft: rgba(251, 191, 36, 0.15);
    --indigo: #818CF8;
    --indigo-soft: rgba(129, 140, 248, 0.15);
    --emerald: #34D399;
    --emerald-soft: rgba(52, 211, 153, 0.15);
    --rose: #FB7185;
    --rose-soft: rgba(251, 113, 133, 0.15);

    /* Text */
    --text-primary: #F0F1F5;
    --text-secondary: #8B8FA3;
    --text-muted: #555871;
    --text-inverse: #0D0F1A;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-active: rgba(191, 245, 73, 0.3);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow-lime: 0 0 20px rgba(191, 245, 73, 0.15);
    --shadow-glow-orange: 0 0 20px rgba(255, 107, 53, 0.15);
    --shadow-glow-purple: 0 0 20px rgba(123, 97, 255, 0.15);

    /* Layout */
    --sidebar-width: 72px;
    --header-height: 72px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-deepest);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-deep);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 44px;
    height: auto;
    border-radius: 8px;
    filter: drop-shadow(0 0 8px rgba(0, 204, 0, 0.4));
    transition: filter 0.3s var(--ease-out);
}

.logo-img:hover {
    filter: drop-shadow(0 0 16px rgba(0, 204, 0, 0.6));
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.25s var(--ease-out);
}

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

.nav-btn.active {
    color: var(--lime);
    background: var(--lime-soft);
}

.nav-btn.active::before {
    content: '';
    position: absolute;
    left: -14px;
    width: 3px;
    height: 20px;
    background: var(--lime);
    border-radius: 0 3px 3px 0;
}

.saved-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--orange);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s var(--ease-spring);
}

.saved-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    max-width: calc(100vw - var(--sidebar-width));
}

/* --- Header --- */
.header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--lime));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.header-center {
    flex: 1;
    max-width: 400px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 0 16px;
    height: 42px;
    transition: all 0.25s var(--ease-out);
}

.search-bar:focus-within {
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow-lime);
}

.search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
}

.select-wrapper {
    position: relative;
    display: inline-block;
}

.source-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 10px 40px 10px 16px;
    font-size: 14px;
    font-family: var(--font);
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.source-select:hover {
    border-color: var(--border-focus);
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.source-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.select-wrapper:hover::after {
    transform: translateY(-50%) scale(1.1);
}





.source-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.source-dot.rundown {
    background: var(--orange);
}

.source-dot.bens {
    background: var(--purple);
}

.source-dot.tldr {
    background: var(--teal);
}

.source-dot.superhuman {
    background: var(--sky);
}

.source-dot.neuron {
    background: var(--pink);
}

.source-dot.adopters {
    background: var(--amber);
}

.source-dot.practical {
    background: var(--indigo);
}

.source-dot.breakfast {
    background: var(--emerald);
}

.source-dot.digest {
    background: var(--rose);
}

/* New Sources Colors */
.source-dot.tc {
    background: #00D563;
}

.source-dot.verge {
    background: #333;
}

.source-dot.wired {
    background: #000;
}

.source-dot.vb {
    background: #0055FF;
}

.source-dot.mit {
    background: #D6001C;
}

/* Gradients */
.tc-gradient {
    background: linear-gradient(135deg, #00D563 0%, #00A04A 100%);
}

.verge-gradient {
    background: linear-gradient(135deg, #333 0%, #000 100%);
}

.wired-gradient {
    background: linear-gradient(135deg, #000 0%, #333 100%);
}

.vb-gradient {
    background: linear-gradient(135deg, #0055FF 0%, #0033AA 100%);
}

.mit-gradient {
    background: linear-gradient(135deg, #D6001C 0%, #A00015 100%);
}

/* Icon Backgrounds (Soft) */
.tc-bg {
    background: rgba(0, 213, 99, 0.15);
    color: #00D563;
}

.verge-bg {
    background: rgba(51, 51, 51, 0.15);
    color: #333;
}

.wired-bg {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

.vb-bg {
    background: rgba(0, 85, 255, 0.15);
    color: #0055FF;
}

.mit-bg {
    background: rgba(214, 0, 28, 0.15);
    color: #D6001C;
}

/* Article Card Badges */
.source-badge.tc {
    background: rgba(0, 213, 99, 0.1);
    color: #008f43;
    border: 1px solid rgba(0, 213, 99, 0.2);
}

.source-badge.verge {
    background: rgba(51, 51, 51, 0.1);
    color: #333;
    border: 1px solid rgba(51, 51, 51, 0.2);
}

.source-badge.wired {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.source-badge.vb {
    background: rgba(0, 85, 255, 0.1);
    color: #0044cc;
    border: 1px solid rgba(0, 85, 255, 0.2);
}

.source-badge.mit {
    background: rgba(214, 0, 28, 0.1);
    color: #a00015;
    border: 1px solid rgba(214, 0, 28, 0.2);
}

/* Card Hover Effects */
.article-card.tc-source:hover {
    border-color: rgba(0, 213, 99, 0.3);
    box-shadow: 0 4px 20px rgba(0, 213, 99, 0.15);
}

.article-card.verge-source:hover {
    border-color: rgba(51, 51, 51, 0.3);
    box-shadow: 0 4px 20px rgba(51, 51, 51, 0.15);
}

.article-card.wired-source:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.article-card.vb-source:hover {
    border-color: rgba(0, 85, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 85, 255, 0.15);
}

.article-card.mit-source:hover {
    border-color: rgba(214, 0, 28, 0.3);
    box-shadow: 0 4px 20px rgba(214, 0, 28, 0.15);
}

/* --- Secondary Filters --- */
.secondary-filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.filter-label {
    width: 60px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    white-space: nowrap;
}

.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pill-btn {
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 100px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}

.pill-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-active);
    background: var(--bg-elevated);
}

.pill-btn.active {
    background: var(--lime-soft);
    color: var(--lime);
    border-color: var(--lime);
}

/* Difficulty badge on article cards */
.difficulty-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.difficulty-badge.beginner {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.difficulty-badge.intermediate {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
}

.difficulty-badge.advanced {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Topic badge on article cards */
.topic-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.refresh-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.refresh-indicator svg {
    color: var(--lime);
    animation: pulse-ring 3s infinite;
}

@keyframes pulse-ring {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* --- Stats Row --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s var(--ease-out);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.rundown-bg {
    background: var(--orange-soft);
    color: var(--orange);
}

.stat-icon.bens-bg {
    background: var(--purple-soft);
    color: var(--purple);
}

.stat-icon.saved-bg {
    background: var(--lime-soft);
    color: var(--lime);
}

.stat-icon.total-bg {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* --- Article Grid --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    animation: fadeInUp 0.5s var(--ease-out);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Article Card --- */
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.35s var(--ease-out);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-card.rundown-source:hover {
    border-color: rgba(255, 107, 53, 0.2);
    box-shadow: var(--shadow-glow-orange);
}

.article-card.bens-source:hover {
    border-color: rgba(123, 97, 255, 0.2);
    box-shadow: var(--shadow-glow-purple);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-subtle);
}

.card-image-placeholder {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border-bottom: 1px solid var(--border-subtle);
}

.card-image-placeholder.rundown-gradient {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 77, 106, 0.1));
}

.card-image-placeholder.bens-gradient {
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.15), rgba(191, 245, 73, 0.08));
}

.card-image-placeholder.google-gradient {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.15), rgba(234, 67, 53, 0.1));
}

.card-image-placeholder.openai-gradient {
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.15), rgba(0, 0, 0, 0.05));
}

.card-image-placeholder.anthropic-gradient {
    background: linear-gradient(135deg, rgba(217, 119, 87, 0.15), rgba(245, 245, 220, 0.1));
}

.card-image-placeholder.claude-gradient {
    background: linear-gradient(135deg, rgba(217, 119, 87, 0.15), rgba(255, 107, 53, 0.1));
}

.card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-badge.rundown {
    background: var(--orange-soft);
    color: var(--orange);
}

.source-badge.bens {
    background: var(--purple-soft);
    color: var(--purple);
}

.source-badge.tldr {
    background: var(--teal-soft);
    color: var(--teal);
}

.source-badge.superhuman {
    background: var(--sky-soft);
    color: var(--sky);
}

.source-badge.neuron {
    background: var(--pink-soft);
    color: var(--pink);
}

.source-badge.adopters {
    background: var(--amber-soft);
    color: var(--amber);
}

.source-badge.practical {
    background: var(--indigo-soft);
    color: var(--indigo);
}

.source-badge.breakfast {
    background: var(--emerald-soft);
    color: var(--emerald);
}

.source-badge.digest {
    background: var(--rose-soft);
    color: var(--rose);
}

.source-badge.google {
    background: var(--blue-soft);
    color: var(--blue);
}

.source-badge.openai {
    background: var(--emerald-soft);
    color: var(--emerald);
}

.source-badge.anthropic {
    background: var(--amber-soft);
    color: var(--amber);
    /* Wheat/Beige approximate */
}

.source-badge.claude {
    background: var(--orange-soft);
    color: var(--orange);
}

.source-badge.mit {
    background: var(--red-soft);
    color: var(--red);
}

.card-time {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.article-card:hover .card-title {
    color: var(--lime);
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.card-summary {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

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

.card-authors {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.save-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease-spring);
    flex-shrink: 0;
}

.save-btn:hover {
    color: var(--lime);
    background: var(--lime-soft);
    transform: scale(1.1);
}

.save-btn.saved {
    color: var(--lime);
}

.save-btn.saved svg {
    fill: var(--lime);
}

/* Save animation */
@keyframes save-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.save-btn.just-saved {
    animation: save-pop 0.4s var(--ease-spring);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* --- Sources View --- */
.sources-view {
    animation: fadeInUp 0.4s var(--ease-out);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

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

.source-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s var(--ease-out);
}

.source-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.source-card.rundown-card:hover {
    border-color: rgba(255, 107, 53, 0.2);
}

.source-card.bens-card:hover {
    border-color: rgba(123, 97, 255, 0.2);
}

.source-card.tldr-card:hover {
    border-color: rgba(45, 212, 191, 0.2);
}

.source-card.superhuman-card:hover {
    border-color: rgba(56, 189, 248, 0.2);
}

.source-card.neuron-card:hover {
    border-color: rgba(244, 114, 182, 0.2);
}

.source-card.adopters-card:hover {
    border-color: rgba(251, 191, 36, 0.2);
}

.source-card.practical-card:hover {
    border-color: rgba(129, 140, 248, 0.2);
}

.source-card.breakfast-card:hover {
    border-color: rgba(52, 211, 153, 0.2);
}

.source-card.digest-card:hover {
    border-color: rgba(251, 113, 133, 0.2);
}

.source-card-icon.tldr-bg {
    background: var(--teal-soft);
    color: var(--teal);
}

.source-card-icon.superhuman-bg {
    background: var(--sky-soft);
    color: var(--sky);
}

.source-card-icon.neuron-bg {
    background: var(--pink-soft);
    color: var(--pink);
}

.source-card-icon.adopters-bg {
    background: var(--amber-soft);
    color: var(--amber);
}

.source-card-icon.practical-bg {
    background: var(--indigo-soft);
    color: var(--indigo);
}

.source-card-icon.breakfast-bg {
    background: var(--emerald-soft);
    color: var(--emerald);
}

.source-card-icon.digest-bg {
    background: var(--rose-soft);
    color: var(--rose);
}

.source-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.source-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.source-card h3 {
    font-size: 17px;
    font-weight: 700;
}

.source-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.source-link {
    color: var(--lime);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.source-link:hover {
    opacity: 0.8;
}

/* --- Refresh Button Spin --- */
.nav-btn.refreshing svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- Card stagger animation --- */
.article-card {
    opacity: 0;
    animation: cardFadeIn 0.4s var(--ease-out) forwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .header-center {
        max-width: none;
    }

    .header-right {
        flex-wrap: wrap;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sidebar {
        width: 56px;
    }

    .main-content {
        margin-left: 56px;
        padding: 16px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .page-title {
        font-size: 22px;
    }
}

/* --- Glassmorphism for featured card --- */
.article-card.featured {
    background: linear-gradient(135deg, rgba(191, 245, 73, 0.05), rgba(26, 29, 46, 1));
    border-color: rgba(191, 245, 73, 0.15);
}

.article-card.featured:hover {
    box-shadow: var(--shadow-glow-lime);
}