body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: #eef2f7;
    margin: 0;
    padding: 0;
}

/* FAST flow (IDLE MODE) - dust-like */
body.ai-idle header::before {
    animation: starDustFast 3s linear infinite;
}

/* SLOW calm flow (ACTIVE MODE) */
body.ai-active header::before {
    animation: starDustSlow 12s linear infinite;
    transform: translate(var(--starX, 0px), var(--starY, 0px));
    transition: transform 0.15s ease-out;
}

/* ===========================================================
   HEADER + FLOATING BACKGROUND DOTS
   =========================================================== */
header {
    position: relative;
    background: radial-gradient(circle at top, #0b1120 0, #020617 55%);
    padding: 40px 20px 60px;
    color: white;
    text-align: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    overflow: hidden;
}

header h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.6px;
    position: relative;
    z-index: 2;
}

header p {
    margin-top: 10px;
    font-size: 16px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* Star field layer – twinkling, also moves slightly with cursor */
header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.7) 1.4px, transparent 0),
        radial-gradient(circle, rgba(147,197,253,0.6) 1.8px, transparent 0),
        radial-gradient(circle, rgba(96,165,250,0.5) 1.6px, transparent 0);
    background-size: 28px 28px, 48px 48px, 64px 64px;
    background-position: 0 0, 14px 20px, -10px 24px;
    mix-blend-mode: screen;
    opacity: 0.6;
    z-index: 0;
    pointer-events: none;
}


/* “Flux glow” layer – appears around cursor in active state */
header::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(59,130,246,0.26), transparent 60%),
        radial-gradient(circle, rgba(125,211,252,0.18), transparent 65%);
    opacity: 0;  /* hidden when idle */
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%)
               translate(var(--fluxX, 0px), var(--fluxY, 0px));
    transition:
        opacity 0.25s ease-out,
        transform 0.10s ease-out;
}

/* Stars drifting / occasional streaky motion */
@keyframes headerDotsDrift {
    0%   { background-position: 0 0, 14px 18px, -10px 30px; }
    40%  { background-position: -20px -18px, -4px 10px, 18px -8px; }
    70%  { background-position: -40px -36px, -14px 4px, 28px -22px; }
    100% { background-position: 0 0, 14px 18px, -10px 30px; }
}

/* ===========================================================
   MAIN CONTAINER 2-COLUMN LAYOUT
   =========================================================== */
.main-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px 15px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* ===========================================================
   NEWS LIST (LEFT SIDE)
   =========================================================== */
.news-section {
    margin-top: 10px;
}

.article-card {
    background: #ffffff;
    padding: 18px;
    border-radius: 18px;
    margin-bottom: 22px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    transition: 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.1);
}

.article-img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
}

.article-title a {
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    color: #1f3c88;
    letter-spacing: -0.3px;
}

.meta {
    font-size: 12px;
    color: #6e6e6e;
    margin: 6px 0 12px;
}

.badge {
    background: #e3edff;
    color: #1f3c88;
    padding: 3px 8px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 600;
    margin-right: 6px;
}

.summary {
    font-size: 14px;
    line-height: 1.55;
    color: #333;
}

.empty {
    text-align: center;
    margin-top: 30px;
    color: #999;
    font-size: 16px;
}

/* ===========================================================
   RIGHT SIDEBAR (STICKY)
   =========================================================== */
.sidebar {
    margin-top: 10px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.sidebar-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    border: 1px solid rgba(0,0,0,0.05);
    transition: 0.3s ease;
}

.sidebar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f3c88;
    margin-bottom: 8px;
}

.sidebar-text {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.coming-badge {
    background: #3f78e0;
    color: #fff;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.pm-badge {
    background: #22b573;
}

/* ===========================================================
   GLOWING AI NOTE WITH COLOR-SHIFTING PARTICLES
   =========================================================== */
.ai-glow-note {
    position: relative;
    margin-top: 18px;
    padding: 12px 20px;
    font-size: 15px;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, #3f78e0, #1f3c88);
    border-radius: 12px;
    box-shadow:
        0 0 8px rgba(63,120,224,0.6),
        0 0 14px rgba(31,60,136,0.5),
        inset 0 0 18px rgba(255,255,255,0.15);
    animation: aiGlow 2.4s ease-in-out infinite alternate;
    letter-spacing: 0.2px;
    overflow: hidden;
    z-index: 1;
    
}

/* Faster blinking when active (mouse/touch moving), slower when idle */
body.ai-active .ai-glow-note {
    animation-duration: 1.1s;
}

body:not(.ai-active) .ai-glow-note {
    animation-duration: 0.9s;
}

/* Floating AI blobs – position + JS-driven movement */
.ai-glow-note::before,
.ai-glow-note::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), transparent 55%),
        radial-gradient(circle at 70% 60%, rgba(147,197,253,0.9), transparent 60%);
    opacity: 0.33;
    filter: blur(1px);
    z-index: -1;
}

/* LEFT blob */
.ai-glow-note::before {
    top: -60px;
    left: -40px;
    transform: translate(var(--blobX, 0px), var(--blobY, 0px));
}

/* RIGHT blob */
.ai-glow-note::after {
    bottom: -60px;
    right: -40px;
    transform: translate(var(--blobX, 0px), var(--blobY, 0px));
}


/* FAST blinking (IDLE MODE) */
body.ai-idle .ai-glow-note::before,
body.ai-idle .ai-glow-note::after {
    animation: blobBlinkFast 1s ease-in-out infinite alternate;
}

/* SLOW blinking (ACTIVE MODE) */
body.ai-active .ai-glow-note::before,
body.ai-active .ai-glow-note::after {
    animation: blobBlinkSlow 3s ease-in-out infinite alternate;
}


/* Pulsating glow on the bar */
@keyframes aiGlow {
    0% {
        box-shadow:
            0 0 6px rgba(63,120,224,0.6),
            0 0 12px rgba(31,60,136,0.5),
            inset 0 0 10px rgba(255,255,255,0.08);
        transform: translateY(0px);
    }
    100% {
        box-shadow:
            0 0 14px rgba(63,120,224,0.9),
            0 0 26px rgba(31,60,136,0.9),
            inset 0 0 22px rgba(255,255,255,0.18);
        transform: translateY(-1.5px);
    }
}

/* Color shifting for blobs */
@keyframes particleColorShift {
    0%   { filter: hue-rotate(0deg) blur(1px); }
    50%  { filter: hue-rotate(60deg) blur(1px); }
    100% { filter: hue-rotate(120deg) blur(1px); }
}

@keyframes starDustFast {
    0%   { background-position: 0 0, 10px 12px, -5px -10px; }
    100% { background-position: -180px -180px, -40px -80px, -100px -40px; }
}

@keyframes starDustSlow {
    0%   { background-position: 0 0, 14px 18px, -8px 30px; }
    100% { background-position: -30px -20px, -10px 6px, 16px -8px; }
}

@keyframes blobBlinkFast {
    0%   { opacity: 0.20; transform: scale(1.00); }
    100% { opacity: 0.45; transform: scale(1.10); }
}

@keyframes blobBlinkSlow {
    0%   { opacity: 0.22; transform: scale(1.02); }
    100% { opacity: 0.33; transform: scale(1.05); }
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 900px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
        position: static;
        top: auto;
    }
}
