/* Premium Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-dark: #09090b;
    --text-main: #f8fafc;
    --text-muted: #71717a;
    --glass-bg: rgba(20, 20, 25, 0.7);
    --glass-border: rgba(255, 255, 255, 0.07);
    --error-color: #f43f5e;
    --success-color: #10b981;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* Animated Background */
.bg-animated {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    overflow: hidden; z-index: -1;
}
.bg-shape {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    animation: float 20s infinite alternate ease-in-out;
    opacity: 0.45;
}
.shape-1 { width: 600px; height: 600px; background: radial-gradient(circle, #4f46e5 0%, transparent 70%); top: -200px; left: -200px; }
.shape-2 { width: 500px; height: 500px; background: radial-gradient(circle, #a855f7 0%, transparent 70%); bottom: -150px; right: -100px; animation-delay: -5s; }
.shape-3 { width: 350px; height: 350px; background: radial-gradient(circle, #06b6d4 0%, transparent 70%); top: 30%; left: 40%; opacity: 0.25; animation-delay: -10s; }

@keyframes float {
    0% { transform: translate(0,0) scale(1); }
    33% { transform: translate(30px,-50px) scale(1.1); }
    66% { transform: translate(-20px,20px) scale(0.9); }
    100% { transform: translate(0,0) scale(1); }
}

/* Flag */
.flag-icon { width: 22px; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* Language Dropdown */
.language-dropdown { position: absolute; top: 28px; right: 36px; z-index: 100; }
.lang-toggle {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 16px; border-radius: 12px;
    cursor: pointer; font-weight: 500; font-size: 0.95rem;
    display: flex; align-items: center; gap: 8px;
    backdrop-filter: blur(12px); transition: all 0.3s;
}
.lang-toggle:hover { background: rgba(255,255,255,0.05); border-color: rgba(168,85,247,0.5); }
.lang-toggle .chevron { transition: transform 0.3s; }
.language-dropdown.open .chevron { transform: rotate(180deg); }

.lang-menu {
    position: absolute; top: 110%; right: 0;
    background: rgba(15,15,20,0.95); backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border); border-radius: 14px;
    list-style: none; min-width: 145px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all 0.3s; box-shadow: 0 12px 30px rgba(0,0,0,0.5); overflow: hidden;
}
.language-dropdown.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li {
    padding: 12px 16px; font-size: 0.92rem; cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    color: var(--text-muted); transition: all 0.2s;
}
.lang-menu li:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }

/* Layout */
.split-container { display: flex; min-height: 100vh; width: 100%; }

.info-side {
    flex: 1.2; display: flex; align-items: center;
    justify-content: center; padding: 40px 70px;
}
.info-content { max-width: 520px; width: 100%; }
.glass-card {
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 28px; padding: 48px;
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}
.logo-wrapper { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.logo-icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.05);
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.info-content h1 {
    font-size: 3.2rem; font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; letter-spacing: -1px;
}
.info-content p {
    font-size: 1.1rem; color: var(--text-muted);
    line-height: 1.7; margin-bottom: 36px; font-weight: 300;
}
.features { display: flex; flex-direction: column; gap: 14px; }
.feature-item {
    display: flex; align-items: center; gap: 14px;
    font-size: 1.05rem; font-weight: 500;
    background: rgba(255,255,255,0.02);
    padding: 16px 22px; border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.icon-box { color: #a855f7; display: flex; align-items: center; }
.feature-item:hover { transform: translateX(10px) scale(1.02); background: rgba(255,255,255,0.05); border-color: rgba(168,85,247,0.3); }

/* Animations */
.fade-in-up { animation: fadeInUp 0.8s ease forwards; opacity: 0; transform: translateY(20px); }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* Right Side */
.login-side {
    flex: 1; display: flex; align-items: center;
    justify-content: center; padding: 40px;
    max-height: 100vh; overflow-y: auto;
}
.login-side::-webkit-scrollbar { width: 5px; }
.login-side::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }

/* Login Card */
.premium-glass {
    background: rgba(14, 14, 18, 0.75);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 32px;
    padding: 44px 40px;
    width: 100%; max-width: 440px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
    position: relative; overflow: hidden; margin: auto 0;
}
.premium-glass::before {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.025), transparent);
    transform: skewX(-20deg);
    animation: shine 8s infinite;
}
@keyframes shine { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

.login-header { text-align: center; margin-bottom: 32px; }
.login-header h2 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.5px; }
.login-header p { color: var(--text-muted); font-size: 0.9rem; }

/* Input Containers */
.input-container { position: relative; margin-bottom: 20px; }
.input-container input {
    width: 100%; padding: 20px 20px 14px;
    background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px; color: white; font-size: 1rem;
    outline: none; transition: all 0.3s; font-weight: 500;
}
.input-container label {
    position: absolute; top: 50%; left: 20px;
    transform: translateY(-50%); color: var(--text-muted);
    font-size: 0.92rem; pointer-events: none;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.input-container input:focus,
.input-container input:not(:placeholder-shown) {
    background: rgba(0,0,0,0.5); border-color: rgba(168,85,247,0.5);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.1);
}
.input-container input:focus + label,
.input-container input:not(:placeholder-shown) + label {
    top: 0px; transform: translateY(-50%); font-size: 0.72rem;
    color: #a855f7; font-weight: 600;
    background: #0f0f13; padding: 0 5px; border-radius: 4px;
}

/* Phone Input */
.phone-input-container {
    display: flex; background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px; transition: all 0.3s; margin-bottom: 20px;
}
.phone-input-container:focus-within {
    background: rgba(0,0,0,0.5); border-color: rgba(168,85,247,0.5);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.1);
}
.phone-prefix {
    display: flex; align-items: center; gap: 7px;
    padding: 0 14px; border-right: 1px solid rgba(255,255,255,0.07);
    color: var(--text-main); font-weight: 600; font-size: 1.05rem;
    background: rgba(255,255,255,0.02); border-radius: 14px 0 0 14px;
    white-space: nowrap;
}
.input-wrapper { position: relative; flex: 1; }
.input-wrapper input {
    width: 100%; padding: 22px 16px 10px;
    background: transparent; border: none; color: white;
    font-size: 1.05rem; outline: none; font-weight: 500; letter-spacing: 1.5px;
}
.input-wrapper label {
    position: absolute; top: 50%; left: 16px;
    transform: translateY(-50%); color: var(--text-muted);
    font-size: 0.88rem; pointer-events: none;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label {
    top: 10px; font-size: 0.7rem; color: #a855f7; font-weight: 600;
}

/* Phone Locked State */
.phone-input-container.locked {
    opacity: 0.65;
    border-color: rgba(168,85,247,0.2);
}

/* PIN Code Section */
.password-step { margin-top: 8px; }
.pin-box-area { margin-top: 4px; }
.pin-label {
    display: block; color: #a855f7;
    font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    margin-bottom: 10px; padding-left: 2px;
    position: static !important;
    transform: none !important;
    background: transparent !important;
}
.pin-code-wrapper {
    display: flex; gap: 10px; align-items: center;
}
.pin-input {
    flex: 1; min-width: 0;
    height: 60px;
    background: rgba(0,0,0,0.4);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 14px; color: white;
    text-align: center; font-size: 1.6rem;
    font-weight: 700; outline: none;
    transition: all 0.25s ease; caret-color: #a855f7;
}
.pin-input:focus {
    border-color: #a855f7;
    background: rgba(99,102,241,0.1);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.15), 0 4px 20px rgba(168,85,247,0.15);
    transform: translateY(-3px) scale(1.05);
}
.pin-input.filled {
    border-color: rgba(168,85,247,0.4);
    background: rgba(99,102,241,0.08);
}
.pin-eye {
    position: relative !important; right: auto !important;
    top: auto !important; transform: none !important;
    background: none; border: 1.5px solid rgba(255,255,255,0.1);
    color: var(--text-muted); cursor: pointer;
    padding: 0; width: 44px; height: 60px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; transition: all 0.3s;
}
.pin-eye:hover { color: var(--text-main); border-color: rgba(168,85,247,0.4); background: rgba(168,85,247,0.08); }

/* Separator between phone and PIN */
.step-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0 18px;
}
.step-divider::before, .step-divider::after {
    content: ''; flex: 1; height: 1px;
    background: rgba(255,255,255,0.07);
}
.step-divider span {
    font-size: 0.75rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap;
}

/* Buttons */
.btn-gradient {
    width: 100%; padding: 16px;
    background: var(--primary-gradient); color: white;
    border: none; border-radius: 14px; font-size: 1.05rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    gap: 10px; transition: all 0.3s;
    box-shadow: 0 8px 30px rgba(99,102,241,0.3); margin-top: 24px;
    position: relative; overflow: hidden;
}
.btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 14px 35px rgba(99,102,241,0.45); }
.btn-gradient:active { transform: translateY(0); }
.btn-gradient:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-icon { transition: transform 0.3s; }
.btn-gradient:hover .btn-icon { transform: translateX(4px); }

.btn-outline {
    width: 100%; padding: 14px;
    background: transparent; color: var(--text-main);
    border: 1.5px solid rgba(168,85,247,0.3); border-radius: 14px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.3s; margin-top: 12px;
}
.btn-outline:hover { background: rgba(168,85,247,0.1); border-color: #a855f7; }

.toggle-password {
    position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    padding: 5px; display: flex; align-items: center; transition: color 0.3s;
}
.toggle-password:hover { color: var(--text-main); }

/* Messages */
.message-box {
    padding: 14px 16px; border-radius: 12px; margin-top: 16px;
    font-size: 0.9rem; font-weight: 500;
    display: flex; align-items: center; gap: 10px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.message-box.error { background: rgba(244,63,94,0.1); color: var(--error-color); border: 1px solid rgba(244,63,94,0.2); }
.message-box.success { background: rgba(16,185,129,0.1); color: var(--success-color); border: 1px solid rgba(16,185,129,0.2); }

/* Footer */
.footer-text, .form-switch-text {
    margin-top: 28px; text-align: center; font-size: 0.9rem; color: var(--text-muted);
}
.footer-text a, .form-switch-text a {
    color: #c084fc; text-decoration: none; font-weight: 600; transition: color 0.3s;
}
.footer-text a:hover, .form-switch-text a:hover { color: #f8fafc; text-decoration: underline; }

/* Responsive – Mobile: hide left info side entirely */
@media (max-width: 1024px) {
    .info-side { display: none !important; }
    .split-container { justify-content: center; align-items: center; }
    .login-side { padding: 24px 16px; width: 100%; max-width: 480px; margin: 0 auto; }
    .premium-glass { padding: 36px 24px; }
    .language-dropdown { top: 18px; right: 18px; }
    .pin-input { height: 52px; font-size: 1.4rem; }
}

/* OTP pin inputs (same as login PIN but text type for visibility) */
.otp-pin-input {
    flex: 1; min-width: 0; height: 60px;
    background: rgba(0,0,0,0.4);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 14px; color: white;
    text-align: center; font-size: 1.6rem; font-weight: 700;
    outline: none; transition: all 0.25s ease; caret-color: #a855f7;
}
.otp-pin-input:focus {
    border-color: #a855f7;
    background: rgba(99,102,241,0.1);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.15), 0 4px 20px rgba(168,85,247,0.15);
    transform: translateY(-3px) scale(1.05);
}

/* Resend button */
.resend-btn {
    background: none; border: none; color: #a855f7;
    font-weight: 600; cursor: pointer; font-size: 0.88rem;
    transition: color 0.3s; text-decoration: underline;
}
.resend-btn:hover { color: #c084fc; }
.resend-btn:disabled { color: var(--text-muted); cursor: default; text-decoration: none; }


/* Custom Checkbox */
.offer-container {
    margin-top: 10px;
}
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}
.checkbox-wrapper input {
    display: none;
}
.checkbox-custom {
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.4);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
    margin-top: 2px;
}
.checkbox-wrapper input:checked + .checkbox-custom {
    background: var(--primary-gradient);
    border-color: transparent;
}
.checkbox-custom::after {
    content: "";
    position: absolute;
    left: 6px; top: 2px;
    width: 5px; height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s;
}
.checkbox-wrapper input:checked + .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}
.offer-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.offer-text a {
    color: #a855f7;
    text-decoration: underline;
    font-weight: 600;
}

/* Modal */
.modal-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
}
.modal-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 10;
    animation: modalFadeIn 0.3s ease-out;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover {
    color: var(--text-main);
}
.modal-body {
    padding: 30px;
    overflow-y: auto;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}
.modal-body p {
    margin-bottom: 15px;
}
.modal-footer {
    padding: 20px 30px 30px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
