/* --- BASE THEME & VARIABLES --- */
:root {
    --bg-dark: #070314;
    --neon-cyan: #00f3ff;
    --neon-purple: #b500ff;
    --neon-pink: #ff00ea;
    --neon-green: #00ff2a;
    --glass-bg: rgba(20, 10, 40, 0.55);
    --glass-border: rgba(0, 243, 255, 0.4);
    --text-white: #e0eaff;
    --font-mono: 'Consolas', 'Courier New', Courier, monospace;
}

body,
html {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* --- BACKGROUND: MOVING STARS --- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #1b0a33 0%, #070314 85%);
    z-index: -10;
}

.stars {
    position: fixed;
    inset: 0;
    z-index: -9;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 150px 90px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 190px 120px, #ddd, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 250px 250px;
    opacity: 0.6;
    animation: driftStars 80s linear infinite;
}

@keyframes driftStars {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-250px);
    }
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid var(--neon-purple);
    box-shadow: 0 0 15px rgba(181, 0, 255, 0.2);
    position: relative;
    z-index: 600;
    /* Stays above the login overlay (z-index 500) */
}

.navbar .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar .logo:hover {
    transform: scale(1.05);
}

.logo-img,
.skills-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 0 10px var(--neon-purple));
    vertical-align: middle;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.navbar a {
    color: var(--text-white);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.navbar a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

/* --- CORE LAYOUT MECHANICS --- */
#app {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.screen {
    display: none;
    min-height: 75vh;
    animation: fadeIn 0.4s ease-out;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 50px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- GLASSMORPHISM --- */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(0, 243, 255, 0.1);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

/* --- TYPOGRAPHY & STORY CONTENT STYLES --- */
.glow-text {
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--neon-cyan);
    margin: 0 0 20px 0;
    font-size: 2.8rem;
    text-transform: uppercase;
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
}

h1 span {
    color: var(--neon-purple);
    font-size: 1.8rem;
    text-shadow: 0 0 10px var(--neon-purple);
}

.success-text {
    color: var(--neon-green);
    text-shadow: 0 0 15px var(--neon-green);
    font-size: 3rem;
    margin-top: 0;
}

.sub-heading {
    color: var(--neon-purple);
    letter-spacing: 2px;
    margin-top: -10px;
    margin-bottom: 25px;
    font-weight: normal;
}

.mission-statement {
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

.text-center {
    text-align: center !important;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

/* --- BUTTONS --- */
.neon-btn {
    display: inline-block;
    padding: 14px 32px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.neon-btn:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 20px var(--neon-cyan);
    transform: scale(1.05);
}

.success-btn {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
    box-shadow: 0 0 10px rgba(181, 0, 255, 0.3);
}

.success-btn:hover {
    background: var(--neon-purple);
    color: #fff;
    box-shadow: 0 0 20px var(--neon-purple);
}

/* --- CARD LAYOUTS (How It Works & The Crew) --- */
.cards-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    width: 100%;
}

.wrap-5 {
    max-width: 1100px;
    justify-content: center;
}

.card,
.crew-card {
    flex: 1;
    min-width: 250px;
    max-width: 320px;
    text-align: center;
    padding: 30px 20px;
    border-top: 3px solid var(--neon-cyan);
    transition: transform 0.4s;
}

.crew-card {
    border-top: 3px solid var(--neon-purple);
    padding: 25px 15px;
}

.card:hover,
.crew-card:hover {
    transform: translateY(-10px) scale(1.05);
}

.card-icon,
.avatar {
    font-size: 3.5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}

.crew-card .avatar {
    filter: drop-shadow(0 0 10px var(--neon-purple));
    font-size: 3rem;
}

.card h3 {
    color: var(--neon-cyan);
    margin-bottom: 10px;
}

.crew-card h3 {
    color: var(--neon-purple);
    margin-bottom: 5px;
    font-size: 1.25rem;
}

.crew-card .role {
    color: var(--neon-pink);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(0);
    }
}

