/* =========================================
   1. GLOBAL RESET & FONTS
   ========================================= */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; }

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://www.ensorium.com/fonts/MyFont-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('https://www.ensorium.com/fonts/MyFont-medium.woff2') format('woff2');
}

@font-face {
    font-family: 'OptimusPrinceps';
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: url('https://www.ensorium.com/fonts/OptimusPrinceps.ttf') format('truetype');
}

/* Hides Pandoc's auto-generated title block to prevent duplicates */
#title-block-header {
    display: none;
}

/* =========================================
   2. BASE STYLING & CONTAINER
   ========================================= */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #0a0a0a;
    color: #cccccc;
    max-width: 1000px;
    margin: 100px auto 60px auto; 
    padding: 0 20px;
    line-height: 1.6;
}

/* =========================================
   3. NAVIGATION BAR
   ========================================= */
#navbar {
    position: fixed;
    top: 0; left: 0; width: 100vw; 
    padding: 15px 0;
    background-color: #050505; 
    z-index: 1000;
    display: flex; justify-content: center; align-items: center; gap: 25px;
    border-bottom: 1px solid #222222;
}

#navbar a {
    text-decoration: none; color: #cccccc; font-weight: 500;
    text-transform: uppercase; font-size: 14px; transition: color 0.1s; letter-spacing: 0.5px;
}
#navbar a:hover { color: #8A2BE2; }

#theme-toggle {
    background: transparent; border: none; color: #cccccc; padding: 0; 
    cursor: pointer; transition: transform 0.2s ease, color 0.1s; margin-left: 20px;
}
#theme-toggle:hover { transform: scale(1.15); color: #8A2BE2; }

.icon-moon { display: none; }
.icon-sun { display: block; }
body.light-mode .icon-moon { display: block; }
body.light-mode .icon-sun { display: none; }

/* =========================================
   4. HUB HEADER
   ========================================= */
.hub-header {
    text-align: left;
    margin-bottom: 60px;
}

.hub-header h1 {
    font-family: 'Montserrat', serif;
    font-size: 42px;
    color: #ffffff;
    font-weight: normal;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hub-header p {
    font-size: 16px;
    color: #aaaaaa;
}

/* =========================================
   5. GAME GRID & CARDS
   ========================================= */
.guide-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.guide-card {
    background-color: #111111;
    border: 1px solid #222222;
    border-radius: 2px;
    text-decoration: none;
    display: flex;
    flex-direction: row; /* Aligns image and text side-by-side */
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-4px);
    border-color: #8A2BE2;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.guide-card img {
    width: 450px; /* Fixed width for the banner image */
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-right: 1px solid #222222; /* Shifts border to the right side */
}

.guide-info {
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.guide-info h2 {
    font-family: 'OptimusPrinceps', serif;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: normal;
    letter-spacing: 1px;
}

.guide-info p {
    margin: 0;
    font-size: 15px;
    color: #aaaaaa;
}

/* Mobile Fallback for smaller screens */
@media (max-width: 800px) {
    .guide-card {
        flex-direction: column;
    }
    .guide-card img {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #222222;
    }
    .guide-info {
        padding: 20px;
    }
}
/* =========================================
   6. FOOTER
   ========================================= */
/* footer {
    padding: 40px 20px;
    margin-top: 80px;
    border-top: 1px solid #222222;
    background-color: #0a0a0a;
    text-align: center;
    display: flex; flex-direction: column; gap: 15px;
}
footer a { color: #aaaaaa; text-decoration: none; font-size: 14px; transition: color 0.1s; }
footer a:hover { color: #8A2BE2; }
footer p { margin: 0; font-size: 14px; color: #666666; }
*/

footer {
    padding: 50px 20px;
    background-color: #0a0a0a; /* Fixed: Dark background for Dark Mode */
    color: #cccccc;            /* Fixed: Light text for Dark Mode */
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid #222222;
}

footer a {
    color: #aaaaaa;
    text-decoration: none;
    font-size: 14px;
}

footer a:hover { color: #8A2BE2; }

footer .footer-socials {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

footer .footer-socials a {
    font-size: 40px; 
    transition: transform 0.2s ease-in-out;
}

footer .footer-socials a.steam { color: #66c0f4; }
footer .footer-socials a.youtube { color: #FF0000; }
footer .footer-socials a.bluesky { color: #1185fe; }
footer .footer-socials a.reddit { color: #FF4500; }

footer .footer-socials a:hover {
    transform: scale(1.15);
}

.footer-lang {
    margin-bottom: 15px; 
    font-size: 14px;
    color: #999999; 
}

.footer-lang a {
    color: #999999; 
    text-decoration: none;
    transition: color 0.3s;
    padding: 0 5px; 
}

.footer-lang a:hover { color: #8A2BE2; }
.footer-lang a.active-lang { color: #ffffff; font-weight: 700; }

/* =========================================
   7. LIGHT MODE OVERRIDES
   ========================================= */
body.light-mode { 
    background-color: #ffffff; 
    color: #333333; 
}

@media (max-width: 800px) {
    body.light-mode .guide-card img {
        border-right: none;
        border-bottom-color: #eaeaea;
    }
}

body.light-mode #navbar { background-color: #ffffff; border-bottom: 1px solid #eaeaea; }
body.light-mode #navbar { background-color: #ffffff; border-bottom: 1px solid #eaeaea; }
body.light-mode #navbar a { color: #333333; }
body.light-mode #navbar a:hover { color: #8A2BE2; }
body.light-mode #theme-toggle { color: #333333; }
body.light-mode #theme-toggle:hover { color: #8A2BE2; }

body.light-mode .hub-header h1 { color: #111111; }
body.light-mode .hub-header p { color: #666666; }

body.light-mode .guide-card {
    background-color: #fcfcfc;
    border-color: #eaeaea;
}
body.light-mode .guide-card:hover {
    border-color: #8A2BE2;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
body.light-mode .guide-card img { border-bottom-color: #eaeaea; }
body.light-mode .guide-info h2 { color: #111111; }
body.light-mode .guide-info p { color: #666666; }

/* Inverts the footer to black in light mode */
body.light-mode footer { 
    background-color: #ffffff; 
    border-top-color: #eaeaea; 
    color: #333333;
}

body.light-mode footer a { color: #333333; }
body.light-mode footer a:hover { color: #8A2BE2; }

body.light-mode .footer-lang a { color: #666666; }
body.light-mode .footer-lang a:hover { color: #8A2BE2; }
body.light-mode .footer-lang a.active-lang { color: #111111; }