.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Background Effect similar to Landing */
.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.auth-card {
    background: var(--primary-light);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    border-radius: var(--card-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.5s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.auth-header p {
    color: var(--text-muted);
}

.wave-hand {
    display: inline-block;
    animation: wave 2s infinite;
    /* Faster, smoother */
    transform-origin: 70% 70%;
}

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }

    60% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, #fff, var(--accent-color), #fff);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 5s linear infinite;
    font-weight: 800;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.rocket-launch {
    display: inline-block;
    animation: rocket-float 2s infinite ease-in-out;
}

@keyframes rocket-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-3px) rotate(-5deg);
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-input {
    width: 100%;
    height: 50px;
    /* Ensure Equal Height */
    padding: 0 16px;
    /* Align text vertically with height */
    background: rgba(255, 255, 255, 0.05);
    /* Proper Dark BG */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    /* White Text */
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    color: white;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-footer a {
    color: var(--accent-color);
    font-weight: 600;
    margin-right: 5px;
}

.form-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: none;
    text-align: center;
}

/* Password Toggle */
.input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 16px;
    /* RTL Support: normally right, but for RTL usually left if direction is rtl */
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-color);
}

/* Device Lock Modal */
.device-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.device-modal-card {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    color: white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.device-modal-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.device-modal-icon {
    font-size: 2rem;
    color: #ef4444;
}

.device-modal-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.device-modal-text {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 25px;
}

.device-modal-note {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #f1f5f9;
}

.device-modal-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.device-modal-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Fix Dropdown/Select Visibility */
select.form-input {
    background-color: rgba(255, 255, 255, 0.03);
    /* Keep transparent if supported */
    color: var(--text-color);
    appearance: none;
    /* Remove default arrow in some browsers for custom styling, but let's be careful */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    /* RTL usually, check dir */
    background-size: 1em;
}

/* Force Options to have Dark Background & White Text */
select.form-input option {
    background-color: #1e293b !important;
    color: white !important;
    padding: 10px;
}

/* Fix for Autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: rgb(255, 255, 255) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Login Tabs */
.login-tabs {
    display: flex;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    gap: 5px;
}

.login-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    color: #94a3b8;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    user-select: none;
}

.login-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
}

.login-tab.active {
    background: var(--accent-color, #6366f1);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    /* Match form-input */
    height: 50px;
    /* Force Equal Height */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    direction: ltr;
    transition: all 0.2s;
}

.phone-input-group:focus-within {
    border-color: var(--accent-color, #6366f1);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.country-code {
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    color: #cbd5e1;
    font-weight: bold;
    font-family: monospace;
    font-size: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 5px;
}

.phone-field {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 15px;
    color: white;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    width: 100%;
}

.phone-field::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Hide/Show utility */
.input-mode {
    display: none;
    animation: fadeIn 0.3s ease;
}

.input-mode.active {
    display: block;
}