.float-slow,
.float-medium {
    animation: none !important;
}

/* --- MAZE DOORS (Portals) & WARP ANIMATION --- */
.portals-container {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
    justify-content: center;
    perspective: 1000px;
}

.portal {
    width: 220px;
    height: 380px;
    border: 2px solid var(--neon-cyan);
    border-radius: 120px 120px 10px 10px;
    background: linear-gradient(180deg, rgba(0, 243, 255, 0.15) 0%, rgba(0, 0, 0, 0.9) 100%);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3), inset 0 0 20px rgba(0, 243, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    cursor: pointer;
    transition: 0.5s;
    position: relative;
    overflow: hidden;
}

.portal::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(181, 0, 255, 0.5) 0%, transparent 60%);
    opacity: 0;
    transition: 0.5s;
}

.portal:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 0 40px var(--neon-cyan), inset 0 0 30px var(--neon-cyan);
}

.portal:hover::after {
    opacity: 1;
}

.warp-in {
    animation: warpInAnim 1s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes warpInAnim {
    0% {
        opacity: 0;
        transform: scale(0.1) translateZ(-500px);
        filter: blur(20px);
    }

    50% {
        opacity: 0.8;
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateZ(0);
        filter: blur(0);
    }
}

/* --- GAMEPLAY SPLIT SCREEN --- */
.split-screen {
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 30px;
}

.left-panel,
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    box-sizing: border-box;
}

.left-panel {
    border-color: var(--neon-purple);
}

.left-panel h2 {
    color: var(--neon-pink);
    border-bottom: 2px solid rgba(255, 0, 234, 0.3);
    padding-bottom: 15px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.instruction {
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.hint-box {
    margin-top: 30px;
    padding: 20px;
    border: 1px dashed var(--neon-purple);
    border-radius: 8px;
    background: rgba(181, 0, 255, 0.1);
    color: #fff;
    line-height: 1.5;
    box-shadow: 0 0 15px rgba(181, 0, 255, 0.2);
    animation: fadeIn 0.5s;
}

.hint-box strong {
    color: var(--neon-purple);
    font-size: 1.1rem;
}

.hidden {
    display: none !important;
}

/* --- THE PYTHON IDE --- */
.ide-header {
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    /* border: 1px solid var(--neon-cyan); */
    border-bottom: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #888;
    display: flex;
    justify-content: flex-start;
}

.code-editor {
    width: 100%;
    flex-grow: 1;
    min-height: 250px;
    background: #0d0814;
    color: #00ff2a;
    border: 1px solid var(--neon-cyan);
    border-radius: 0 0 8px 8px;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    outline: none;
    resize: none;
    line-height: 1.6;
    box-sizing: border-box;
}

.actions {
    margin-top: 15px;
    text-align: right;
}

.console {
    margin-top: 25px;
    background: #000;
    padding: 15px;
    border-radius: 6px;
    font-family: var(--font-mono);
    border-left: 4px solid var(--neon-purple);
    color: var(--neon-green);
    min-height: 70px;
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}

/* --- RESPONSIVNESS --- */
@media (max-width: 900px) {
    .split-screen {
        flex-direction: column !important;
    }

    .portal {
        width: 150px;
        height: 250px;
        font-size: 1rem;
    }

    h1 {
        font-size: 2.2rem;
    }
}

/* --- ADMIN DASHBOARD --- */
.neon-input {
    background: rgba(0, 0, 0, 0.6);
    color: var(--neon-cyan);
    border: 2px solid var(--neon-purple);
    padding: 10px 15px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    box-shadow: inset 0 0 10px rgba(181, 0, 255, 0.2);
    min-width: 250px;
}

.neon-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: inset 0 0 15px rgba(0, 243, 255, 0.4);
}

.table-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px;
}

.neon-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 1.1em;
    font-family: 'Segoe UI', sans-serif;
    color: var(--text-white);
}

.neon-table thead tr {
    background-color: rgba(0, 243, 255, 0.1);
    color: var(--neon-cyan);
    text-align: left;
    border-bottom: 2px solid var(--neon-purple);
}

