/* 1. CORE VARIABLES & RESET */
:root {
    --bg-dark: #020617;
    --panel-glass: rgba(15, 23, 42, 0.8);
    --neon-cyan: #00f2ff;
    --neon-purple: #bc13fe;
    --text-main: #f8fafc;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    /* Digital Grid Background */
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    font-family: 'Inter', 'Orbitron', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 2. THE HEADER SECTION */
.main-header {
    width: 100%;
    padding: 40px 0;
    text-align: center;
    background: linear-gradient(to bottom, rgba(0,242,255,0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
}

.glitch-text {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    animation: glitch-anim 500ms infinite;
}

.tagline {
    letter-spacing: 5px;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 10px;
}

.status-bar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid var(--neon-cyan);
    margin-top: 15px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-cyan);
    animation: pulse-anim 1.5s infinite;
}

.status-text {
    font-size: 0.7rem;
    letter-spacing: 1px;
    font-family: monospace;
}

/* 3. THE PORTAL WRAPPER (SPLIT SCREEN) */
.gate-wrapper {
    display: flex;
    height: 60vh;
    width: 100%;
    margin-top: 20px;
}

.portal {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.2, 1, 0.3, 1);
    border-left: 1px solid rgba(0, 242, 255, 0.1);
    border-right: 1px solid rgba(0, 242, 255, 0.1);
    background: rgba(15, 23, 42, 0.3);
    cursor: pointer;
}

.portal:hover {
    flex: 1.5;
    background: rgba(0, 242, 255, 0.05);
    border-color: var(--neon-cyan);
    box-shadow: inset 0 0 50px rgba(0, 242, 255, 0.1);
}

.portal-inner {
    text-align: center;
    z-index: 2;
    padding: 20px;
}

.portal-label {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--neon-cyan);
    letter-spacing: 3px;
    opacity: 0.6;
}

.portal-title {
    font-size: 3rem;
    margin: 15px 0;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.portal-hint {
    font-size: 0.9rem;
    opacity: 0.5;
    margin-bottom: 30px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

/* 4. BUTTONS & UI */
.neon-btn {
    padding: 15px 40px;
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.neon-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 30px var(--neon-cyan);
    transform: translateY(-3px);
}

.full-width {
    width: 100%;
}

/* 5. OVERLAYS & FORMS */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.login-card {
    background: var(--panel-glass);
    border: 2px solid var(--neon-cyan);
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.2);
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.7rem;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: white;
    border-radius: 5px;
    outline: none;
}

.input-group input:focus {
    border-color: var(--neon-cyan);
    background: rgba(0, 242, 255, 0.1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--neon-cyan);
    font-size: 2rem;
    cursor: pointer;
}

/* 6. LIVE TICKER FOOTER */
.city-ticker {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid var(--neon-cyan);
    padding: 12px 0;
    white-space: nowrap;
    overflow: hidden;
    z-index: 10;
}

.ticker-wrap {
    display: inline-block;
    animation: scroll-anim 40s linear infinite;
}

.ticker-item {
    display: inline-block;
    padding: 0 50px;
    font-family: monospace;
    color: var(--neon-cyan);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* 7. ANIMATIONS */
@keyframes glitch-anim {
    0% { text-shadow: 0.05em 0 0 #ff0050, -0.05em -0.025em 0 #00ff00; }
    15% { text-shadow: -0.05em -0.025em 0 #ff0050, 0.025em 0.025em 0 #00ff00; }
    50% { text-shadow: 0.025em 0.05em 0 #ff0050, 0.05em 0 0 #00ff00; }
    100% { text-shadow: -0.025em 0 0 #ff0050, -0.025em -0.025em 0 #00ff00; }
}

@keyframes pulse-anim {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes scroll-anim {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

/* Scanner effect for portals */
.portal-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
    opacity: 0;
    pointer-events: none;
}

.portal:hover .portal-scanner {
    animation: scan-anim 2s linear infinite;
    opacity: 0.5;
}

@keyframes scan-anim {
    0% { top: 0%; }
    100% { top: 100%; }
}