:root {
    --accent: #2563ff;
    --light: #60a5fa;
    --text: #e2e8f0;
    --text2: #94a3b8;
    --bg: #020617;
    --card-bg: rgba(15, 23, 42, 0.65);
    --border: rgba(37, 99, 255, 0.25);
    --error: #ef4444;
    --success: #22c55e;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

#particles {
    position: fixed;
    inset: 0;
    z-index: -2;
}

/* Auth Page Layout */
.auth-page {
    min-height: calc(100vh - 60px);
    /* Leave room for footer */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    backdrop-filter: blur(20px);
}

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

.auth-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #ffffff, #d0e8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text2);
    font-size: 0.95rem;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select {
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 255, 0.15);
}

.form-group input::placeholder {
    color: var(--text2);
    opacity: 0.7;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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: right 14px center;
    background-size: 18px;
    padding-right: 44px;
}

/* Error Message */
.error-message {
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.9rem;
    text-align: center;
}

/* Success Message */
.success-message {
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    font-size: 0.9rem;
    text-align: center;
}

/* Primary Button */
.btn-primary {
    padding: 16px 24px;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 255, 0.4);
}

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

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    color: var(--text2);
    font-size: 0.9rem;
}

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

.auth-footer a:hover {
    color: #ffffff;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .auth-header h1 {
        font-size: 1.7rem;
    }

    .form-group input,
    .form-group select {
        padding: 12px 16px;
    }
}

/* Note: Header styles are now in header.css */

/* SMS Verification Styles */

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}

.step-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text2);
}

.step-badge.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.step-badge.completed {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.step-label {
    font-size: 0.8rem;
    color: var(--text2);
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--border);
}

.step-line.completed {
    background: #22c55e;
}

/* Input with Button */
.input-with-button {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.input-with-button input {
    flex: 1;
    min-width: 150px;
}

.btn-secondary {
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

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

/* Verified Phone Badge */
.verified-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.verified-phone i {
    color: #22c55e;
}

/* Verification Notice */
.verification-notice {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: rgba(37, 99, 255, 0.08);
    border: 1px solid rgba(37, 99, 255, 0.2);
}

.verification-notice i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.verification-notice p {
    font-size: 0.9rem;
    color: var(--text2);
    line-height: 1.5;
}

.verification-notice strong {
    color: var(--text);
}

/* Back Button Link */
.btn-link {
    background: none;
    border: none;
    color: var(--text2);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    transition: color 0.2s;
}

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

/* Form Step Transitions */
.form-step {
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Code Expiry Timer */
.code-expiry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 16px;
}

.expiry-label {
    color: var(--text2);
    font-size: 0.85rem;
}

.expiry-timer {
    font-size: 1.1rem;
    font-weight: 700;
    color: #22c55e;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.expiry-timer.expiring-soon {
    color: #f59e0b;
}

.expiry-timer.expired {
    color: #ef4444;
}

/* Full Width Button */
.btn-secondary.full-width {
    width: 100%;
    text-align: center;
}

/* Limit Notice */
.limit-notice {
    text-align: center;
    color: var(--text2);
    font-size: 0.75rem;
    margin-top: 8px;
    opacity: 0.7;
}

/* Button Row Alignment */
.btn-row {
    display: flex;
    margin-top: 8px;
}

.btn-row.right {
    justify-content: flex-end;
}

/* Mobile: full-width buttons */
@media (max-width: 480px) {
    .btn-row.right {
        justify-content: stretch;
    }

    .btn-row.right .btn-primary,
    .btn-row.right .btn-secondary {
        width: 100%;
    }
}

/* Resend and Back Links */
.resend-link {
    width: 100%;
    justify-content: center;
    color: var(--light);
    font-weight: 500;
}

.resend-link:disabled {
    color: var(--text2);
    opacity: 0.6;
}

.back-link {
    margin-top: 20px;
}

/* Expired Section */
.expired-section {
    text-align: center;
}

.expired-warning {
    color: #ef4444;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.expired-warning i {
    font-size: 1rem;
}

/* Inline Verification Section */
.verification-inline {
    margin: 16px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.verification-hint {
    color: var(--text2);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 12px;
}

/* Verified Badge */
.verified-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    color: #86efac;
    font-size: 0.9rem;
}

.verified-badge i {
    color: #22c55e;
    font-size: 1.1rem;
}

/* Disabled Registration Fields */
.registration-fields.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Compact Verification Notice */
.verification-notice.compact {
    padding: 12px;
    margin-bottom: 12px;
}

.verification-notice.compact p {
    font-size: 0.85rem;
}

.verification-notice.compact i {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active,
.step.completed {
    opacity: 1;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--light);
    border-color: var(--light);
    color: var(--bg);
}

.step.completed .step-number {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.step-label {
    font-size: 0.85rem;
    color: var(--text2);
}

.step.active .step-label {
    color: var(--text);
}

.step-line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

/* Verified Phone Display */
.verified-phone-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
    color: #86efac;
    font-size: 0.9rem;
}

.verified-phone-display i {
    color: #22c55e;
    font-size: 1.1rem;
}