:root {
    --neon: #00f2ff;
    --bg: #050507;
    /* User Requested Colors */
    --feature-color: #ffff00; /* Yellow */
    --alert-color: #ff3333;   /* Red */
    --update-color: #00ff88;  /* Green */
    --system-color: #f700ff;  /* Green */
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
::-webkit-scrollbar-thumb { 
    background: var(--neon); 
    box-shadow: 0 0 10px var(--neon);
}

body {
    overflow-y: auto;
    display: block;
    padding-top: 5vh;
}

/* --- EXIT BUTTON (Moved to Left) --- */
.exit-btn {
    position: fixed;
    top: 30px;
    left: 40px; /* Changed from right to left */
    font-family: 'Orbitron';
    color: var(--neon);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 2px;
    padding: 8px 16px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    transition: 0.3s;
    z-index: 100;
}

.exit-btn:hover {
    background: var(--neon);
    color: #050507;
    box-shadow: 0 0 20px var(--neon);
}

/* --- WRAPPER & HEADER --- */
.news-wrapper {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 5;
    position: relative;
}

.header-section {
    text-align: center;
    margin-bottom: 50px;
}

.brand-news {
    font-family: 'Orbitron';
    font-size: 3rem;
    letter-spacing: 15px;
    color: var(--neon);
    text-shadow: 0 0 25px rgba(0, 242, 255, 0.5);
    margin-bottom: 5px;
}

.status-bar {
    font-family: 'Orbitron';
    font-size: 9px;
    color: var(--neon);
    margin-bottom: 15px;
    letter-spacing: 2px;
    display: flex;
    justify-content: space-between;
    opacity: 0.7;
}

/* --- NEWS CARDS --- */
.news-item {
    background: rgba(0, 15, 20, 0.5);
    border: 1px solid rgba(0, 242, 255, 0.1);
    margin-bottom: 25px;
    padding: 25px;
    position: relative;
    backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpFade 0.6s forwards;
}

.news-item:hover {
    border-color: var(--neon);
    background: rgba(0, 242, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.1);
}

/* Staggered Entrance */
.news-item:nth-child(2) { animation-delay: 0.1s; }
.news-item:nth-child(3) { animation-delay: 0.2s; }
.news-item:nth-child(4) { animation-delay: 0.3s; }
.news-item:nth-child(5) { animation-delay: 0.4s; }
.news-item:nth-child(6) { animation-delay: 0.5s; }

@keyframes slideUpFade {
    to { opacity: 1; transform: translateY(0); }
}

/* --- CARD CONTENT --- */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.news-tag {
    font-family: 'Orbitron';
    font-size: 9px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 2px;
    letter-spacing: 1px;
    border: 1px solid;
}

/* Tag Color Assignments */
.tag-feature { color: var(--feature-color); border-color: var(--feature-color); }
.tag-update  { color: var(--update-color); border-color: var(--update-color); }
.tag-alert   { color: var(--alert-color); border-color: var(--alert-color); }
.tag-system   { color: var(--system-color); border-color: var(--system-color); }

.news-date {
    font-family: 'Roboto';
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
}

.news-title {
    font-family: 'Orbitron';
    font-size: 1.25rem;
    color: #fff;
    margin: 0 0 10px 0;
}

.news-item:hover .news-title {
    color: var(--neon);
    text-shadow: 0 0 10px var(--neon);
}

.news-content {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 1. Define the base state so it "unsales" smoothly */
.news-logo img {
    opacity: 0.8;
    transform: scale(1);
    /* cubic-bezier makes the movement feel more "premium" than a standard ease */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                opacity 0.4s ease;
    will-change: transform; /* Helps the browser pre-render the animation for zero lag */
}

/* 2. Define the hover state */
.news-item:hover .news-logo img {
    opacity: 1 !important;
    transform: scale(1.1); /* Slightly larger scale for a better "pop" */
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    body {
        padding-top: 2vh;
    }

    /* Adjust the massive title for smaller screens */
    .brand-news {
        font-size: 1.8rem;
        letter-spacing: 8px;
    }

    /* Move the exit button to be less intrusive or fix its position */
    .exit-btn {
        top: 15px;
        left: 15px;
        font-size: 9px;
        padding: 6px 12px;
    }

    /* Stack the news items (text and logo) vertically */
    .news-body-flex {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
        gap: 15px !important;
    }

    .news-item {
        padding: 20px;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-content {
        font-size: 0.85rem;
    }

    /* Adjust the status bar to stack or stay neat */
    .status-bar {
        flex-direction: column;
        gap: 5px;
        align-items: center;
        font-size: 8px;
    }

    /* Ensure logos don't get too big */
    .news-logo img {
        width: 60px !important;
        height: 60px !important;
    }
}

/* --- BUTTON VISIBILITY LOGIC --- */

/* 1. By default (Desktop), hide the small button */
.exit-btn-small {
    display: none;
}

/* 2. Show the large button on Desktop */
.exit-btn {
    display: flex; /* or inline-block */
    position: fixed;
    top: 30px;
    left: 40px;
    font-family: 'Orbitron';
    color: var(--neon);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 2px;
    padding: 8px 16px;
    border: 1px solid rgba(0, 242, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
}

/* 3. Mobile Switch (Screens smaller than 768px) */
@media (max-width: 768px) {
    /* Hide the large desktop button */
    .exit-btn {
        display: none !important;
    }

    /* Show and style the small mobile button */
    .exit-btn-small {
        display: flex;
        position: fixed;
        top: 20px;
        left: 20px;
        width: 25px;
        height: 25px;
        align-items: center;
        justify-content: center;
        background: rgba(0, 242, 255, 0.1);
        border: 1px solid var(--neon);
        color: var(--neon);
        text-decoration: none;
        font-size: 24px; /* Big arrow for easy tapping */
        border-radius: 4px;
        z-index: 1100;
        box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
    }
}




/* --- FIXED MILESTONE SYSTEM --- */
.milestone-card {
    display: block;

    /* Initial state */
    opacity: 0;
    transform: translateY(30px);

    background: #0a0a0c;
    background: linear-gradient(135deg, rgba(247, 0, 255, 0.15) 0%, rgba(5, 5, 7, 1) 100%);
    border: 2px solid #ff8800;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 20px rgba(158, 78, 3, 0.3);

    animation: slideUpFade 0.6s forwards;
}

.milestone-gradient {
    color: #fa9108; /* Fallback if gradient fails */
    background: linear-gradient(90deg, #f700ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    text-transform: uppercase;
    font-weight: 700;
}

.tag-milestone {
    display: inline-block;
    font-family: 'Orbitron';
    font-size: 10px;
    color: #000 !important;
    background: #f700ff;
    padding: 4px 12px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

/* Mobile Fixes */
@media (max-width: 768px) {
    .milestone-flex {
        flex-direction: column-reverse !important;
        text-align: center;
    }
    .milestone-img {
        width: 100% !important;
        max-width: 200px !important;
        height: auto !important;
        margin: 0 auto 20px auto;
        display: block;
    }
}