/* Force full screen and hide scrollbars */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #020204; /* Deep space dark backdrop */
    font-family: 'Arial Black', sans-serif;
}

#canvas-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Subtle overlay to give it a high-stakes, secure feel */
#vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.8);
    z-index: 2;
    pointer-events: none;
}

/* --- WELCOME MESSAGING TYPOGRAPHY --- */
.welcome-container {
    position: absolute;
    top: 18%; /* Frames the top third of the globe */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    pointer-events: none;
    user-select: none;
    width: 100%;
}

.welcome-title {
    font-size: 54px;
    font-weight: 900;
    letter-spacing: 6px;
    margin: 0;
    /* Sleek metallic gradient text */
    background: linear-gradient(to bottom, #ffffff 30%, #a3a3a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.9));
}

.welcome-subtitle {
    font-size: 13px;
    color: #ffd014; /* Matches button safety-yellow */
    font-weight: bold;
    letter-spacing: 5px;
    margin-top: 12px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    opacity: 0.9;
}

/* --- INDUSTRIAL BUTTONS SYSTEM --- */

/* Center container for primary LOGIN */
.ui-container-center {
    position: absolute;
    top: 66%; /* Places the main button exactly 2/3 down */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Bottom right container for NEW PLAYER secondary route */
.ui-container-right {
    position: absolute;
    bottom: 5%;
    right: 5%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Bottom-left container for ABOUT — mirrors NEW PLAYER */
.ui-container-left {
    position: absolute;
    bottom: 5%;
    left: 5%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Version label, bottom-centre */
.version-label {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: #ffd014;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: bold;
    opacity: 0.75;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
    pointer-events: none;
    user-select: none;
}

/* ABOUT panel overlay */
.about-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 2, 4, 0.82);
    backdrop-filter: blur(4px);
    padding: 20px;
}
.about-overlay.show { display: flex; }
.about-panel {
    width: min(460px, 100%);
    max-height: 80vh;
    background: linear-gradient(180deg, #1d1810, #14110d);
    border: 2px solid #2b0c00;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
    padding: 26px 24px 22px;
    position: relative;
    color: #e8e2d4;
    font-family: 'Trebuchet MS', sans-serif;
}
.about-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: #9b9484;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s;
}
.about-close:hover { color: #ffd014; }
.about-title {
    font-family: 'Arial Black', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 4px;
    background: linear-gradient(to bottom, #fff 30%, #a3a3a3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.about-tagline {
    color: #ffd014;
    font-size: 12px;
    font-style: italic;
    letter-spacing: 1px;
    margin: 0 0 14px;
    opacity: 0.9;
}
.about-scroll {
    max-height: 48vh;
    overflow-y: auto;
    padding-right: 8px;
    font-size: 14px;
    line-height: 1.6;
}
.about-scroll p { margin: 0 0 12px; }
.about-scroll h3 {
    color: #d64700;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 16px 0 8px;
}
.about-scroll ol { margin: 0 0 12px; padding-left: 20px; }
.about-scroll ol li { margin-bottom: 6px; }
.about-foot {
    font-size: 12px;
    color: #9b9484;
    font-style: italic;
    border-top: 1px solid #3a2f20;
    padding-top: 10px;
    margin-top: 4px !important;
}
.about-scroll::-webkit-scrollbar { width: 8px; }
.about-scroll::-webkit-scrollbar-thumb { background: #521800; border-radius: 4px; }

/* Outer Heavily Weathered Rusted Frame */
.industrial-frame {
    background: radial-gradient(circle at 50% 20%, #e65c19 0%, #a63605 40%, #521800 90%);
    padding: 10px 14px;
    border-radius: 80px;
    border: 5px solid #2b0c00;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.7),
        inset 0 4px 6px rgba(255, 255, 255, 0.3),
        inset 0 -10px 20px rgba(0, 0, 0, 0.6);
    position: relative;
}

/* Simulated Rust Patches via pseudo-element */
.industrial-frame::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 75px;
    background-image: 
        radial-gradient(ellipse at 20% 30%, rgba(66, 20, 1, 0.8) 0%, transparent 20%),
        radial-gradient(circle at 85% 70%, rgba(41, 13, 1, 0.9) 0%, transparent 25%);
    pointer-events: none;
}

/* Inner Clean Construction Orange Socket Rim */
.orange-rim {
    background: linear-gradient(to bottom, #d64700, #802b00);
    padding: 6px;
    border-radius: 65px;
    border: 3px solid #1a0600;
    box-shadow: inset 0 8px 12px rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The Animated Safety-Yellow Core Button */
.yellow-core {
    background: linear-gradient(to bottom, #ffd014 0%, #f0ab00 60%, #c28600 100%);
    border: 3px solid #3d2f00;
    border-radius: 50px;
    padding: 18px 75px;
    color: #2b2b2b;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 3px;
    cursor: pointer;
    outline: none;
    position: relative;
    user-select: none;
    
    /* High-fidelity cartoony shadow mechanics */
    box-shadow: 
        0 8px 0 #8a6000, 
        inset 0 4px 4px rgba(255, 255, 255, 0.6),
        inset 0 -4px 8px rgba(0, 0, 0, 0.2);
    
    transition: transform 0.05s ease, box-shadow 0.05s ease;
}

/* 3D Depress Animation Mechanics on Click */
.yellow-core:active {
    transform: translateY(6px);
    box-shadow: 
        0 2px 0 #8a6000, 
        inset 0 6px 10px rgba(0, 0, 0, 0.6),
        inset 0 -2px 4px rgba(255, 255, 255, 0.2);
    color: #121212;
}

.yellow-core:hover {
    filter: brightness(1.05);
}

/* --- SMALL MODIFIER VARIANT (For New Player Experience) --- */
.industrial-frame.small {
    padding: 6px 10px;
    border-radius: 50px;
    border: 3px solid #2b0c00;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
}

.industrial-frame.small::before {
    border-radius: 45px;
}

.orange-rim.small {
    padding: 4px;
    border-radius: 40px;
    border: 2px solid #1a0600;
}

.yellow-core.small {
    padding: 10px 24px;
    font-size: 14px;
    letter-spacing: 1px;
    box-shadow: 
        0 4px 0 #8a6000, 
        inset 0 2px 2px rgba(255, 255, 255, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.yellow-core.small:active {
    transform: translateY(4px); /* Scaled down travel distance */
    box-shadow: 
        0 1px 0 #8a6000, 
        inset 0 4px 6px rgba(0, 0, 0, 0.6),
        inset 0 -1px 2px rgba(255, 255, 255, 0.2);
}

/* --- AUTH VIEWS (login / signup) --- */
.auth-overlay {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 2, 4, 0.78);
    backdrop-filter: blur(4px);
    padding: 20px;
}
.auth-overlay.show { display: flex; }

.auth-panel {
    width: min(360px, 100%);
    background: linear-gradient(180deg, #1d1810, #14110d);
    border: 2px solid #2b0c00;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
    padding: 30px 26px 26px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: #9b9484;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.auth-close:hover { color: #ffd014; }

.auth-title {
    font-family: 'Arial Black', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 6px;
    text-align: center;
    background: linear-gradient(to bottom, #fff 30%, #a3a3a3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    background: #0d0b08;
    border: 1px solid #3a2f20;
    border-radius: 6px;
    color: #e8e2d4;
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 15px;
    outline: none;
}
.auth-input:focus { border-color: #ffd014; }

.auth-submit {
    margin-top: 6px;
    padding: 13px;
    background: linear-gradient(180deg, #ffd014, #d68a00);
    border: none;
    border-radius: 6px;
    color: #1a1206;
    font-family: 'Arial Black', sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: filter 0.15s;
}
.auth-submit:hover { filter: brightness(1.1); }

.auth-message {
    min-height: 18px;
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 13px;
    color: #ffd014;
    text-align: center;
}
