* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary-green: #2ecc71; 
    --dark-bg: #0a0a0a;
    --text-light: #ffffff;
}

/* ==========================================
   SPLASH SCREEN & GRID BACKGROUND
   ========================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0b111e; /* Exact color from your uploaded image */
    
    /* Subtle Grid Background Pattern */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    
    z-index: 99999; /* Stays on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    position: relative;
    /* Removed the animation line from here */
}

.splash-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    color: #888;
    letter-spacing: 3px;
    margin-bottom: -5px; /* Pulls it close to the main title */
    text-transform: uppercase;
}

.splash-title {
    font-family: 'Yatra One', system-ui, sans-serif !important;
    font-size: 64px;
    color: var(--primary-green);
    margin: 0;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
}

/* Backlight glow behind the text */
.splash-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 50px;
    background: var(--primary-green);
    filter: blur(60px);
    opacity: 0.3;
    z-index: 1;
}

body {
    background-color: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-light);
    overflow: hidden; 
}

/* Background Particles Container */
#tsparticles {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
    top: 0;
    left: 0;
}

/* --- TRUE GLASSMORPHISM CONTAINER (SCALED DOWN FOR MOBILE) --- */
.app-container {
    background: rgba(20, 20, 20, 0.35); 
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);

    transform: translateZ(0);
    will-change: transform, backdrop-filter;
    
    border: 1px solid rgba(255, 255, 255, 0.08); 
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(46, 204, 113, 0.05);
    width: 90%;
    max-width: 380px; 
    height: auto; 
    min-height: 480px; 
    padding: 35px 25px; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    position: relative;
    z-index: 2;
    border-radius: 25px;
    overflow-y: visible;
}
.app-container::-webkit-scrollbar { display: none; }

.header {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 5px;
    position: relative;

    contain: layout paint;
}

/* --- GLITCH TEXT STYLES --- */
.glitch-wrapper, .main-text, .glitch-layer {
    font-family: 'Yatra One', system-ui, sans-serif !important; 
}

.glitch-wrapper {
    position: relative;
    font-size: 38px; 
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.1;
    display: inline-block;
    color: var(--primary-green);
    
    /* REPLACE THIS: */
    /* filter: drop-shadow(0 0 15px rgba(46, 204, 113, 0.4)); */
    
    /* WITH THIS: */
    text-shadow: 0 0 15px rgba(46, 204, 113, 0.4);
    
    margin-bottom: 5px;
}

.glitch-wrapper::before {
    content: '';
    position: absolute;
    top: 0.16em;
    left: -2%;
    width: 104%;
    height: 0.06em;
    background: var(--primary-green);
    z-index: 3;
    box-shadow: 0 0 10px var(--primary-green);
}

.main-text { position: relative; z-index: 2; color: var(--primary-green); }
.glitch-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; }
/* Update your existing layer classes */
.layer-red, .layer-blue {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    opacity: 0; 
    /* Force GPU acceleration for these specific layers */
    transform: translateZ(0);
    will-change: transform, opacity;
}

/* 
  The JS will add this class once the decoding is done.
  This handles the random "subtle glitch" popping in and out.
*/
.layer-red.css-glitch-active {
    animation: pure-glitch-red 3s infinite linear alternate-reverse;
}
.layer-blue.css-glitch-active {
    animation: pure-glitch-blue 2.5s infinite linear alternate-reverse;
}

/* The Keyframes simulate the random JS math we removed */
@keyframes pure-glitch-red {
    0%, 90%, 100% { transform: translate(0, 0); opacity: 0; }
    92% { transform: translate(-3px, 1px); opacity: 0.8; }
    94% { transform: translate(2px, -2px); opacity: 0.8; }
    96% { transform: translate(-1px, 0px); opacity: 0; }
}

@keyframes pure-glitch-blue {
    0%, 85%, 100% { transform: translate(0, 0); opacity: 0; }
    87% { transform: translate(3px, -1px); opacity: 0.8; }
    89% { transform: translate(-2px, 2px); opacity: 0.8; }
    91% { transform: translate(1px, 0px); opacity: 0; }
}