.neon-table th,
.neon-table td {
    padding: 15px 20px;
}

.neon-table tbody tr {
    border-bottom: 1px solid rgba(181, 0, 255, 0.2);
    transition: background-color 0.2s;
}

.neon-table tbody tr:hover {
    background-color: rgba(0, 243, 255, 0.05);
}

/* --- MAZE HUB MAP STYLES --- */
#map-hub-screen {
    position: relative;
    width: 100%;
    min-height: 80vh;
}

#map-container {
    position: relative;
    width: 100%;
    height: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image:
        linear-gradient(rgba(8, 37, 76, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 37, 76, 0.4) 1px, transparent 1px),
        linear-gradient(rgba(3, 11, 27, 0.8) 5px, transparent 5px),
        linear-gradient(90deg, rgba(3, 11, 27, 0.8) 5px, transparent 5px);
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
    border: 2px solid var(--neon-cyan);
    border-radius: 16px;
    box-shadow: inset 0 0 50px rgba(0, 243, 255, 0.1);
    margin-top: 30px;
    overflow: hidden;
}

.map-wrapper {
    position: relative;
    width: 800px;
    height: 800px;
    transform: scale(0.9);
}

.corridors {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.corridor-line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke 1s ease, filter 1s ease;
}

.corridor-line.unlocked {
    stroke: var(--neon-cyan);
    filter: drop-shadow(0 0 8px var(--neon-cyan));
    animation: pulseCorridor 2s infinite alternate;
}

@keyframes pulseCorridor {
    0% {
        filter: drop-shadow(0 0 5px var(--neon-cyan));
    }

    100% {
        filter: drop-shadow(0 0 15px var(--neon-cyan));
    }
}

.room {
    position: absolute;
    width: 110px;
    height: 110px;
    background: rgba(10, 20, 40, 0.9);
    border: 3px solid rgba(16, 48, 96, 0.8);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    opacity: 0.5;
    pointer-events: none;
}

.room.unlocked {
    opacity: 1;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan), inset 0 0 15px rgba(0, 243, 255, 0.2);
    pointer-events: auto;
}

.room.unlocked:hover {
    transform: translate(-50%, -50%) scale(1.1);
    border-color: var(--neon-purple);
    box-shadow: 0 0 30px var(--neon-purple), inset 0 0 20px rgba(181, 0, 255, 0.4);
}

.room.completed {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px var(--neon-green);
}

.room-name {
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px var(--neon-cyan);
    pointer-events: none;
    text-transform: uppercase;
}

.room-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
    pointer-events: none;
}

#astronaut {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 10;
    transform: translate(-50%, -50%);
    transition: top 2s cubic-bezier(0.42, 0, 0.05, 1), left 2s cubic-bezier(0.42, 0, 0.05, 1);
    pointer-events: none;
}

.astronaut-sprite {
    width: 100%;
    height: 100%;
    animation: floatZeroG 3s infinite ease-in-out alternate;
}

.astronaut-body {
    width: 30px;
    height: 38px;
    background-color: white;
    border-radius: 15px 15px 10px 10px;
    position: relative;
    box-shadow: inset -4px -4px 0px rgba(200, 200, 200, 0.5), 0 0 10px var(--neon-cyan);
    margin: 0 auto;
}

.astronaut-visor {
    position: absolute;
    top: 8px;
    left: 4px;
    width: 22px;
    height: 12px;
    background-color: var(--neon-cyan);
    border-radius: 6px;
    box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.7), inset -2px -2px 5px rgba(0, 100, 200, 0.8);
}

.astronaut-backpack {
    position: absolute;
    top: 10px;
    left: -6px;
    width: 8px;
    height: 20px;
    background-color: #ddd;
    border-radius: 4px;
    z-index: -1;
}

@keyframes floatZeroG {
    0% {
        transform: translateY(-5px) rotate(-3deg);
    }

    100% {
        transform: translateY(5px) rotate(3deg);
    }
}

#fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: black;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.fade-out {
    opacity: 1 !important;
}

.hub-title {
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--neon-cyan);
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0;
}

.hub-subtitle {
    color: var(--neon-purple);
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--neon-purple);
    margin: 10px 0;
}

.status-panel {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--neon-purple);
    padding: 10px 25px;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    box-shadow: 0 0 15px rgba(181, 0, 255, 0.3);
    z-index: 5;
    margin-top: 10px;
    display: flex;
    gap: 30px;
}

.status-panel span {
    color: var(--neon-green);
    font-weight: bold;
}

/* --- MODAL POPUP FOR DOORS OVER THE MAP --- */
.maze-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.maze-modal.active-modal {
    opacity: 1;
    pointer-events: auto;
}

/* --- WRONG DOOR PENALTY STYLES --- */
.disabled-portal {
    opacity: 0.3 !important;
    filter: grayscale(100%);
    pointer-events: none !important;
    box-shadow: none !important;
    border-color: #555 !important;
    cursor: not-allowed;
}

.shake-animation {
    animation: manualShake 0.4s infinite;
}

@keyframes manualShake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

/* ==========================================================
   LOGIN OVERLAY & UNLOCK SYSTEM
   ========================================================== */

/* Full-screen overlay that sits over the locked map */
#login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: rgba(7, 3, 20, 0.72);
    backdrop-filter: blur(6px);
    opacity: 1;
    transition: opacity 0.65s ease;
    padding: 140px 20px 20px 20px;
    box-sizing: border-box;
}

/* Faded-out state (triggered by JS before display:none) */
#login-overlay.hidden-overlay {
    opacity: 0;
    pointer-events: none;
}

/* The glass card inside the overlay */
.login-panel {
    max-width: 640px;
    width: 100%;
    text-align: center;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
}

/* Locked map: dims the map container and disables all interaction */
#map-hub-screen.map-locked #map-container {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(55%) blur(1px);
    transition: opacity 0.8s ease, filter 0.8s ease;
}

#map-hub-screen.map-locked .status-panel,
#map-hub-screen.map-locked>.neon-btn {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

/* UN-locked map ( transitions back to full clarity ) */
#map-hub-screen:not(.map-locked) #map-container {
    opacity: 1;
    filter: none;
    transition: opacity 0.8s ease, filter 0.8s ease;
}

/* Welcome badge shown below the subtitle after login */
.welcome-badge {
    display: none;
    background: rgba(0, 20, 8, 0.85);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 7px 22px;
    border-radius: 30px;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-shadow: 0 0 8px var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 42, 0.3);
    margin-bottom: 6px;
    animation: fadeIn 0.5s ease-out;
}

/* ==========================================================
   CINEMATIC SPACE WARP TRANSITION
   ========================================================== */

/* Phase 1 — Login panel zooms & blurs into hyperspace */
@keyframes spaceWarpOut {
    0% {
        transform: scale(1);
        filter: blur(0px);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        filter: blur(18px);
        opacity: 0.7;
    }

    100% {
        transform: scale(2.8);
        filter: blur(50px);
        opacity: 0;
    }
}

.warp-out-anim {
    animation: spaceWarpOut 0.75s cubic-bezier(0.4, 0, 1, 1) forwards !important;
    pointer-events: none !important;
}

/* The overlay itself also zooms in during warp */
.warp-overlay-zoom {
    animation: spaceWarpOut 0.75s cubic-bezier(0.4, 0, 1, 1) forwards !important;
    pointer-events: none !important;
}

/* Phase 2 — Full-screen white/cyan radial flash */
#warp-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 998;
    /* below #fade-overlay (999) but above everything else */
    background: radial-gradient(circle at center,
            #ffffff 0%,
            #00f3ff 30%,
            rgba(0, 243, 255, 0.4) 60%,
            transparent 100%);
    opacity: 0;
    pointer-events: none;
}

