:root {
    --main: #FFFFFF;
    --secondBG: #0D111D;
    --footBG: #000C28;
    --bodyBG: #000E31;
    --link: #D4DB52;
    --border: #D4DB52;
    --btn: #D4DB52;
    --red: #df3f5c;
    --green: #2ac465;
    --orange: #4EB37E;
    --yellow: #ffc65a;
    --headBG: #131313;
    --card-border: #242424;
    --text-muted: #94a3b8;
    --shadow-glow: rgba(212, 219, 82, 0.4);
    --grad-card: linear-gradient(90deg, #0e121f 0%, #05070a 100%);
}

/* =========================================
   1. RESET & BASE
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body, html {
    background-color: var(--bodyBG);
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: monospace, system-ui, -apple-system, sans-serif;
    color: var(--main);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--link);
}
a:hover { color: #fff; text-shadow: 0 0 5px var(--shadow-glow); }

b, strong { font-weight: 700; }
.cl { clear: both; }

/* =========================================
   2. LAYOUT & GRID
   ========================================= */
.wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.box {
    background-color: var(--secondBG);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

[class^='col-'] {
    padding: 10px;
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .box { padding: 25px; }
    .col-60 { flex: 0 0 60%; max-width: 60%; }
    .col-50 { flex: 0 0 50%; max-width: 50%; }
    .col-40 { flex: 0 0 40%; max-width: 40%; }
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
#header {
    background-image: url("assets/banner.png"); /* Ensure you upload banner.png */
    background-size: cover;
    background-position: center;
    min-height: 200px; /* Reduced height for functional nodes */
    display: flex;
    flex-direction: column;
    border-bottom: 2px solid var(--border);
    position: relative;
}

#header::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,14,49,0.6), var(--bodyBG));
    pointer-events: none;
}

#announce {
    background: rgba(0, 0, 0, 0.85);
    padding: 12px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 5;
}
#announce h2 {
    color: #fff;
    font-size: 12px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-inner {
    display: flex;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 10;
    margin-top: auto;
}

#logo {
    width: 60px;
    height: 60px;
    background-image: url("/img/logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 15px;
}

.shopname {
    color: var(--link);
    font-weight: 800;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* =========================================
   4. UI COMPONENTS (Buttons, Badges, Inputs)
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    text-align: center;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.2s;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
}
.btn.block { display: flex; width: 100%; }
.btn.small { padding: 6px 10px; font-size: 10px; }
.btn.big { height: 50px; font-size: 14px; padding: 0 30px; }

.btn.green {
    background: rgba(42, 196, 101, 0.15);
    color: #3cc470 !important;
    border: 1px solid #3cc470;
}
.btn.green:hover { background: #3cc470; color: #000 !important; }

.btn.white {
    background: transparent;
    color: #fff !important;
    border-color: #fff;
}
.btn.white:hover { background: #fff; color: #000 !important; }

.btn.red {
    background: rgba(223, 63, 92, 0.1);
    color: var(--red) !important;
    border-color: var(--red);
}
.btn.red:hover { background: var(--red); color: #fff !important; }

.btn.yellow {
    background: rgba(255, 198, 90, 0.1);
    border-color: var(--yellow);
    color: var(--yellow) !important;
}
.btn.yellow:hover { background: var(--yellow); color: #000 !important; }

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    color: #fff;
    text-align: center;
    line-height: 1;
}
.badge.green { background: rgba(42, 196, 101, 0.2); color: var(--green); border: 1px solid var(--green); }
.badge.red { background: rgba(223, 63, 92, 0.2); color: var(--red); border: 1px solid var(--red); }
.badge.yellow { background: rgba(255, 198, 90, 0.2); color: var(--yellow); border: 1px solid var(--yellow); }

input[type="text"], input[type="password"], input[type="file"], select {
    width: 100%;
    background: #000;
    border: 1px solid #334155;
    color: #fff;
    padding: 12px;
    margin-bottom: 15px;
    font-family: monospace;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}
input:focus { border-color: var(--link); }

label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

/* =========================================
   5. SPECIFIC VIEWS (Tech Headers, Tables)
   ========================================= */
.tech-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #242424;
    display: flex; align-items: center; position: relative; padding-bottom: 10px;
}
.tech-header span {
    font-size: 20px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: var(--link); background: var(--secondBG);
    padding-right: 20px; z-index: 2;
}
.tech-header::after {
    content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
    background: repeating-linear-gradient(90deg, #242424, #242424 4px, transparent 4px, transparent 8px);
    z-index: 1;
}

.tableHolder { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 600px; }
th { text-align: left; padding: 12px; border-bottom: 2px solid #333; color: var(--link); }
td { padding: 12px; border-bottom: 1px solid #222; vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* =========================================
   6. FILE VIEWER & PREVIEWS
   ========================================= */
.viewer-container { max-width: 900px; margin: 0 auto; }
.media-box {
    background: #000;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    position: relative;
    flex-direction: column;
}
.media-box img, .media-box video { max-width: 100%; max-height: 80vh; }

.code-preview {
    background: #0D111D;
    border: 1px solid #334155;
    padding: 20px;
    width: 100%;
    overflow: auto;
    max-height: 70vh;
    text-align: left;
    border-radius: 4px;
}
.code-preview pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* =========================================
   7. MODALS
   ========================================= */
.css-modal {
    opacity: 0; visibility: hidden; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.85);
    z-index: 10000; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.css-modal:target { opacity: 1; visibility: visible; }
.css-modal-content {
    background: #0D111D; border: 2px solid #D4DB52; padding: 30px;
    border-radius: 8px; width: 320px; text-align: center;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}
.css-modal h3 { color: #fff; margin-top: 0; font-size: 18px; }
.css-modal p { color: #94a3b8; margin: 15px 0; }
.css-modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* =========================================
   8. FOOTER
   ========================================= */
#site-footer {
    background: var(--footBG);
    border-top: 2px solid var(--border);
    padding: 40px 0;
    margin-top: auto;
    text-align: center;
    color: #4a5568;
    font-size: 11px;
}

/* --- EXISTING CSS REMAINS THE SAME --- */
/* Add these new styles at the bottom */

/* GALLERY GRID */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    background: #000;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: 0.3s;
    cursor: pointer;
}
.gallery-item:hover {
    border-color: var(--link);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CSS-ONLY LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.98);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.lightbox:target {
    display: flex;
    animation: fadeIn 0.3s;
}

.lb-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.lb-content img {
    max-width: 100%;
    max-height: 90vh;
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    display: block;
}

.lb-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    text-decoration: none;
    z-index: 10001;
    opacity: 0.7;
    transition: 0.2s;
}
.lb-close:hover { opacity: 1; color: var(--red); }

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    text-decoration: none;
    padding: 20px;
    opacity: 0.5;
    transition: 0.2s;
    z-index: 10001;
}
.lb-nav:hover { opacity: 1; color: var(--link); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }