/* --- 1. GLOBAL & RESET --- */

body {
    background-color: #1E1E1E; /* Matte Charcoal */
    font-family: Courier, monospace;
    font-size: 10pt; 
    color: #EEEEEE;
    margin: 0;
    padding: 20px;
    text-align: center; /* Ensures header/niko elements center correctly */
}

/* --- 2. THE GOLDEN LINKS --- */

a, a:visited, a:active {
    color: #FFD700 !important; /* Gold */
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    color: #FFFFFF !important;
    text-decoration: underline;
}

/* --- 3. LOGO & HEADER --- */

header, .logo {
    margin-bottom: 10px;
    clear: both;
}

h1.logo {
    font-size: 22pt;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 2px 2px 2px #000;
    margin: 0;
}

.subtitle {
    color: #BBBBBB;
    font-size: 9pt;
    margin-top: 2px;
}

/* --- 4. NIKO & CONTAINERS --- */

.niko-container {
    display: inline-block;
    margin: 15px auto 20px auto;
}

.niko-img { 
    border: 2px solid #990000; /* Crimson Border */
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.7);
}

.niko-links {
    background: #2A2A2A;
    padding: 4px 10px;
    border: 1px solid #990000;
    margin-top: 5px;
    font-size: 9pt;
    display: inline-block;
}

/* --- 5. BOARD TABLES (The Wide Navigation) --- */

.boardTable { 
    border: 2px outset #990000; 
    background: #2A2A2A; 
    width: 95%; 
    max-width: 900px; 
    margin: 0 auto; 
    border-collapse: collapse;
    text-align: left; /* Keep internal links left-aligned */
}

.boardTable td { 
    border: 1px inset #333333; 
    padding: 15px; 
    vertical-align: top; 
}

.boardTable b { 
    color: #FFD700; 
    display: block; 
    border-bottom: 1px solid #990000; 
    margin-bottom: 8px;
    font-size: 10pt;
}

.boardTable ul { list-style: none; padding: 0; margin: 0; }
.boardTable li { margin-bottom: 5px; }


/* --- 6. POSTING FORM --- */

.postForm, table.postForm {
    margin: 0 auto 30px auto;
    background-color: #2A2A2A;
    border: 1px solid #990000;
}

.postblock {
    background-color: #990000;
    color: #FFD700;
    font-weight: bold;
    font-size: 9pt;
    padding: 3px 10px;
    text-align: center;
}

input[type="text"], input[type="password"], textarea {
    background-color: #121212;
    border: 1px solid #444;
    color: #FFF;
    font-family: Courier, monospace;
    font-size: 10pt;
    padding: 2px;
}

/* --- 7. REPLIES & POSTS --- */

.reply {
    background-color: #252525;
    color: #EEEEEE;
    border: 1px solid #444;
    border-left: 4px solid #990000;
    padding: 10px;
    margin: 4px 0;
    display: table;
    text-align: left;
}

.postername {
    color: #FFD700;
    font-weight: bold;
}

.replytitle, .filetitle {
    color: #990000; /* Crimson */
    font-weight: 800;
    font-size: 11pt;
}

.unkfunc {
    color: #789922; /* Greentext */
}

/* --- 8. IMAGES & UTILITY --- */

img {
    margin: 5px 15px 5px 5px;
    border: 1px solid #444;
}

/* Fix for thumbnails on boards */

.thread img, .reply img {
    float: left;
}

.filesize {
    font-size: 9pt;
    color: #888;
}

.reflink, .reflink:visited {
    color: #BBBBBB !important;
    font-weight: normal;
}

.footer {
    text-align: center;
    font-size: 8pt;
    color: #666;
    margin-top: 40px;
    clear: both;
    width: 100%;
}

hr {
    border: 0;
    border-top: 1px solid #444;
    margin: 15px 0;
}

/* Sidebar specific overrides */

.sidebar-body {
    padding: 10px;
    text-align: left;
    border-right: 1px solid #990000;
    height: 100vh;
}

.side-header {
    background-color: #990000;
    color: #FFD700;
    font-size: 9pt;
    padding: 2px 5px;
    margin: 10px 0 5px 0;
    border-bottom: 1px solid #FFD700;
    font-weight: bold;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #1E1E1E; }
::-webkit-scrollbar-thumb { background: #990000; }

@media screen and (max-width: 600px) {
    body {
        padding: 10px;
        font-size: 9pt; /* Slightly smaller for mobile */
    }

    #board-wrapper, .boardTable {
        width: 100% !important;
        max-width: 100% !important;
    }

    table.postForm {
        width: 100%;
    }

    .form-label {
        width: 60px; /* Slimmer labels for mobile */
        font-size: 8pt;
    }

    input[type="text"], textarea {
        width: 92%; /* Prevent horizontal scrolling */
    }

    .reply {
        max-width: 98%;
        display: block; /* Allows post to fill width */
    }
}

/* Exclusive Logo Styling */
.repo-emblem {
    margin: 0 auto;
    max-width: 180px; /* Adjust based on your PNG's actual size */
    height: auto;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.2)); 
    transition: transform 0.3s ease, filter 0.3s ease;
    border: none !important; 
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

.repo-emblem:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
}

/* Compact Niko for Table Placement */
.niko-sidebar-img {
    border: 2px solid #990000; /* Crimson Border */
    max-width: 200px;
    height: auto;
    display: inline-block;
    margin: 0 auto;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.7);
}

/* Remove bullets if your <ul> usually has them */
.boardTable ul {
    list-style-type: none;
    padding-left: 0;
}