/* --- 1. GLOBAL VARIABLES & RESET --- */
:root {
    --bg-dark: #0f1115;       /* Deep Cave Color */
    --bg-card: #1a1d24;       /* Lighter Stone */
    --accent: #ff9d00;        /* Mining Laser Orange */
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- 2. NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 17, 21, 0.95); /* Solid background when scrolling */
    border-bottom: 1px solid #333;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- UPDATED LOGO STYLES --- */
.logo {
    display: flex;             /* Aligns image and text in a row */
    align-items: center;       /* Centers them vertically */
    gap: 12px;                 /* Space between image and text */
    
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: #fff;
    text-decoration: none;
}

/* Control the Logo Image Size */
.logo img {
    height: 40px; /* Constrain height so it fits in the nav */
    width: auto;  /* Width adjusts automatically */
    object-fit: contain;
}

/* Optional: Hover effect for the whole group */
.logo:hover {
    opacity: 0.8;
}

.nav-links { display: flex; gap: 30px; }
.nav-links a { font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }
.nav-links a:hover { color: var(--accent); }

/* --- 3. HERO SECTION (VIDEO BG) --- */
.hero {
    width: 100%;
    height: 100vh; /* Full Screen Height */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* The Video Layer */
.back-video {
    position: absolute;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    object-fit: cover; /* Ensures video covers screen without stretching */
    filter: brightness(0.4); /* Darkens video so text pops */
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 5px;
    margin-bottom: 10px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #ddd;
}

/* --- 4. BUTTONS --- */
.btn {
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin: 0 10px;
}

.btn.primary {
    background-color: var(--accent);
    color: #000;
}
.btn.primary:hover { background-color: #ffb84d; transform: translateY(-2px); }

.btn.secondary {
    border: 2px solid #fff;
    color: #fff;
}
.btn.secondary:hover { background-color: #fff; color: #000; transform: translateY(-2px); }

/* --- 5. SECTIONS & CARDS --- */
.section-dark { padding: 80px 0; }
.section-light { padding: 80px 0; background-color: #14161b; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* Game Card Styling */
.game-card {
    display: flex;
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid #333;
    transition: transform 0.3s ease;
}

.game-card:hover { transform: scale(1.02); border-color: var(--accent); }

.game-info { flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.game-info h3 { font-size: 2rem; margin-bottom: 15px; color: #fff; }
.game-info p { margin-bottom: 20px; color: var(--text-muted); }

.game-visual { flex: 1; min-height: 300px; }
.game-visual img { width: 100%; height: 100%; object-fit: cover; }

.btn-small {
    align-self: flex-start;
    padding: 8px 20px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.9rem;
    border-radius: 4px;
}
.btn-small:hover { background: var(--accent); color: #000; }

/* --- 6. DEVLOG GRID --- */
.log-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.log-preview {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.log-preview .date { font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 10px; }
.log-preview h4 { font-size: 1.2rem; margin-bottom: 10px; color: #fff; }
.log-preview p { font-size: 0.9rem; margin-bottom: 15px; }
.log-preview a { color: var(--accent); font-weight: bold; font-size: 0.9rem; }

/* --- 7. FOOTER --- */
footer {
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.socials { margin-top: 20px; }
.socials a { margin: 0 15px; color: #fff; font-weight: bold; }
.socials a:hover { color: var(--accent); }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .game-card { flex-direction: column-reverse; } /* Image on top on mobile */
    .game-visual { height: 200px; }
    .nav-links { display: none; } /* Hide menu on mobile for now - simple version */
}

/* --- 8. TIMELINE (VERTICALLY ALIGNED) --- */

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0 0 0;
}

/* THE CENTRAL LINE */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #333;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    z-index: 0; 
}

/* FIX: Mask the line below the last icon */
.timeline-item:last-child::after {
    content: '';
    position: absolute;
    top: 50%;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    background-color: var(--bg-dark);
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
    display: block; 
    height: 200px; /* A good balanced height */
}

/* THE CENTER IMAGE */
.timeline-icon {
    position: absolute;
    left: 50%;
    top: 50%; /* Move to vertical center */
    transform: translate(-50%, -50%); /* Center perfectly */
    width: 130px; 
    height: 130px;
    z-index: 10; 
    background-color: var(--bg-dark); 
    border-radius: 50%;
    padding: 10px; 
}

.timeline-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    background-color: #000;
}

/* THE TEXT CONTENT - VERTICALLY CENTERED */
.timeline-content {
    position: absolute;
    top: 50%; 
    transform: translateY(-50%); 
    
    /* CHANGED: Increased from 40% to 44% to reach closer to the center */
    width: 44%; 
    
    z-index: 5;
}

/* 2. UPDATE ODD ITEMS (Text on Left) */
.timeline-item:nth-child(odd) .timeline-content {
    left: 0;
    text-align: right;
    
    /* CHANGED: Reduced gap from 80px to 30px */
    padding-right: 30px; 
}

/* 3. UPDATE EVEN ITEMS (Text on Right) */
.timeline-item:nth-child(even) .timeline-content {
    right: 0;
    text-align: left;
    
    /* CHANGED: Reduced gap from 80px to 30px */
    padding-left: 30px; 
}

/* TYPOGRAPHY */
.timeline-content .date {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #fff;
}

.timeline-content h4 {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.timeline-content p {
    color: #a0a0a0;
    font-size: 1rem;
    line-height: 1.4;
}

/* MOBILE FIX */
@media (max-width: 768px) {
    .timeline::after { left: 40px; }
    .timeline-item:last-child::after { display: none; } 

    .timeline-item {
        height: auto;
        margin-bottom: 50px;
        display: flex;
        flex-direction: column;
    }

    .timeline-icon {
        position: relative;
        left: 40px;
        top: 0;
        transform: translateX(-50%);
        margin-bottom: 20px;
    }

    /* RESET Vertical Alignment for Mobile */
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        position: relative;
        width: 100%;
        left: auto;
        right: auto;
        top: 0;           /* Reset top */
        transform: none;  /* Reset transform */
        text-align: left;
        padding-left: 90px;
        padding-right: 20px;
    }
}

/* --- 9. DEVLOG PAGE STYLES --- */

/* Force Nav to be dark on this page */
.navbar.scanned {
    background: #0f1115;
    border-bottom: 1px solid #333;
}

.nav-links a.active {
    color: var(--accent);
}

.devlog-header {
    padding: 150px 0 50px 0; /* Extra top padding to clear the fixed navbar */
    text-align: center;
    background: linear-gradient(to bottom, #0f1115, #16191f);
}

.devlog-header h1 { font-size: 3rem; color: #fff; letter-spacing: 2px; }

/* The Reading Area */
.devlog-container {
    max-width: 800px; /* Limits width for better readability */
    margin: 0 auto;
    padding-bottom: 100px;
}

/* Individual Post Card */
.dev-post {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 50px;
}

.post-meta {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-date { color: var(--text-muted); font-size: 0.9rem; }

/* Tags (Color coded categories) */
.post-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #000;
}

.post-tag.patch { background-color: var(--accent); } /* Orange for patches */
.post-tag.news { background-color: #4da6ff; }      /* Blue for news */

.dev-post h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 20px;
}

.post-image {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #333;
}

/* The actual text content */
.post-content p { margin-bottom: 15px; color: #ccc; font-size: 1.1rem; }
.post-content h3 { color: #fff; margin-top: 30px; margin-bottom: 10px; }
.post-content ul { list-style: disc; padding-left: 20px; margin-bottom: 20px; color: #ccc; }
.post-content li { margin-bottom: 5px; }

/* --- 10. TEAM SECTION --- */

.team-grid {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap to next line if screen is small */
    justify-content: center; /* Centers them (3 top, 2 bottom) */
    gap: 50px; /* Space between members */
    margin-top: 50px;
}

.team-member {
    text-align: center;
    width: 250px; /* Fixed width for consistency */
}

/* The Circular Photo Frame */
.member-img {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px auto; /* Center horizontally, margin bottom */
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #fff; /* White border like the reference */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member:hover .member-img {
    transform: scale(1.05);
    border-color: var(--accent); /* Glows orange on hover */
}

/* Typography */
.team-member h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 5px;
    font-weight: 800;
}

.team-member .role {
    font-size: 1rem;
    color: var(--text-muted); /* Grey color for role */
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Social Icons */
.member-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.member-socials a {
    width: 40px;
    height: 40px;
    background-color: #000; /* Black circle background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff; /* White icon */
    font-size: 1.1rem;
    transition: 0.3s;
}

.member-socials a:hover {
    background-color: var(--accent); /* Orange on hover */
    transform: translateY(-3px);
}

/* FORCE LINE BREAK (For 2 Up, 3 Down layout) */
.break {
    flex-basis: 100%;
    height: 0;
}

/* MOBILE ADJUSTMENT */
@media (max-width: 768px) {
    /* On mobile, we want them all in one column, so we disable the specific break */
    .break {
        display: none;
    }
}

/* --- 11. PARTNERS SECTION --- */
.partners-section {
    background-color: #fff; /* White background */
    padding: 40px 0;
    border-top: 1px solid #ddd;
}

.partners-grid {
    display: flex;
    justify-content: space-around; /* Spreads logos evenly */
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    opacity: 0.6; /* Makes logos slightly grey/muted */
    transition: 0.3s;
}

.partners-grid:hover { opacity: 1; } /* Full color on hover */

.partners-grid img {
    height: 35px; /* Control logo size */
    width: auto;
    object-fit: contain;
    filter: grayscale(100%); /* Force B&W initially */
    transition: 0.3s;
}

.partners-grid img:hover { filter: grayscale(0%); }

/* --- 12. NEWSLETTER SECTION --- */
.newsletter-section {
    position: relative;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    padding: 80px 0 0 0; /* No bottom padding, so character sits on footer */
    overflow: hidden;
}

/* Dark overlay to make text readable over the map */
.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7); 
    z-index: 0;
}

.newsletter-title {
    position: relative;
    z-index: 2;
    text-align: center;
    font-size: 3rem;
    color: #fff;
    font-weight: 800;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.newsletter-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between; /* Pushes char left, form right */
    align-items: flex-end; /* Aligns them to the bottom */
    max-width: 1000px;
    margin: 0 auto;
}

/* The 3D Character */
.newsletter-char img {
    height: 350px; /* Adjust based on your image */
    display: block;
    margin-bottom: -10px; /* Hides the bottom cut of the image */
}

/* The Form Area */
.newsletter-form-wrapper {
    margin-bottom: 100px; /* Moves form up to middle of section */
    text-align: right; /* Aligns text to right like screenshot */
    width: 50%;
}

.newsletter-form-wrapper h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.subscribe-form {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.subscribe-form input {
    padding: 15px;
    border-radius: 4px;
    border: none;
    width: 250px;
    font-size: 1rem;
}

.subscribe-form button {
    padding: 15px 30px;
    background-color: var(--accent); /* Yellow/Orange */
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}

.subscribe-form button:hover {
    background-color: #fff;
}

/* MOBILE FIX */
@media (max-width: 768px) {
    .partners-grid { flex-direction: column; }
    
    .newsletter-content { flex-direction: column-reverse; align-items: center; }
    
    .newsletter-char img { height: 250px; margin-top: 20px; }
    
    .newsletter-form-wrapper { 
        width: 100%; 
        text-align: center; 
        margin-bottom: 20px; 
    }
    
    .subscribe-form { 
        flex-direction: column; 
        width: 100%; 
    }
    
    .subscribe-form input { width: 100%; }
}

/* --- 12. NEWSLETTER SECTION (UPDATED) --- */
.newsletter-section {
    position: relative;
    background-color: #0b0f19; /* Deep space/dark background */
    padding: 100px 0; /* Give the content some room */
    overflow: hidden;
    /* Removed all background-image lines from here to avoid conflicts */
}

/* We use ::before so it sits BEHIND the content */
.newsletter-section::before {
    content: '';
    position: absolute;
    
    /* Center the container */
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* Set the size of the container relative to the section */
    width: 100%;  /* Makes the map 90% width of screen (adjust to 80% to make it smaller) */
    height: 100%;
    
    background-image: url('assets/images/world_map.png');
    
    /* THE KEY FIXES: */
    background-size: contain; /* Shows the WHOLE map, never cuts it off */
    background-position: center;
    background-repeat: no-repeat;
    
    /* Visual Effects */
    opacity: 0.5; /* Keep it subtle */
    filter: invert(1); /* Turns black dots white */
    pointer-events: none;
    z-index: 0;
}

/* Ensure your text/character sits on top */
.newsletter-section > * {
    position: relative;
    z-index: 2;
}

/* 1. Hide the specific link in the navigation menu */
/* Note: You might need to check if your menu item has a specific class like .nav-devlog */
/* If not, use the nth-child selector (assuming it's the 2nd item based on your screenshot) */
nav ul li:nth-child(2) {
    display: none !important;
}

/* OR, if you have a specific class for that link, use this instead: */
/* .nav-item-devlog { display: none !important; } */


/* 2. Hide the entire Devlog section on the page */
/* Replace '.devlog-section' with the actual class name of that section */
.devlog-section, 
#devlog {
    display: none !important;
}