.ali-login-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
}

.ali-login-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ali-login-form h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.verification-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    border-left: 4px solid #007bff;
}

.verification-description {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.5;
}

.sent-to-number {
    background: #e7f3ff;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #b3d9ff;
}

.sent-to-number p {
    margin: 0;
    color: #0066cc;
    font-size: 14px;
}

.phone-number {
    font-family: monospace;
    font-weight: bold;
    color: #004499;
}

.ali-login-form .field {
    margin-bottom: 20px;
}

.ali-login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.ali-login-form input[type="text"],
.ali-login-form input[type="email"],
.ali-login-form input[type="tel"],
.ali-login-form input[type="password"],
.ali-login-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.ali-login-form input:focus,
.ali-login-form select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Phone input group */
.phone-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.country-code-select {
    flex: 0 0 140px;
}

.phone-input-group input {
    flex: 1;
}

/* Password strength message */
.password-strength-message {
    margin-top: 8px;
    font-size: 12px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid;
    display: none;
}

.password-strength-message.success {
    display: block;
    color: #0a5c0a;
    background-color: #f0fff0;
    border-color: #0a5c0a;
}

.password-strength-message.error {
    display: block;
    color: #d63384;
    background-color: #fff0f5;
    border-color: #d63384;
}

.ali-login-form small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.phone-example {
    color: #888;
    font-style: italic;
}

.ali-login-form .actions {
    margin-top: 30px;
    text-align: center;
}

.ali-login-form .action.primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.ali-login-form .action.primary:hover {
    background: #0056b3;
}

.ali-login-form .action.primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.ali-login-form .action.secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ali-login-form .action.secondary:hover:not(:disabled) {
    background: #545b62;
}

.ali-login-form .action.secondary:disabled {
    background: #a0a5aa;
    cursor: not-allowed;
}

.login-link,
.register-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-link a,
.register-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover,
.register-link a:hover {
    text-decoration: underline;
}

/* OTP Verification Styles */
.otp-timer {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
}

#countdown-timer {
    font-weight: bold;
    color: #dc3545;
    font-size: 18px;
}

.resend-otp {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.resend-otp p {
    margin-bottom: 10px;
    color: #666;
}

/* Messages */
.messages {
    margin: 20px 0;
}

.message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid;
}

.message-success {
    background-color: #d1edff;
    color: #0c5460;
    border-color: #bee5eb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Loading state */
.button.loading {
    position: relative;
    color: transparent !important;
}

.button.loading:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* RTL Support */
[dir="rtl"] .ali-login-form {
    text-align: right;
}

[dir="rtl"] .phone-input-group {
    flex-direction: row-reverse;
}

[dir="rtl"] .ali-login-form .actions {
    text-align: center;
}

[dir="rtl"] .verification-info {
    border-left: none;
    border-right: 4px solid #007bff;
}

/* Responsive */
@media (max-width: 768px) {
    .ali-login-container {
        padding: 10px;
        margin: 20px auto;
    }
    
    .ali-login-form {
        padding: 20px;
    }
    
    .phone-input-group {
        flex-direction: column;
    }
    
    .country-code-select {
        flex: 1;
        width: 100%;
    }
    
    .ali-login-form h1 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .ali-login-form {
        padding: 15px;
    }
    
    .ali-login-form input[type="text"],
    .ali-login-form input[type="email"],
    .ali-login-form input[type="tel"],
    .ali-login-form input[type="password"],
    .ali-login-form select {
        padding: 10px;
        font-size: 14px;
    }
    
    .verification-info {
        padding: 15px;
    }
}
