/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Core Palette */
    --bg-deep: #050a0e;
    --bg-muted: #1a2633;
    --bg-darker: #0e161f;
    --bg-panel: #131c25;
    
    /* Accents */
    --neon-green: #00ff41;
    --secondary-glow: #008f7a; /* The Cyan Glow */
    --neon-dim: rgba(0, 255, 65, 0.15);
    
    /* Text */
    --text-base: #e0e0e0;
    --text-bright: #ffffff;
    --text-muted: #a0aab8;
    --text-inactive: #555;
    
    /* Fonts */
    --font-header: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}


* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-deep); color: var(--text-bright); font-family: var(--font-body); padding-bottom: 60px; }
a { text-decoration: none; color: inherit; }

/* =========================================
   2. UTILITIES & EFFECTS
   ========================================= */
.scanlines {
    position: fixed; inset: 0; pointer-events: none; z-index: 99;
    background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(0, 255, 65, 0.03) 3px, rgba(0, 255, 65, 0.03) 4px);
}
.blinking-icon { animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: 0.5; } }

.text-neon { color: var(--neon-green); }
.text-muted { color: var(--text-muted); }

/* =========================================
   3. LAYOUT FRAMEWORK
   ========================================= */
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* Header */
.console-header {
    background: rgba(5,10,14,0.95);
    border-bottom: 1px solid var(--secondary-glow);
    padding: 20px 0;
    margin-bottom: 30px;
    backdrop-filter: blur(5px);
    position: sticky; top: 0; z-index: 10;
}

/* Logo Styles */
.logo { 
    font-family: var(--font-header); 
    color: var(--neon-green); 
    font-size: 1.4rem; 
    letter-spacing: 1px; 
    text-align: center;
}
.logo-link {

    transition: transform 0.2s;
}
.logo-link:hover {
    transform: scale(1.02);
    text-shadow: 0 0 10px var(--neon-dim);
}

/* Styling for the new image logo */
.brand-icon {
    height: 1.2em;         /* Matches the text height exactly (24px approx) */
    width: auto;           /* Maintains square aspect ratio */
    vertical-align: middle; /* Centers it vertically with the text */
    margin-bottom: 4px;    /* Micro-adjustment to align perfectly with text baseline */
    border-radius: 4px;    /* Optional: Slight rounding looks pro on game icons */
}

/* Ensure the blinking animation works on the image */
.blinking-icon {
    animation: blink-glow 2s infinite;
}

@keyframes blink-glow {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 5px var(--neon-green)); }
    50% { opacity: 0.7; filter: drop-shadow(0 0 2px var(--neon-green)); }
}

.section-title { 
    font-family: var(--font-mono); 
    color: var(--neon-green); 
    margin-bottom: 20px; 
    font-size: 1rem; 
}

.section-title-header { 
    font-family: var(--font-mono); 
    color: var(--neon-green); 
    margin-bottom: 20px; 
    font-size: 2rem; 
}

.feed-group { 
    min-height: 100px; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

/* =========================================
   4. NAVIGATION
   ========================================= */
.nav-links {
    display: flex; gap: 20px; justify-content: center; margin-bottom: 30px;
}
.nav-link {
    color: var(--text-muted); 
    font-family: var(--font-mono); 
    font-size: 0.9rem; 
    transition: 0.2s;
}
.nav-link:hover, .nav-link.active { 
    color: var(--neon-green); 
    text-shadow: 0 0 5px var(--neon-dim); 
}

/* =========================================
   5. CODE PACKET COMPONENT
   ========================================= */
.packet {
    background: var(--bg-panel);
    border: 1px solid var(--neon-dim);
    border-left: 3px solid var(--neon-green);
    transition: all 0.2s ease-in-out;
    position: relative;
}

/* Add this to your style.css */
.faq-answer {
    font-size: 0.9rem;   /* Matches your Step Card text size */
    color: #e0e0e0;      /* Matches your readable text color */
    line-height: 1.6;
}

.faq-answer strong {
    color: #fff;         /* Makes bold text pop white */
}
.packet:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px var(--neon-dim);
}

/* MAIN BAR GRID SYSTEM (Desktop Default) */
.packet-main {
    display: grid;
    /* Grid: Icon | Code Info | Date | Actions | Arrow */
    grid-template-columns: 50px 1fr auto auto 30px;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    min-height: 80px;
    cursor: pointer;
}

.code-meta { display: flex; flex-direction: column; overflow: hidden; }
.game-title { font-size: 0.8rem; color: var(--text-muted); }

.code-text {
    font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700;
    color: var(--neon-green); text-shadow: 0 0 8px var(--neon-dim); letter-spacing: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.date-meta {
    font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted);
    border-left: 1px solid var(--neon-dim); padding-left: 20px; height: 40px; display: flex; align-items: center;
}

.actions { display: flex; align-items: center; gap: 15px; }

