/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-deep: #050a0e;
    --bg-muted: #1a2633; /* Used as Panel BG */
    --bg-darker: #0e161f;
    --neon-green: #00ff41;
    --secondary-glow: #008f7a;
    --neon-dim: rgba(0, 255, 65, 0.15);
    
    --text-base: #e0e0e0;
    --text-muted: #a0aab8;
    --text-inactive: #555;
    
    --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-base);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* =========================================
   2. GLOBAL UTILITIES
   ========================================= */
.scanlines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(0, 255, 65, 0.03) 3px, rgba(0, 255, 65, 0.03) 4px);
    pointer-events: none; z-index: 999;
}

.neon-text { color: var(--neon-green); text-shadow: 0 0 5px rgba(0, 255, 65, 0.5); }
.text-muted { color: var(--text-muted); }

/* =========================================
   3. HEADER & NAV (Scroll Glow)
   ========================================= */
/* 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;
}

/* Target the link specifically to override browser defaults */
a.logo-link, 
a.logo-link:visited, 
a.logo-link:hover, 
a.logo-link:active {
    text-decoration: none !important;
    color: var(--neon-green) !important;
    border: none !important;
    outline: none !important;
}


.logo-link {
    display: inline-block;
    transition: transform 0.2s;
    text-decoration: none; /* This removes the underline */
    border: none;          /* Ensures no bottom border is active */
}

/* Also ensure the logo class itself doesn't have it */
.logo { 
    font-family: var(--font-header); 
    color: var(--neon-green); 
    font-size: 1.4rem; 
    letter-spacing: 1px; 
    text-align: center;
    text-decoration: none !important;
}



/* 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)); }
}

/* Nav Links with Glow State */
.console-header nav a {
    color: var(--text-muted); text-decoration: none;
    margin: 0 15px; font-family: var(--font-header); font-size: 0.85rem;
    position: relative; transition: all 0.3s; letter-spacing: 1px;
}

.console-header nav a:hover { color: var(--text-base); }

/* The "Active" State (Triggered by Scroll) */
.console-header nav a.active {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
}
.console-header nav a.active::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 2px;
    background: var(--neon-green); box-shadow: 0 0 5px var(--neon-green);
}

/* =========================================
   4. SECTIONS & HERO
   ========================================= */
#hero {
    position: relative; height: 50vh;
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid var(--bg-muted);
}
.hero-content { text-align: center; width: 80%; max-width: 800px; z-index: 2; }
.hero-content h1 {
    font-family: var(--font-header); font-size: 2.5rem; color: var(--neon-green);
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.4); margin-bottom: 10px;
}

.command-line-search {
    margin-top: 30px; display: flex; background: var(--bg-muted);
    border: 1px solid var(--secondary-glow); padding: 5px; border-radius: 4px;
}
.prompt { font-family: var(--font-mono); color: var(--neon-green); padding: 10px 15px; font-weight: bold; }
.command-line-search input {
    flex-grow: 1; background: transparent; border: none;
    color: var(--neon-green); font-family: var(--font-mono); font-size: 1rem; outline: none;
}
#executeSearch {
    background: var(--neon-green); color: var(--bg-deep); border: none;
    padding: 0 20px; font-family: var(--font-header); font-weight: bold; cursor: pointer;
}
#executeSearch:hover { background: white; box-shadow: 0 0 10px var(--neon-green); }

/* =========================================
   SEARCH SUGGESTIONS (Auto-Complete)
   ========================================= */
.command-line-search {
    position: relative; /* Anchors the dropdown */
}

.search-suggestions {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-darker);
    border: 1px solid var(--secondary-glow);
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    max-height: 250px;
    overflow-y: auto;
    display: none; /* Hidden by default */
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.suggestion-item {
    padding: 12px 15px;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 143, 122, 0.1);
    transition: background 0.2s;
}

.suggestion-item:hover { background: var(--bg-muted); }
.suggestion-item:last-child { border-bottom: none; }

.suggestion-name {
    font-family: var(--font-header); font-size: 0.9rem; color: var(--text-base);
}
.suggestion-count {
    font-family: var(--font-mono); font-size: 0.75rem; 
    color: var(--neon-green); background: rgba(0, 255, 65, 0.1);
    padding: 2px 6px; border-radius: 4px;
}


/* =========================================
   5. TRENDING GRID
   ========================================= */
#trending, #latest, #active-feed, #inactive-feed { padding: 40px 5%; scroll-margin-top: 80px; }

