:root {
    --bg-body: #000000; 
    --bg-card: #1D0B47; 
    --text-main: #FFFFFF;
    --text-muted: #DDDDDD;
    --cyan-main: #3DF3FF; 
    --orange-link: #E65C00; 
    --border-subtle: 1px solid transparent;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    font-family: 'Inter', sans-serif; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 30px 20px; 
    -webkit-tap-highlight-color: transparent;
}

.app-container { 
    width: 100%; 
    max-width: 440px; 
    display: flex;
    flex-direction: column;
    z-index: 2;
    opacity: 0; 
    transition: opacity 0.3s;
    margin-top: 40px;
}
.app-container.register-mode { margin-top: 10px; }

.header-wrap { margin-bottom: 40px; padding-left: 5px; display: flex; flex-direction: column; }
.register-mode .header-wrap { margin-bottom: 30px; }
.welcome-text, .login-text { font-size: 32px; font-weight: 800; color: var(--text-main); line-height: 1.2; }

.input-group { position: relative; margin-bottom: 20px; width: 100%; }
.register-mode .input-group { margin-bottom: 15px; }

.form-control { 
    width: 100%; background: var(--bg-card); border: var(--border-subtle); 
    padding: 16px 20px; color: var(--text-main); font-size: 16px; font-weight: 500;
    outline: none; transition: border 0.3s, box-shadow 0.3s; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
/* Pill shape for inputs, slightly rounded rectangle for button */
.form-control { border-radius: 25px; }
.login-mode .form-control { border-radius: 25px; }
.login-mode .btn-login { border-radius: 6px; }
.register-mode .form-control { border-radius: 25px; }
.register-mode .btn-login { border-radius: 6px; padding: 18px; }

.form-control::placeholder { color: var(--text-muted); font-weight: 400; }
.form-control:focus { border-color: var(--cyan-main); }

.pwd-toggle {
    position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    color: var(--text-main); font-size: 16px; font-weight: 500; cursor: pointer;
    user-select: none; transition: opacity 0.2s;
}
.register-mode .pwd-toggle { color: var(--cyan-main); }
.pwd-toggle:active { opacity: 0.7; }

.phone-group { display: flex; gap: 12px; margin-bottom: 15px; width: 100%; }
.country-code {
    background: var(--bg-card); border: var(--border-subtle); border-radius: 25px;
    padding: 0 15px; display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 500; color: var(--text-main); flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.country-code img { width: 22px; border-radius: 2px; }
.phone-input { margin-bottom: 0; flex: 1; }

.form-control.promo-input { padding-right: 90px; }
.apply-btn {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: var(--orange-link); color: #FFFFFF; border: none; 
    padding: 8px 15px; border-radius: 20px; font-weight: 700; font-size: 14px; 
    cursor: pointer; text-transform: uppercase; transition: 0.2s;
}
.apply-btn:active { transform: translateY(-50%) scale(0.95); }
.apply-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.apply-btn.success-state { background: #22C55E; color: white; }
.msg-box { font-size: 13px; margin-top: -5px; margin-bottom: 15px; display: none; font-weight: 600; padding-left: 10px; }

.forgot-link { text-align: right; margin-bottom: 25px; padding-right: 15px; }
.forgot-link a { color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: opacity 0.2s;}
.forgot-link a:active { opacity: 0.7; }

.agreement-text { font-size: 14px; color: var(--text-main); text-align: center; margin-top: 15px; margin-bottom: 25px; line-height: 1.6; }
.agreement-text b, .agreement-text strong { font-weight: 800; color: #FFFFFF; }
.agreement-text a { color: #FFFFFF; text-decoration: none; font-weight: 800; transition: color 0.2s; }
.agreement-text a:active { color: var(--cyan-main); }

.btn-login { 
    width: 100%; background: var(--cyan-main); color: #FFFFFF; border: none; 
    padding: 16px; font-weight: 700; cursor: pointer; font-size: 18px; 
    transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 15px rgba(61, 243, 255, 0.2);
    text-transform: uppercase; 
}
.btn-login:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(61, 243, 255, 0.2); }
.btn-login:disabled { opacity: 0.7; cursor: not-allowed; }

.signup-link { text-align: center; margin-top: 40px; font-size: 16px; color: var(--text-main); font-weight: 400; }
.register-mode .signup-link { margin-top: 30px; color: var(--text-main); }
.signup-link a { color: var(--text-main); text-decoration: none; font-weight: 800; margin-left: 5px; transition: opacity 0.2s; }
.register-mode .signup-link a { color: var(--orange-link); text-transform: uppercase; }
.signup-link a:active { opacity: 0.7; }

.error-msg { background: rgba(239, 68, 68, 0.15); color: #EF4444; padding: 14px; border-radius: 12px; font-size: 14px; margin-bottom: 20px; text-align: center; border: 1px solid rgba(239, 68, 68, 0.3); font-weight: 600;}

/* SKELETON LOADER */
#skeleton-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-body); z-index: 9999; display: flex; flex-direction: column; align-items: center; padding: 30px 20px; transition: opacity 0.3s ease-out; }
.skel-container { width: 100%; max-width: 440px; margin-top: 40px; }
.skel-box { background: #2A1558; border-radius: 25px; overflow: hidden; position: relative; }
.skel-box::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; transform: translateX(-100%); background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 60%, rgba(255, 255, 255, 0)); animation: shimmer 1.5s infinite; }
.skel-title { width: 70%; height: 38px; margin-bottom: 10px; border-radius: 8px;}
.skel-subtitle { width: 40%; height: 38px; margin-bottom: 40px; border-radius: 8px;}
.skel-input { width: 100%; height: 55px; margin-bottom: 20px; }
.skel-btn { width: 100%; height: 55px; margin-top: 10px; border-radius: 6px;}

/* OVERLAYS */
.success-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-body); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1000; animation: fadeIn 0.3s ease-in-out; }
.checkmark-wrapper { width: 100px; height: 100px; background: #22C55E; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 30px rgba(34, 197, 94, 0.2); animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; }
.checkmark-svg { width: 60px; height: 60px; stroke: white; stroke-width: 5; fill: none; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: drawCheck 0.6s ease-in-out 0.4s forwards; }
.success-text { margin-top: 30px; font-size: 22px; font-weight: 800; color: var(--text-main); opacity: 0; transform: translateY(20px); animation: slideUp 0.5s ease-out 0.8s forwards; }
.redirect-text { margin-top: 10px; font-size: 14px; color: var(--text-muted); opacity: 0; animation: fadeIn 0.5s ease-out 1.2s forwards; }

/* BANNED MODAL */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(2px); display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; z-index: 9999; transition: 0.3s; }
.modal-overlay.show-banned { opacity: 1; visibility: visible; }
.modal-content { background: var(--bg-card); padding: 30px 20px; border-radius: 12px; text-align: center; border: 1px solid rgba(255,255,255,0.1); width: 85%; max-width: 320px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.modal-icon { font-size: 50px; color: #EF4444; margin-bottom: 20px; }

@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }