:root {
    --primary-color: #00f0ff;
    --secondary-color: #7b2ff7;
    --accent-color: #00f0ff;
    --accent-hover: #00d4e0;
    --accent-text: #000000;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --bg-body: #0a0a1a;
    --card-bg: rgba(15, 15, 35, 0.6);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(0, 240, 255, 0.2);
    --error-color: #ff3366;
    --success-color: #00ff88;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --neon-glow: 0 0 20px rgba(0, 240, 255, 0.3), 0 0 40px rgba(0, 240, 255, 0.1);
    --neon-glow-strong: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 60px rgba(0, 240, 255, 0.2);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Animated gradient orbs */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(123, 47, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 240, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(255, 51, 102, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: orbFloat 15s ease-in-out infinite alternate;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, -5%) rotate(5deg); }
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--primary-color), 0 0 12px var(--primary-color);
    animation: particleFloat linear infinite;
    opacity: 0;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.auth-container {
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.8s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card {
    background: var(--card-bg);
    padding: 45px 40px;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

/* Animated border glow */
.auth-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 21px;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--primary-color),
        transparent,
        var(--secondary-color),
        transparent,
        var(--primary-color),
        transparent
    );
    z-index: -1;
    animation: borderRotate 4s linear infinite;
    opacity: 0.5;
}

@keyframes borderRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: var(--card-bg);
    z-index: -1;
    margin: 1px;
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-wrapper {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.logo-placeholder {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #000;
    box-shadow: var(--neon-glow);
    position: relative;
}

.logo-placeholder::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 19px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.5;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.alert-error {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: var(--error-color);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.1);
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--success-color);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

/* Form Groups */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: all 0.3s;
    pointer-events: none;
    font-size: 16px;
}

.input-group i.toggle-password {
    pointer-events: auto;
    right: 16px;
    left: auto !important;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
}

.input-group i.toggle-password:hover {
    color: var(--primary-color);
}

.input-group input {
    width: 100%;
    padding: 16px 18px 16px 50px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
    letter-spacing: 0.3px;
}

.input-group input:focus {
    border-color: var(--primary-color);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1), inset 0 0 20px rgba(0, 240, 255, 0.03);
}

.input-group input:focus ~ i,
.input-group input:focus + i {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 300;
}

.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-main);
    -webkit-box-shadow: 0 0 0px 1000px rgba(15, 15, 35, 0.9) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Error messages */
.error-msg {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 6px;
    display: block;
    padding-left: 4px;
}

/* Actions */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

.remember-me:hover {
    color: var(--text-main);
}

.remember-me input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--input-border);
    border-radius: 5px;
    background: var(--input-bg);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.remember-me input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.remember-me input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 12px;
    font-weight: 700;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--primary-color);
}

.forgot-link:hover::after {
    width: 100%;
}

/* Buttons */
.btn-auth {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: var(--neon-glow-strong);
}

.btn-auth:active {
    transform: translateY(0);
}

/* Footer links */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--primary-color);
}

.auth-footer a:hover::after {
    width: 100%;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.lang-switcher a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid transparent;
}

.lang-switcher a:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
    color: var(--text-main);
}

.lang-switcher a.active {
    background: rgba(0, 240, 255, 0.15);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.lang-switcher a img {
    border-radius: 2px;
    transition: opacity 0.3s;
}

.lang-switcher a:not(.active) img {
    opacity: 0.6;
}

/* Disclaimer */
.disclaimer-box {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    font-size: 11px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.3);
    text-align: justify;
}

.disclaimer-box strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 10px;
}

/* intl-tel-input overrides */
.iti {
    width: 100%;
}

.iti__country-list {
    background: rgba(15, 15, 35, 0.95) !important;
    color: var(--text-main) !important;
    border: 1px solid rgba(0, 240, 255, 0.2) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px !important;
}

.iti__country {
    padding: 10px !important;
    transition: background 0.2s;
}

.iti__country:hover {
    background: rgba(0, 240, 255, 0.1) !important;
}

.iti__selected-flag {
    background-color: transparent !important;
    border-radius: 12px 0 0 12px !important;
}

.iti__flag-container {
    z-index: 10;
}

.input-group .iti input {
    padding-left: 95px !important;
    background-color: transparent !important;
    border: none !important;
}

.input-group:has(.iti) {
    padding: 0 !important;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}