.section-title {
    font-family: var(--font-header); color: var(--neon-green);
    margin-bottom: 25px; display: flex; align-items: center; gap: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3); font-size: 1.2rem;
}

.trending-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.data-module {
    background: var(--bg-muted); border: 1px solid rgba(0, 255, 65, 0.2);
    padding: 20px; text-decoration: none; display: block;
    cursor: pointer; transition: all 0.3s ease;
}
.data-module:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2) inset; transform: translateY(-2px);
}
.module-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.module-header img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; }
.module-header h3 { font-family: var(--font-header); font-size: 0.9rem; color: var(--text-base); }
.module-stats { font-family: var(--font-mono); font-size: 0.8rem; text-align: right; }

.game-grid-container {
   padding: 20px 5% 80px;
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
   gap: 25px;
}

/* GAME CARTRIDGE DESIGN */
.game-cartridge {
   background: rgba(14, 22, 31, 0.8);
   border: 1px solid rgba(0, 143, 122, 0.3);
   border-radius: 4px;
   overflow: hidden;
   position: relative;
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
   text-decoration: none;
   display: flex;
   flex-direction: column;
}

.game-cartridge::before {
   content: '';
   position: absolute;
   top: 0; left: 0; width: 100%; height: 2px;
   background: var(--secondary-glow);
   transform: scaleX(0);
   transform-origin: left;
   transition: transform 0.3s ease;
}

.game-cartridge:hover {
   transform: translateY(-5px);
   border-color: var(--neon-green);
   box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 65, 0.1);
}

.game-cartridge:hover::before {
   transform: scaleX(1);
   background: var(--neon-green);
}

/* IMAGE AREA */
.cartridge-thumb {
   width: 100%;
   height: 120px;
   background: #000;
   position: relative;
   overflow: hidden;
   border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cartridge-thumb img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   opacity: 0.8;
   transition: opacity 0.3s, transform 0.5s;
}

.game-cartridge:hover .cartridge-thumb img {
   opacity: 1;
   transform: scale(1.1);
}

/* TEXT AREA */
.cartridge-info {
   padding: 15px;
   flex-grow: 1;
   display: flex;
   flex-direction: column;
   justify-content: space-between;
}

.cartridge-title {
   font-family: var(--font-header);
   color: var(--text-base);
   font-size: 0.9rem;
   margin-bottom: 8px;
   line-height: 1.4;
}

.cartridge-meta {
   font-family: var(--font-mono);
   font-size: 0.7rem;
   color: var(--text-muted);
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-top: auto;
}

.status-indicator {
   width: 6px; height: 6px;
   border-radius: 50%;
   background: var(--secondary-glow);
   box-shadow: 0 0 5px var(--secondary-glow);
}



/* ACTIVE CODE BADGE - NEON DESIGN */
.cartridge-code-count {
    color: var(--neon-green);             /* Neon Text */
    background: rgba(0, 255, 65, 0.1);    /* Low opacity green tint */
    border: 1px solid rgba(0, 255, 65, 0.4); /* Dim green border */
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.1); /* Subtle faint glow */
    text-shadow: 0 0 2px rgba(0, 255, 65, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ON HOVER: Power up the badge */
.game-cartridge:hover .cartridge-code-count {
    background: var(--neon-green);        /* Fill it up */
    color: #000;                          /* Black text for contrast */
    border-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green); /* Bright Glow */
    text-shadow: none;
    font-weight: 700;
}

/* REPLACES .cartridge-thumb img */
.cartridge-initials {
    width: 100%; height: 100%;
    background: var(--bg-muted);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-header);
    font-size: 2.5rem; font-weight: bold;
    color: var(--text-muted);
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.game-cartridge:hover .cartridge-initials {
    color: var(--neon-green);
    text-shadow: 0 0 20px var(--neon-green);
    background: #050a0e;
}


/* =========================================
   6. ADVANCED PACKET DESIGN (Unified)
   ========================================= */
.packet {
    background: var(--bg-muted);
    border: 1px solid var(--neon-dim);
    border-left: 3px solid var(--secondary-glow);
    transition: all 0.2s ease-in-out;
    position: relative; margin-bottom: 15px;
}
.packet.active { border-left-color: var(--neon-green); }
.packet.inactive { border-left-color: #444; opacity: 0.7; }
.packet:hover { border-color: var(--neon-green); box-shadow: 0 0 15px var(--neon-dim); }

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

/* Reward Icon Stack */
.reward-stack {
    width: 45px; height: 45px; background-color: #0e161f;
    border: 1px solid var(--secondary-glow); border-radius: 50%;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    overflow: hidden; box-shadow: 0 0 10px rgba(0, 143, 122, 0.2);
}
.reward-stack span { font-size: 20px; }
.reward-stack[data-count="2"] span { font-size: 14px; width: 45%; text-align: center; }
.reward-stack[data-count="3"] span { font-size: 12px; width: 45%; text-align: center; }

/* Meta Data */
.code-meta { display: flex; flex-direction: column; overflow: hidden; }
.game-title { font-family: var(--font-header); font-size: 0.7rem; color: var(--text-muted); margin-bottom: 4px; }
.code-text {
    font-family: var(--font-mono); font-size: 1.2rem; font-weight: 700;
    color: var(--neon-green); letter-spacing: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.packet.inactive .code-text { color: var(--text-inactive); text-decoration: line-through; }

.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 */
.actions { display: flex; align-items: center; gap: 15px; }
.status { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--neon-green); }
.status-dot { width: 8px; height: 8px; background: currentColor; border-radius: 50%; box-shadow: 0 0 5px currentColor; animation: blink-glow 1.5s infinite; }
.packet.inactive .status { color: #555; }
.packet.inactive .status-dot { animation: none; background: #555; box-shadow: none; }

a.btn-copy {
    box-sizing: border-box; /* Prevents padding from adding to width */
    text-align: center;
    white-space: nowrap;
}
.btn-copy {
    background: var(--neon-green); color: var(--bg-deep); border: none;
    padding: 8px 20px; font-family: var(--font-header); font-weight: 700; font-size: 0.8rem;
    cursor: pointer; clip-path: polygon(10% 0, 100% 0, 100% 100%, 0 100%, 0 25%);
    transition: 0.1s; min-width: 80px;
}
.btn-copy:hover { background: #fff; box-shadow: 0 0 15px var(--neon-green); }

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

/* Details Drawer */
.packet-details {
    max-height: 0; overflow: hidden; background: var(--bg-darker);
    transition: max-height 0.3s ease-out; padding: 0 20px;
    border-top: 1px solid transparent;
}
.packet.expanded .packet-details {
    max-height: 500px; padding-top: 15px; padding-bottom: 20px;
    border-top-color: var(--secondary-glow);
}
.packet-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.detail-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--secondary-glow); display: block; margin-bottom: 5px; }
.packet-details p { font-family: var(--font-body); font-size: 0.9rem; color: var(--text-base); }

/* Mobile Only Elements */
.mobile-info-block, .mobile-actions, .status-pill { display: none !important; }

/* =========================================
   3. SEO SECTIONS (OPERATIONAL SECTORS)
   ========================================= */

/* =========================================
   3. SEO SECTIONS (OPERATIONAL SECTORS)
   ========================================= */

/* [CHANGED] Added #mission-brief here so it shares the exact same width/padding */
#mission-brief, #sectors, #manifest {
    max-width: 1600px; 
    margin: 0 auto; 
    padding: 40px 5%;
}

#manifest { margin-bottom: 80px; }

/* [NEW] Styling for the inner Mission Box */
.mission-box {
    background: rgba(5, 10, 14, 0.6); /* Slightly transparent dark */
    border: 1px solid rgba(0, 255, 65, 0.2); /* Subtle green border */
    border-left: 3px solid var(--neon-green); /* The "System Message" accent */
    padding: 25px;
    border-radius: 4px;
    backdrop-filter: blur(4px); /* Cyberpunk glass effect */
}

/* -- Sector Grid (Genres) -- */
.sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.sector-card {
    background-color: var(--bg-muted); /* Uses your specific panel color #1a2633 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-left-width: 3px;
    border-left-style: solid;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
}

.sector-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    background-color: #233140; /* Slightly lighter interaction state */
}

.sector-card h3 {
    font-family: var(--font-header);
    margin-bottom: 15px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.sector-card p {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Sector Border Colors */
.sector-roblox { border-left-color: var(--neon-green); }   /* Matches your site green */
.sector-roblox h3 { color: var(--neon-green); }

.sector-strategy { border-left-color: #00d2ff; }           /* Cyber Cyan */
.sector-strategy h3 { color: #00d2ff; }

.sector-gacha { border-left-color: #ff0055; }              /* Cyber Pink */
.sector-gacha h3 { color: #ff0055; }


/* -- System Manifest (Trust Section) -- */
.manifest-box {
    background-color: rgba(0, 0, 0, 0.3); /* Dark overlay */
    border: 1px dashed #444;
    padding: 30px;
    position: relative;
}

.manifest-corners {
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: var(--neon-green);
    border-style: solid;
}

.corner-tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.corner-br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.manifest-title {
    color: var(--text-base);
    font-family: var(--font-header);
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.manifest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.manifest-header {
    color: var(--text-base);
    font-family: var(--font-mono); /* Uses Fira Code */
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.manifest-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.manifest-log {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-inactive); /* Uses #555 */
}


/* =========================================
   7. FOOTER (Unified)
   ========================================= */
footer {
    text-align: center; padding: 30px;
    background: var(--bg-darker); margin-top: auto;
    border-top: 1px solid var(--secondary-glow);
}
.terminal-footer {
    font-family: var(--font-mono); color: var(--secondary-glow); font-size: 0.8rem;
}

.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; }


/* =========================================
   8. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }

    /* Re-structure Header */
    .packet-main {
        grid-template-columns: 45px 1fr 30px; /* Icon | Code | Arrow */
        gap: 10px; padding: 15px;
    }
    .code-text { font-size: 1.1rem; }

    /* Enable Mobile Drawer Items */
    .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-code-mirror {
        font-family: var(--font-mono); color: var(--neon-green); font-size: 1.2rem;
        margin-bottom: 10px; font-weight: bold;
    }
    .mobile-meta-row {
        display: flex; justify-content: space-between; align-items: center;
        font-size: 0.85rem; color: #888; font-family: var(--font-mono);
    }
   /* 2. Fix Missing Dot */
    .status-pill {
        display: inline-flex !important;
        align-items: center;
        gap: 6px; /* Space between dot and text */
        padding: 4px 10px;
        border: 1px solid #333;
        border-radius: 4px;
        background: rgba(0,0,0,0.3);
        font-family: var(--font-mono);
        font-size: 0.75rem;
        line-height: 1; /* Fix vertical alignment */
    }
    .status-dot-glow {
        display: block; /* Ensure it's not hidden */
        width: 6px;
        height: 6px;
        background-color: var(--neon-green); /* Explicit color */
        border-radius: 50%;
        box-shadow: 0 0 5px var(--neon-green);
    }
    .status-pill.active { border-color: var(--neon-green); color: var(--neon-green); }
    .status-pill.inactive { border-color: #555; color: #777; }

    .mobile-actions {
        display: flex !important;
        width: 100%;
        padding-top: 15px;
        margin-top: 15px;
        border-top: 1px dashed #333;
    }
    .btn-copy.mobile-btn {
        flex: 1; /* Take full available width */
        width: 100%; /* Force width */
        height: 45px; /* Slightly taller for easier tapping */
        padding: 0; /* Remove horizontal padding to prevent clipping text */
        display: flex; 
        align-items: center; 
        justify-content: center;
    }
      
    /* Shrinks the huge text so it fits on narrow screens */
    .hero-content h1 {
        font-size: 1.4rem !important; 
        word-break: break-word;       /* Forces long text to wrap if needed */
        line-height: 1.3;
        padding: 0 15px;              /* Adds breathing room on sides */
    }

    /* 2. Fix Cramped Search Bar */
    /* Stacks the Input and Button vertically instead of side-by-side */
    .command-line-search {
        flex-direction: column;       /* Stack items */
        height: auto !important;      /* Let height grow to fit items */
        padding: 15px !important;     /* More padding inside */
        gap: 10px;                    /* Space between input and button */
    }

    /* Hide the ">" prompt on mobile to save space */
    .command-line-search .prompt {
        display: none;
    }

    /* Make Input Full Width */
    .command-line-search input {
        width: 100% !important;
        text-align: center;           /* Center the text for mobile look */
        padding: 10px 0;
    }

    /* Make Button Full Width & Tappable */
    .command-line-search button {
        width: 100% !important;
        padding: 12px 0 !important;   /* Taller button for fingers */
        border-left: none !important; /* Remove side border */
        border-top: 1px solid rgba(255,255,255,0.1); /* Add top separator */
        margin-left: 0 !important;
        background: rgba(0, 143, 122, 0.2); /* Slight tint to make it pop */

       
    .sector-grid, .manifest-grid {
        grid-template-columns: 1fr;
    }
    #sectors, #manifest {
        margin-top: 40px;
        margin-bottom: 40px;
    }
}