.subtitle {
    color: #fff;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 10px;
    opacity: 0.8;
}

.panel {
    display: none;
    flex-direction: column;
    width: 100%;
}

.panel.active { display: flex; animation: fadeIn 0.4s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- ALIGNED TO THE LEFT --- */
.panel-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px; 
    margin-bottom: 20px;
    color: var(--primary-green);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: left;
}

/* Modern Dark Inputs */
.input-field {
    width: 100%;
    padding: 12px 18px; 
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 13px; 
    outline: none;
    transition: 0.3s;
    -webkit-appearance: none;
}
.input-field::placeholder { color: #888; }
.input-field:hover { border-color: rgba(46, 204, 113, 0.5); }
.input-field:focus { border-color: var(--primary-green); background: rgba(46, 204, 113, 0.05); box-shadow: 0 0 15px rgba(46,204,113,0.2); }

/* --- CUSTOM THEMED DROPDOWNS --- */
.custom-select-wrapper { position: relative; width: 100%; margin-bottom: 15px; user-select: none; }

.custom-select-trigger {
    width: 100%; 
    padding: 12px 18px; 
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 12px;
    color: white; font-size: 13px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.3s;
}

.custom-select-trigger:hover, .custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary-green); background: rgba(46, 204, 113, 0.05);
    box-shadow: 0 0 15px rgba(46,204,113,0.2);
}

.custom-options {
    position: absolute; top: 100%; left: 0; right: 0; background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(15px); border: 1px solid var(--primary-green); border-radius: 12px;
    margin-top: 5px; z-index: 999; display: none; max-height: 200px; overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6); text-align: center;
}

.custom-select-wrapper.open .custom-options { display: block; animation: dropFade 0.2s ease forwards; }
@keyframes dropFade { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.custom-option { padding: 12px; color: white; font-size: 13px; cursor: pointer; transition: 0.2s; border-bottom: 1px solid rgba(255,255,255,0.05); }
.custom-option:last-child { border-bottom: none; }
.custom-option:hover { background: var(--primary-green); color: black; font-weight: bold; }
.custom-option.disabled { color: #555; cursor: not-allowed; background: transparent !important; font-weight: normal; }

.password-container { position: relative; width: 100%; }
.toggle-password {
    position: absolute;
    right: 18px;
    top: 13px; 
    cursor: pointer;
    color: #888;
    transition: 0.2s;
    user-select: none;
    font-size: 15px; 
}
.toggle-password:hover { color: var(--primary-green); }

/* Glow Button */
.primary-btn {
    width: 100%;
    padding: 13px; 
    background: var(--primary-green);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 15px; 
    font-weight: bold;
    cursor: pointer;
    margin-top: 5px;
    transition: 0.3s;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.3);
}
.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(46, 204, 113, 0.6);
}
.primary-btn:disabled {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    cursor: not-allowed;
    color: #666;
}

.text-link {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: 0.2s;
}
.text-link:hover { text-shadow: 0 0 10px var(--primary-green); }

.forgot-pass { align-self: flex-start; margin-bottom: 20px; margin-left: 5px; }

.switch-panel-text {
    text-align: center;
    font-size: 12px;
    margin-top: 30px;
    color: #888;
    line-height: 1.8;
}

.feedback-text { font-size: 11px; color: #ff4757; margin-bottom: 10px; text-align: center; }

.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--primary-green);
    color: #000;
    font-weight: bold;
    text-align: center;
    border-radius: 12px;
    padding: 12px;
    position: absolute;
    z-index: 1000;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 3.5s;
}

@keyframes fadein { from { bottom: 0; opacity: 0; } to { bottom: 30px; opacity: 1; } }
@keyframes fadeout { from { bottom: 30px; opacity: 1; } to { bottom: 0; opacity: 0; } }

/* --- FIX: BROWSER AUTOFILL WHITE BACKGROUND --- */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #141414 inset !important;
    -webkit-text-fill-color: white !important;
    caret-color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: background-color 5000s ease-in-out 0s;
}