/* Modern CSS Core Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.15s ease-in-out;
}

body {
    background-color: #0d0d0e; /* Deep dark slate black */
    /* Native Linux Open-Source Monospace Font Stack */
    font-family: 'JetBrains Mono', 'Fira Code', 'Noto Sans Mono', monospace;
    color: #e2e4e9;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Forces the footer to stay locked to the bottom */
    overflow-x: hidden;
}

/* MINECRAFT GAME-ENGINE LOADING SCREEN OVERLAY */
#mc-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0d0d0e;
    z-index: 999999; /* Higher priority layer than the flash overlay */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.4s ease;
}

/* Clean Text-Only Brand Title Layout - Dynamic Viewport Scaling */
.mojang-studios-logo {
    color: #ffffff;
    font-weight: 700;
    font-size: calc(1.8rem + 2vw); /* Responsive typography matrix */
    letter-spacing: -1px;
    margin-bottom: 8vh;
    text-transform: none;
}

.mojang-studios-logo span {
    color: #ff4500; /* Orange identifier match */
}

/* Loading Matrix Container - Screen Size Dependent */
.loading-status-group {
    width: 80vw;
    max-width: 550px; /* Upper boundary cap for ultra-wide panels */
    min-width: 260px; /* Lower boundary floor for mobile viewports */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.loading-text {
    font-size: calc(0.7rem + 0.3vw);
    color: #ff4500;
    text-align: center;
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Loading Track Core Borders */
.progress-bar-track {
    width: 100%;
    height: 8px;
    background-color: #1f2023;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

/* Progress Bar Filling Element */
.progress-bar-fill {
    height: 100%;
    width: 0%; /* JavaScript drives this value from 0 to 100 */
    background-color: #ff4500; /* Custom theme orange accent match */
    box-shadow: 0 0 12px #ff4500;
    border-radius: 4px;
    transition: width 0.3s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Hidden Class to clear screen when done */
.loading-complete {
    transform: translateY(-100vh);
    opacity: 0;
    pointer-events: none;
}

/* 1. FIXED CONTENT TOP HEADER */
header {
    background-color: #000000;
    border-bottom: 1px solid #1f2023;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: #ff4500; /* Custom orange identifier accent */
}

/* Modular Flexbox Navigation Links & TUI Dropdown System */
nav {
    display: flex;
    flex-wrap: wrap; /* Safe wrapping if you add too many items */
    align-items: center;
    gap: 12px;
}

/* TRUE BRIGHT MONOSPACE TUI BUTTON GRAPHIC STYLING */
.tui-btn {
    color: #ffffff; /* Brighter high-visibility baseline visibility */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    padding: 6px 10px;
    background-color: #151618;
    border: 1px solid #2d3139;
    border-radius: 4px;
}

/* High contrast terminal focus triggers */
.tui-btn:hover {
    color: #000000;
    background-color: #ff4500;
    border-color: #ff4500;
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.4);
}

/* Dropdown Container Element */
.dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 15px; /* Invisible structural padding bridge keeps DOM focus stable */
    margin-bottom: -15px;
}

/* Hidden Dropdown Content Menu Matrix */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #000000;
    min-width: 260px;
    border: 1px solid #1f2023;
    border-radius: 6px;
    padding: 8px 0;
    margin-top: -2px; /* Pulls menu tightly up against the padding bridge boundary */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    z-index: 2000;
}

/* Indicator triangle positioning matrix */
.dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 24px;
    border: 6px solid transparent;
    border-bottom-color: #1f2023;
}

.dropdown-menu a {
    color: #949aae;
    padding: 10px 18px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    text-align: left;
    background: none;
    border: none;
}

.dropdown-menu a:hover {
    background-color: #0d0d0e;
    color: #ff4500;
    padding-left: 24px; /* Snappy micro-interaction slide */
}

/* Show the menu smoothly when hovering over the container parent */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* CENTRAL CONTENT LAYOUT AREA */
main {
    flex: 1; /* Automatically stretches to absorb extra monitor space */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* 2. AUTO-BALANCING MODULAR INTEGRATION FOOTER */
footer {
    background-color: #000000;
    border-top: 1px solid #1f2023;
    padding: 40px 40px 20px 40px;
    margin-top: auto;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #151618;
}

.footer-col {
    flex: 1;
    min-width: 250px; /* Forces stack containment on mobile viewports */
}

.footer-col h4 {
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p, .footer-col a {
    color: #949aae;
    font-size: 0.85rem;
    line-height: 1.8;
    text-decoration: none;
}

.footer-col a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: #4b526d;
}

/* Easter Egg Code Terminal Box Styling */
.easter-egg-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.easter-egg-box input {
    background-color: #0d0d0e;
    border: 1px solid #1f2023;
    color: #e2e4e9;
    font-family: inherit;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    outline: none;
    width: 120px;
}

.easter-egg-box input:focus {
    border-color: #ff4500;
}

/* OVERLAY CANVAS SETUP */
#trans-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    display: none;

    /* Transgender Flag Colors */
    background: linear-gradient(to bottom,
        #5BCEFA 0%, #5BCEFA 20%,
        #F5A9B8 20%, #F5A9B8 40%,
        #FFFFFF 40%, #FFFFFF 60%,
        #F5A9B8 60%, #F5A9B8 80%,
        #5BCEFA 80%, #5BCEFA 100%
    );
}

/* Optimized High-Speed Animation Sequences */
@keyframes rawFlash {
    0%, 24%, 48%, 72%, 96% { opacity: 0; }
    12%, 36%, 60%, 84% { opacity: 1; }
    100% { opacity: 0; }
}

.run-flash {
    display: block !important;
    animation: rawFlash 0.3s ease-in-out forwards;
}

/* Responsive Breakpoint for Mobile Interfaces */
@media (max-width: 600px) {
    header, .footer-grid, .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    nav {
        margin-top: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .dropdown {
        padding-bottom: 0;
        margin-bottom: 0;
        width: 100%;
    }
    .dropdown-menu {
        position: relative;
        margin-top: 6px;
        box-shadow: none;
        border: none;
        border-left: 2px solid #ff4500;
        border-radius: 0;
        padding-left: 10px;
        background-color: transparent;
        width: 100%;
    }
    .dropdown-menu::before {
        display: none;
    }
}