/* Status Text (Desktop) */
.status { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.75rem; }
.status-dot { width: 8px; height: 8px; background: var(--neon-green); border-radius: 50%; box-shadow: 0 0 5px var(--neon-green); animation: blink 1.5s infinite; }

/* Buttons (Desktop Style) */
.btn-copy {
    background: var(--neon-green); color: var(--bg-deep); border: none;
    padding: 10px 25px; font-family: var(--font-header); font-weight: 700; font-size: 0.9rem;
    cursor: pointer; clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%, 0 25%);
    transition: 0.1s; min-width: 90px;
}
.btn-copy:hover { background: #fff; box-shadow: 0 0 15px var(--neon-green); }
.btn-copy:active { transform: scale(0.98); }

.btn-report {
    align-items: center;
    justify-content: center;
    background: transparent; border: 1px solid #444; color: #666;
    width: 35px; height: 35px; border-radius: 4px; cursor: pointer;
    transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}


.fa-spinner {
    color: red;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
}

.btn-report:hover { border-color: red; color: red; }
.btn-report:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-expand { color: var(--text-muted); transition: transform 0.3s; justify-self: end;}
.packet.expanded .btn-expand { transform: rotate(180deg); color: var(--neon-green);}

/* Packet Details (Dropdown) */
.packet-details {
    max-height: 0; overflow: hidden;
    background: rgba(0,0,0,0.2);
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
    font-family: var(--font-mono); font-size: 0.85rem;
}
.packet.expanded .packet-details { 
    max-height: 800px; padding-top: 15px; padding-bottom: 20px; border-top: 1px solid var(--neon-dim);
}
.packet-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.detail-label { display: block; color: var(--neon-green); font-size: 0.7rem; margin-bottom: 5px;}

/* Inactive State */
.packet.inactive { border-left-color: #444; opacity: 0.7; }
.packet.inactive .code-text { color: var(--text-inactive); text-decoration: line-through; text-shadow: none; }
.packet.inactive .status-dot { background: #444; box-shadow: none; animation: none;}

/* Reward Icons */
.reward-stack {
    width: 50px; height: 50px; background-color: #222; border: 2px solid #4ade80; 
    border-radius: 50%; display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center; align-content: center;
    overflow: hidden; box-shadow: 0 0 10px rgba(74, 222, 128, 0.2);
}
.reward-stack[data-count="1"] span { font-size: 26px; }
.reward-stack[data-count="2"] span { font-size: 18px; width: 45%; text-align: center; line-height: 1.2; }
.reward-stack[data-count="3"] span { font-size: 14px; width: 45%; text-align: center; line-height: 1; }

/* --- STATUS PILL (Personal Zone for Drawer) --- */
.status-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 4px;
    font-family: var(--font-mono); font-size: 0.8rem;
    border: 1px solid #333; background: rgba(0,0,0,0.3);
}
.status-pill.active {
    border-color: var(--neon-green); color: var(--neon-green);
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.1);
}
.status-pill.inactive { border-color: #555; color: #777; }
.status-dot-glow {
    width: 6px; height: 6px; background: currentColor;
    border-radius: 50%; box-shadow: 0 0 8px currentColor;
}
.mobile-info-block, 
.mobile-actions,
.status-pill {
    display: none !important;
}


/* =========================================
   6. CONTENT PAGES & FOOTER
   ========================================= */
.content-pad { padding: 30px; line-height: 1.6; color: var(--text-bright); }
.content-pad h2 { font-family: var(--font-header); color: var(--neon-green); border-bottom: 1px solid var(--neon-dim); padding-bottom: 10px; margin-bottom: 20px; margin-top: 30px; }
.content-pad h2:first-child { margin-top: 0; }
.content-pad p { margin-bottom: 15px; color: #ccc; }
.content-pad ul { list-style: none; padding-left: 10px; margin-bottom: 20px;}
.content-pad li { margin-bottom: 10px; display: flex; gap: 10px;}
.content-pad li::before { content: '>'; color: var(--neon-green); font-weight: bold;}
.content-pad li strong { white-space: nowrap; margin-right: 5px; }

/* Visual Guide Overlays */
.step-card { background: rgba(0,0,0,0.2); border: 1px solid #333; padding: 20px; margin-bottom: 25px; border-radius: 4px; }
.step-title { font-family: var(--font-mono); color: var(--neon-green); margin-bottom: 10px; display: block; font-size: 0.9rem; font-weight: 700; }
.step-desc { color: #ccc; font-size: 0.9rem; margin-bottom: 15px; line-height: 1.5; }
.tutorial-frame { position: relative; display: block; width: 100%; max-width: 450px; margin: 0 auto; border: 1px solid var(--text-muted); border-radius: 6px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.tutorial-frame img { width: 100%; height: auto; display: block; opacity: 0.9; }
.focus-ring { position: absolute; width: 60px; height: 60px; border: 3px solid #ff3333; border-radius: 50%; box-shadow: 0 0 10px #ff3333, inset 0 0 10px #ff3333; transform: translate(-50%, -50%); pointer-events: none; animation: pulse-red 2s infinite; z-index: 5; }
.focus-ring.rect { border-radius: 8px; width: 200px; height: 50px; }
@keyframes pulse-red { 0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); } }

.loading-placeholder { font-family: var(--font-mono); color: var(--neon-green); text-align: center; padding: 20px; animation: blink 1s infinite; }
.empty-msg { font-family: var(--font-mono); color: #444; text-align: center; padding: 20px; border: 1px dashed #333; }

.simple-footer { margin-top: 80px; padding: 30px 0; border-top: 1px solid #222; text-align: center; font-family: var(--font-mono); opacity: 0.5; font-size: 0.75rem; transition: opacity 0.3s; border-top: 1px solid var(--secondary-glow);}
.simple-footer:hover { opacity: 0.9; }
.footer-nav { display: flex; justify-content: center; gap: 20px; margin-bottom: 15px; }
.footer-nav a { color: var(--text-muted); position: relative; }
.footer-nav a:hover { color: var(--neon-green); text-decoration: underline; }
.copyright { color: #444; letter-spacing: 1px; }

/* =========================================
   FRESHNESS BADGE (SSR INJECTED)
   ========================================= */
.freshness-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: rgba(0, 255, 65, 0.05); /* Very faint green bg */
    border: 1px solid var(--neon-green);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
    max-width: fit-content;
}

.freshness-badge i {
    color: var(--neon-green);
    font-size: 1rem;
    animation: pulse 2s infinite; /* Make the checkmark pulse */
}

.freshness-label {
    color: var(--neon-green);
    font-weight: 700;
    letter-spacing: 0.5px;
}

#last-check-time {
    color: var(--text-base);
}

/* Optional Pulse Animation */
@keyframes pulse {
    0% { opacity: 1; text-shadow: 0 0 5px var(--neon-green); }
    50% { opacity: 0.5; text-shadow: none; }
    100% { opacity: 1; text-shadow: 0 0 5px var(--neon-green); }
}

/* Mobile Tweak */
@media (max-width: 768px) {
    .freshness-badge {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}



/* =========================================
   7. MOBILE BREAKPOINT
   ========================================= */
@media (max-width: 768px) {
    .container { padding: 0 10px; }
    
    /* Hide Desktop-specific elements */
    .desktop-only { display: none !important; }

    /* 1. HEADER GRID (Icon | Code | Arrow) */
    .packet-main {
        grid-template-columns: 45px 1fr 30px;
        gap: 10px;
        padding: 15px;
    }

    /* 2. CODE TEXT (Dynamic Size) */
    .code-text { 
        font-size: clamp(1rem, 4vw, 1.3rem);
        margin: 0; text-align: left;
    }

    /* 3. DRAWER INFO BLOCK (Game/Date/Status) */
    .mobile-info-block {
        display: block !important;
        padding-bottom: 15px; margin-bottom: 15px;
        border-bottom: 1px dashed #333;
    }
    .mobile-game-title {
        font-family: var(--font-header); font-size: 1rem; color: var(--text-muted); margin-bottom: 10px;
    }
    .mobile-meta-row {
        display: flex; justify-content: space-between; align-items: center;
        font-size: 0.85rem; color: #888; font-family: var(--font-mono);
    }

    /* 4. DETAILS GRID (Side-by-Side) */
    .packet-details-grid { grid-template-columns: 1fr 1fr; }
    
    /* 5. MOBILE ACTIONS (Bottom of Drawer, Right Aligned) */
    .mobile-actions {
        display: flex !important;
        justify-content: flex-end; /* Align right */
        gap: 10px;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px dashed #333;
    }
    
    /* Mobile Copy Button */
    .btn-copy.mobile-btn {
        height: 40px; /* Explicit height */
        padding: 0 20px;
        font-size: 0.9rem;
        background: var(--neon-green); color: var(--bg-deep);
        font-weight: 700; border: none;
        box-shadow: 0 0 10px var(--neon-dim);
    }
    
    /* Mobile Report Button */
    .btn-report.mobile-btn {
        height: 40px; /* Match height */
        width: 40px;  /* Square */
        border: 1px solid #444; color: #666;
        display: flex; align-items: center; justify-content: center;
        background: transparent;
    }

   .status-pill {
        display: inline-flex !important;
    }

    /* Guide Adjustments */
    .tutorial-frame { max-width: 100%; }
    .content-pad ul { padding: 0; margin: 20px 0; }
    .content-pad li { display: block; position: relative; padding-left: 25px; margin-bottom: 25px; }
    .content-pad li::before { position: absolute; left: 0; top: 0; }
    .content-pad li strong { display: block; margin-bottom: 5px; letter-spacing: 1px; }
}
