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

/* --- 1. CORE RESET & TYPOGRAPHY --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bodyBG);
    font-family: monospace, system-ui, sans-serif;
    color: var(--main);
    line-height: 1.4;
    overflow-x: hidden;
    min-height: 100vh;
}
#page { display: flex; flex-direction: column; min-height: 100vh; }

a { text-decoration: none; color: var(--link); transition: 0.25s; }
a:hover { color: #fff; }
b { font-weight: 700; }

/* --- 2. COMPONENTS --- */
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 30px; }
.box {
    background-color: var(--secondBG);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #242424;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Headers & Buttons */
h1 { font-size: 24px; color: var(--link); text-transform: uppercase; margin-bottom: 10px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 20px; font-size: 12px; font-weight: 700;
    text-transform: uppercase; border-radius: 6px; cursor: pointer;
    border: 1px solid transparent; transition: 0.2s;
}
.btn.block { display: flex; width: 100%; }
.btn.green { background: rgba(42, 196, 101, 0.1); border-color: var(--green); color: var(--green); }
.btn.green:hover { background: var(--green); color: #000; box-shadow: 0 0 15px rgba(42, 196, 101, 0.4); }
.btn.red { background: rgba(223, 63, 92, 0.1); border-color: var(--red); color: var(--red); }
.btn.red:hover { background: var(--red); color: #fff; box-shadow: 0 0 15px rgba(223, 63, 92, 0.4); }
.btn.yellow { background: rgba(255, 198, 90, 0.1); border-color: var(--yellow); color: var(--yellow); }
.btn.yellow:hover { background: var(--yellow); color: #000; }
.btn.white { background: transparent; border-color: #fff; color: #fff; }
.btn.white:hover { background: #fff; color: #000; }

/* Inputs */
input[type="text"], input[type="password"] {
    height: 45px; line-height: 43px; font-size: 14px; padding: 0 15px;
    background-color: #020204; border: 1px solid #334155;
    color: var(--main); width: 100%; margin-bottom: 20px;
    border-radius: 6px; font-weight: 600; font-family: monospace;
    transition: 0.2s;
}
input:focus { border-color: var(--link); outline: none; }
label { display: block; font-size: 11px; color: #64748b; font-weight: 700; margin-bottom: 8px; text-transform: uppercase; }

/* Alerts */
.alert { padding: 15px; border-radius: 6px; margin-bottom: 20px; font-size: 13px; font-weight: 700; text-align: center; border: 1px solid transparent; }
.alert.error { background: rgba(223, 63, 92, 0.1); border-color: var(--red); color: var(--red); }

/* --- 3. HEADER & HERO SECTION --- */
#header {
    background: url('/img/banner.webp') top center no-repeat;
    background-size: cover; 
    background-position: center 25%; /* Slightly adjust focus */
    min-height: 480px;
    position: relative;
    border-bottom: 2px solid var(--border);
    display: flex;
    flex-direction: column;
}

@media (max-width: 1400px) {
    #header { min-height: 350px; }
}

#announce { 
    background: rgba(2, 2, 4, 0.95); 
    padding: 10px 0; 
    font-size: 11px; 
    font-weight: 700; 
    letter-spacing: 1px; 
    text-align: center;
    position: relative; 
    z-index: 2;
}
#announce h2 { color: var(--link); margin: 0; font-size: 12px; }

#head { 
    background: rgba(0, 14, 49, 0.85);
    padding: 20px 0; 
    backdrop-filter: blur(5px);
    margin-top: auto;
}

.header-flex { display: flex; justify-content: space-between; align-items: center; }
.brand-group { display: flex; align-items: center; }

#logo { 
    float: left; width: 91px; height: 64px; 
    background-image: url("/logo.png"); 
    background-size: contain; background-repeat: no-repeat;
    margin-right: 15px; 
}

.shopname { font-size: 20px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; }

/* --- 4. LOGIN / PASSWORD SCREEN --- */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 60vh; }
.login-box { width: 100%; max-width: 450px; text-align: center; }
.show-border { border: 1px solid var(--border); box-shadow: 0 0 50px rgba(0,0,0,0.5); }
.login-header { margin-bottom: 30px; border-bottom: 1px solid #242424; padding-bottom: 20px; }
.login-header p { font-size: 12px; color: #64748b; margin-top: 5px; }
.file-info-preview { margin-top: 20px; font-size: 10px; color: #64748b; display: flex; justify-content: space-between; border-top: 1px solid #242424; padding-top: 15px; font-family: monospace; }

/* --- 5. FILE VIEWER --- */
.viewer-container { max-width: 900px; margin: 20px auto; }
.viewer-header { margin-bottom: 20px; text-align: left; }
.file-meta h1 { font-size: 20px; color: #fff; margin: 10px 0 5px 0; }
.status-text { font-size: 11px; color: var(--green); text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }
.badge { padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; border: 1px solid transparent; }
.badge.green { color: var(--green); border-color: rgba(42, 196, 101, 0.3); background: rgba(42, 196, 101, 0.1); }

.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; }
.media-box img, .media-box video { max-width: 100%; max-height: 80vh; display: block; }

/* Generic File Placeholder */
.generic-file { text-align: center; padding: 60px; color: #64748b; }
.file-icon { font-size: 40px; font-weight: 700; border: 2px solid #334155; width: 100px; height: 100px; line-height: 96px; border-radius: 10px; margin: 0 auto 20px auto; color: #fff; }

/* Zoom Overlay */
.img-zoom-link { display: block; position: relative; cursor: zoom-in; }
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.2s; }
.img-zoom-link:hover .overlay { opacity: 1; }

/* Viewer Footer */
.viewer-footer { margin-top: 20px; }
.big-btn { height: 50px; font-size: 14px; letter-spacing: 1px; }

/* --- 6. PDF SPECIFIC Layout Fixes --- */
/* Override the wrap to allow wider viewing, but capped at a readable size */
body.pdf-view .wrap { 
    max-width: 1400px !important; /* Proper document reading width */
    width: 96%; 
    padding: 0;
    margin: 20px auto;
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
}

body.pdf-view .viewer-container { 
    max-width: 100% !important; 
    width: 100%;
    margin: 0 !important; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1;
}

body.pdf-view .media-box { 
    border-radius: 8px; /* Rounded corners look cleaner */
    border: 1px solid #334155; /* Defined separation */
    flex-grow: 1; 
    height: auto;
    min-height: 85vh; /* Takes up most of the screen vertically */
}

/* Ensure the iframe fills the nicer box */
.pdf-frame { width: 100%; height: 100%; border: none; min-height: 85vh; }

/* PDF Footer Bar */
.pdf-footer-bar { 
    height: 60px; 
    background: #0D111D; 
    border: 1px solid #334155;
    border-top: none; 
    border-radius: 0 0 8px 8px; /* Match media-box */
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0 30px; 
}

/* --- 7. LIGHTBOX (CSS ONLY) --- */
.lightbox {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 5, 15, 0.95); z-index: 10000;
    justify-content: center; align-items: center; flex-direction: column;
}
.lightbox:target { display: flex; }
.lightbox-close-area { position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: zoom-out; }
.lightbox-content { position: relative; z-index: 1; max-width: 95%; max-height: 95%; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.lightbox-content img { max-width: 100%; max-height: 85vh; border: 1px solid #333; box-shadow: 0 0 50px rgba(0,0,0,0.8); }

/* --- 8. FOOTER --- */
#site-footer { margin-top: auto; padding: 30px 0; border-top: 1px solid #242424; background: var(--footBG); }