/* Modern Auth Interface Styles */

:root {
    --primary-color: #6c757d;
    --primary-hover: #5a6268;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #333;
    --text-muted: #6c757d;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 20px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 8px;
}

.tagline {
    color: var(--text-muted);
    font-size: 14px;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.1);
}

.otp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 600;
}

.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

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

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    padding: 8px;
    font-size: 14px;
}

.btn-link:hover {
    color: var(--primary-hover);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner.hidden {
    display: none;
}

.otp-message {
    background: var(--light-gray);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
    font-size: 14px;
    color: var(--text-color);
}

.otp-expiry {
    text-align: center;
    color: var(--warning-color);
    margin-bottom: 20px;
    font-size: 14px;
}

.otp-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.help-text {
    margin-top: 20px;
    padding: 16px;
    background: var(--light-gray);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.help-text code {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    display: inline-block;
    margin-top: 8px;
}

.help-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

.success-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.user-info {
    background: var(--light-gray);
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.user-info p {
    margin: 8px 0;
    font-size: 14px;
}

.user-info strong {
    color: var(--text-color);
}

/* Alert Styles */
.alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert::before {
    font-size: 20px;
}

.alert-success::before { content: '✅'; }
.alert-error::before { content: '❌'; }
.alert-info::before { content: 'ℹ️'; }
.alert-warning::before { content: '⚠️'; }

.footer {
    text-align: center;
    color: white;
    font-size: 13px;
    opacity: 0.9;
}

.footer p {
    margin: 8px 0;
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 24px;
    }

    .logo h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .otp-input {
        font-size: 20px;
        letter-spacing: 4px;
    }
}

/* Loading State */
.loading .btn-text {
    display: none;
}

.loading .spinner {
    display: block;
}