@keyframes warpFlash {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    35% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

.warp-flash-anim {
    animation: warpFlash 1.1s ease-out forwards;
}

/* Phase 3 — Map Hub zooms in from the void after the flash */
@keyframes hubZoomIn {
    0% {
        transform: scale(0.88);
        opacity: 0;
        filter: blur(12px) brightness(2);
    }

    60% {
        filter: blur(2px) brightness(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
        filter: none;
    }
}

.hub-zoom-in {
    animation: hubZoomIn 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

/* ==========================================================
   SITE FOOTER
   ========================================================== */

.site-footer {
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, rgba(5, 2, 15, 0) 0%, rgba(5, 2, 15, 0.97) 8%);
    border-top: 1px solid rgba(0, 243, 255, 0.25);
    margin-top: 60px;
    padding: 60px 40px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---- 4-column grid ---- */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- Generic column ---- */
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---- Brand logo ---- */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    text-decoration: none;
}

.footer-logo .logo-img {
    height: 50px;
}

.footer-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-about {
    color: rgba(224, 234, 255, 0.65);
    font-size: 0.92rem;
    line-height: 1.75;
    margin: 0;
    max-width: 340px;
}

/* ---- Section headings ---- */
.footer-heading {
    color: var(--neon-purple);
    text-shadow: 0 0 8px var(--neon-purple);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin: 0 0 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(181, 0, 255, 0.3);
}

/* ---- Quick-links list ---- */
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(224, 234, 255, 0.7);
    text-decoration: none;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: color 0.25s, text-shadow 0.25s, transform 0.25s;
}

.footer-links a i {
    width: 14px;
    color: var(--neon-cyan);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.footer-links a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
    transform: translateX(4px);
}

/* ---- Contact list ---- */
.footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    color: rgba(224, 234, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.55;
}

.footer-contact li i {
    color: var(--neon-cyan);
    margin-top: 3px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.footer-contact a {
    color: rgba(224, 234, 255, 0.7);
    text-decoration: none;
    transition: color 0.25s, text-shadow 0.25s;
}

.footer-contact a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
}

/* ---- Social icons ---- */
.footer-social-col {
    align-items: flex-start;
}

.footer-socials {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(0, 243, 255, 0.35);
    background: rgba(0, 243, 255, 0.06);
    color: rgba(224, 234, 255, 0.7);
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.3s, border-color 0.3s, color 0.3s,
        box-shadow 0.3s, transform 0.3s;
}

.social-icon:hover {
    background: rgba(0, 243, 255, 0.18);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.45);
    transform: translateY(-4px) scale(1.1);
}

.footer-social-tagline {
    color: rgba(224, 234, 255, 0.4);
    font-size: 0.8rem;
    font-style: italic;
    margin: 6px 0 0;
    letter-spacing: 0.5px;
}

/* ---- Bottom bar ---- */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1200px;
    margin: 48px auto 0;
    padding: 20px 0 28px;
    border-top: 1px solid rgba(181, 0, 255, 0.2);
}

.footer-copy {
    margin: 0;
    color: rgba(224, 234, 255, 0.4);
    font-size: 0.82rem;
    letter-spacing: 0.3px;
}

/* Outline "Admin Login" button */
.admin-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border: 1.5px solid rgba(181, 0, 255, 0.6);
    border-radius: 6px;
    background: transparent;
    color: rgba(181, 0, 255, 0.85);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s, background 0.3s,
        box-shadow 0.3s, transform 0.3s;
}

.admin-login-btn i {
    font-size: 0.78rem;
}

.admin-login-btn:hover {
    border-color: var(--neon-purple);
    color: #fff;
    background: rgba(181, 0, 255, 0.2);
    box-shadow: 0 0 18px rgba(181, 0, 255, 0.5);
    transform: translateY(-2px);
}

/* ---- Responsive footer ---- */
@media (max-width: 960px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-about {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    .site-footer {
        padding: 40px 20px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---- Language Switcher ---- */
.lang-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 15px;
}

.lang-btn {
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--glass-border);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 5px var(--neon-cyan);
}

.lang-btn.active {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}