body {
    background: linear-gradient(135deg, #c5d5e9 0%, #e3eaf5 100%);
    min-height: 100vh;  
    transition: opacity 0.5s ease;          
}
body.fade-out {
opacity: 0;
}
.logo-top-bar {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 0 24px 0;
    background: transparent;
    
}
.logo-top-bar .logo {
    width: 170px;
    height: auto;
    filter: drop-shadow(0 4px 24px rgba(80,120,200,0.09));
}
.container{
    margin-top: 120px;
}
.auth-container {
    background: rgba(255,255,255,0.92);
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.13);
    border-radius: 18px;
    max-width: 400px;
    margin: 0 auto;
    padding: 38px 32px 28px 32px;
    border: 1px solid #e3eaf5;
    position: relative;
    z-index: 2;
}
.welcome-text {
    text-align: center;
    margin-bottom: 28px;
    color: #2a3b5d;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.auth-form {
    display: none;
}
.auth-form.active {
    display: block;
}
/* General form group */
.form-group {
    margin-bottom: 18px;
}

/* Input styles */
.form-group input, 
.form-group select
{
    width: 100%;
    padding: 14px 15px;
    border: 1.5px solid #bfcbe3;
    border-radius: 7px;
    font-size: 17px;
    background-color: #f7faff;
    transition: border 0.2s;
    box-sizing: border-box;
}

/* Focus effect */
.form-group input:focus,
.form-group select:focus
{
    border: 1.5px solid #5271ff;
    outline: none;
    background: #fff;
}

/* Container for name inputs */
.name-group {
    display: flex;
    gap: 12px; /* Space between inputs */
    width: 100%; /* Let it adjust dynamically */
    margin-bottom: 18px;
}

/* Make all name inputs equal and adaptive */
.name-group input, 
.name-group select 
{
    flex: 1; /* Equal width for all inputs */
    padding: 14px 15px;
    font-size: 17px;
    border: 1.5px solid #bfcbe3;
    border-radius: 7px;
    background-color: #f7faff;
    transition: border 0.2s;
    min-width: 0; /* Prevents flexbox overflow issues */
}

/* On smaller screens: stack vertically */
@media (max-width: 768px) {
    .name-group {
        flex-direction: column;
    }
}

    .notice-header {
    display: flex;
    justify-content: space-between;  /* Places buttons on the right */
    align-items: center;
    margin-bottom: 8px;
    }

            .lang-toggle {
        display: flex;
        gap: 6px;
    }

    .lang-toggle button {
        background-color: #e8eefc;
        color: #333;
        border: 1px solid #bfcbe3;
        padding: 4px 10px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 13px;
        transition: all 0.2s ease-in-out;
    }

    .lang-toggle button.active {
        background-color: #5271ff;
        color: white;
        border-color: #5271ff;
        font-weight: bold;
    }

    .lang-toggle button:hover {
        background-color: #5271ff;
        color: white;
    }

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #3a5e8c 60%, #5271ff 100%);
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 17px;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 10px;
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(80, 120, 200, 0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
    background: linear-gradient(90deg, #5271ff 60%, #3a5e8c 100%);
    box-shadow: 0 4px 16px rgba(80, 120, 200, 0.14);
}
.form-links {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    margin-bottom: 8px;
}
.form-links a {
    color: #3a5e8c;
    text-decoration: none;
    transition: color 0.2s;
}
.form-links a:hover {
    text-decoration: underline;
    color: #5271ff;
}
.error-message {
    color: #e74c3c;
    font-size: 15px;
    margin-bottom: 10px;
    text-align: center;
    min-height: 18px;
}
.demo-credentials {
    margin-top: 22px;
    padding: 12px;
    background: linear-gradient(90deg, #f7faff 60%, #e3eaf5 100%);
    border-radius: 7px;
    font-size: 15px;
    color: #333;
    border: 1px solid #e3eaf5;
}
.demo-credentials p {
    margin: 2px 0;
}
.phone-input-container {
    display: flex;
    align-items: center;
    border: 1.5px solid #bfcbe3;
    border-radius: 7px;
    background-color: #f7faff;
    transition: border 0.2s;
}
.phone-input-container:focus-within {
    border: 1.5px solid #5271ff;
    background: #fff;
}
.phone-prefix {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    background-color: #e8f0fe;
    border-right: 1px solid #bfcbe3;
    font-weight: 600;
    color: #2a3b5d;
}
.flag-icon {
    width: 20px;
    height: auto;
    margin-right: 8px;
}
.phone-input-container input {
    border: none;
    background: transparent;
    padding: 14px 12px;
    flex: 1;
}
.phone-input-container input:focus {
    border: none;
    background: transparent;
}
.verification-method {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}
.verification-method label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #2a3b5d;
}
.verification-method input[type="radio"] {
    margin-right: 8px;
}
.verification-form {
    display: none;
}
.verification-form.active {
    display: block;
}
.timer-display {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #e74c3c;
    margin-bottom: 15px;
    min-height: 25px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    color: #2a3b5d;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

/* OTP Choice Buttons */
.otp-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(90deg, #3a5e8c 60%, #5271ff 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-choice:hover {
    background: linear-gradient(90deg, #5271ff 60%, #3a5e8c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 120, 200, 0.3);
}

.btn-choice i {
    font-size: 18px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin: 0 5px;
    transition: background 0.3s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.btn-cancel:hover {
    background: #c0392b;
}

/* OTP Input Container */
.otp-input-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.otp-digit {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    border: 2px solid #bfcbe3;
    border-radius: 8px;
    background: #f7faff;
    transition: all 0.3s ease;
}

.otp-digit:focus {
    border-color: #5271ff;
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(82, 113, 255, 0.1);
}

.otp-digit.filled {
    border-color: #28a745;
    background: #f8fff9;
}

.otp-digit.error {
    border-color: #e74c3c;
    background: #fff5f5;
}

.otp-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.otp-buttons .btn-primary {
    width: auto;
    margin: 0;
    padding: 12px 25px;
}

/* Loading Screen Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3a5e8c;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 600px) {
    .logo-top-bar {
        padding: 18px 0 8px 0;
    }
    .logo-top-bar .logo {
        width: 110px;
    }
    .auth-container {
        padding: 18px 8px 16px 8px;
    }
    .welcome-text {
        font-size: 1.3rem;
    }
}
@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }
    .logo-top-bar .logo {
        width: 200px;
    }
    .welcome-text {
        font-size: 1.1rem;
    }
}
