/* ===================== Auth Page Styles ===================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Animated background */
.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(34, 211, 238, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    animation: authBgRotate 30s linear infinite;
}

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

.auth-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 1;
}

.auth-header {
    text-align: center;
    padding: 36px 32px 24px;
}

.auth-logo {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.02);
}

.auth-tab.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}

/* Auth Forms */
.auth-form {
    display: none;
    padding: 28px 32px 32px;
}

.auth-form.active {
    display: block;
}

.auth-form .input-group {
    margin-bottom: 18px;
}

.auth-form .input-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.auth-form .input-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.auth-form .input-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.auth-form .input-group input::placeholder {
    color: #555;
}

.auth-form .input-group .input-hint {
    font-size: 0.73rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.auth-form .btn-auth {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.auth-form .btn-auth:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.auth-form .btn-auth:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-divider {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin: 16px 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-footer {
    text-align: center;
    padding: 0 32px 28px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

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

/* Referral input highlight */
.referral-highlight {
    position: relative;
}

.referral-highlight input {
    padding-left: 36px !important;
}

.referral-highlight::before {
    content: '🎁';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    z-index: 1;
}

/* Error message */
.auth-error {
    display: none;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-sm);
    color: var(--accent-red);
    font-size: 0.82rem;
    margin-bottom: 16px;
}

.auth-error.visible {
    display: block;
}

/* Success message */
.auth-success {
    display: none;
    padding: 10px 14px;
    background: rgba(0, 214, 143, 0.1);
    border: 1px solid rgba(0, 214, 143, 0.25);
    border-radius: var(--radius-sm);
    color: var(--accent-green);
    font-size: 0.82rem;
    margin-bottom: 16px;
    text-align: center;
}

.auth-success.visible {
    display: block;
}

/* Password visibility toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px !important;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px;
}

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