/* ============================================
   TaoVideo — Auth Pages (Login / Register)
   🌌 AI Studio Dark Theme + Effects
   ============================================ */

.auth-page {
    min-height: 100vh; display: flex; flex-direction: column;
    position: relative; overflow: hidden;
}

/* Ambient glow background */
.auth-page::before {
    content: ""; position: fixed; inset: 0; opacity: 0.5;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(124,58,237,0.15), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(6,182,212,0.1), transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236,72,153,0.05), transparent 60%);
    background-size: 400% 400%;
    animation: authBgShift 15s ease infinite;
    z-index: 0; pointer-events: none;
}
@keyframes authBgShift {
    0%   { background-position: 0% 0%; }
    25%  { background-position: 100% 0%; }
    50%  { background-position: 100% 100%; }
    75%  { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

.auth-container {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px 16px; position: relative; z-index: 1;
}
.auth-container::before {
    content: ""; position: absolute; top: -80px; right: -60px;
    width: 220px; height: 220px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(6,182,212,0.1));
    filter: blur(40px); animation: floatShape 6s ease-in-out infinite;
}
.auth-container::after {
    content: ""; position: absolute; bottom: -80px; left: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(236,72,153,0.1), rgba(245,158,11,0.08));
    filter: blur(40px); animation: floatShape 8s ease-in-out infinite reverse;
}
@keyframes floatShape {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.auth-card {
    width: 100%; max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 40px 36px; backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.4), 0 0 40px rgba(124,58,237,0.06);
    animation: authCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative; z-index: 2;
}
@keyframes authCardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header .auth-logo {
    height: 44px; margin-bottom: 18px;
    animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.auth-header h1 {
    font-size: 1.5rem; font-weight: 800; color: var(--text-primary);
    margin-bottom: 8px; letter-spacing: -0.02em;
}
.auth-header p { font-size: 0.85rem; color: var(--text-muted); }

.auth-field { margin-bottom: 20px; }
.auth-field label {
    display: block; font-size: 0.82rem; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 8px;
}
.auth-field label i { color: var(--violet-light); margin-right: 2px; }
.auth-field .field-input {
    width: 100%; padding: 13px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-xs);
    color: var(--text-primary); font-family: var(--font);
    font-size: 0.88rem; transition: all 0.25s ease; outline: none;
}
.auth-field .field-input::placeholder { color: var(--text-muted); }
.auth-field .field-input:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15), 0 0 20px rgba(124,58,237,0.1);
    background: rgba(255,255,255,0.06);
}
.auth-field .field-input:hover:not(:focus) { border-color: rgba(124,58,237,0.3); }
.auth-field .field-input.is-invalid {
    border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.auth-field .error-text {
    display: flex; align-items: center; gap: 4px;
    font-size: 0.74rem; color: #ef4444; margin-top: 6px; font-weight: 500;
}
.auth-field .error-text::before { content: "⚠"; font-size: 0.7rem; }

.auth-check { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.auth-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--violet); cursor: pointer; }
.auth-check label { font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; }
.auth-check label a { color: var(--cyan-light) !important; text-decoration: none !important; font-weight: 600 !important; }

.auth-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px 24px; border: none;
    border-radius: 999px; font-family: var(--font);
    font-size: 0.95rem; font-weight: 700; color: #fff;
    cursor: pointer; position: relative; overflow: hidden;
    background: linear-gradient(135deg, #6f7cff, #8f6bff, #4b5bff);
    background-size: 300% 300%;
    animation: gradientMove 6s ease infinite, pulseGlow 2.5s infinite;
    box-shadow: 0 0 12px rgba(111,124,255,0.6), 0 0 24px rgba(143,107,255,0.4);
    transition: all 0.3s ease;
}
.auth-submit::before {
    content: ""; position: absolute;
    top: 0; left: -120%; width: 120%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: scanLight 3s infinite;
}
.auth-submit:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 20px rgba(111,124,255,0.9), 0 0 40px rgba(143,107,255,0.8);
}
.auth-submit:active { transform: translateY(0) scale(1); }

.auth-links { text-align: center; margin-top: 22px; font-size: 0.84rem; color: var(--text-muted); }
.auth-links a {
    color: var(--cyan-light); text-decoration: none; font-weight: 700;
    transition: all 0.2s; position: relative;
}
.auth-links a::after {
    content: ""; position: absolute; bottom: -2px; left: 0;
    width: 0; height: 2px; background: var(--cyan);
    transition: width 0.3s ease; border-radius: 1px;
}
.auth-links a:hover::after { width: 100%; }
.auth-links a:hover { color: #fff; }

.auth-divider {
    display: flex; align-items: center; gap: 14px;
    margin: 24px 0; color: var(--text-muted); font-size: 0.75rem; font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border-color);
}

/* Google login button */
.btn-google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 24px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    margin-bottom: 4px;
}
.btn-google-login:hover {
    background: rgba(66,133,244,0.1);
    border-color: rgba(66,133,244,0.3);
    box-shadow: 0 0 16px rgba(66,133,244,0.15);
    transform: translateY(-1px);
    color: #fff;
}
.btn-google-login:active {
    transform: translateY(0);
}
.btn-google-login svg {
    flex-shrink: 0;
}

.auth-trust {
    display: flex; justify-content: center; gap: 16px;
    margin-top: 24px; padding-top: 20px;
    border-top: 1px solid var(--border-color); flex-wrap: wrap;
}
.trust-item {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.7rem; color: var(--text-muted); font-weight: 500; white-space: nowrap;
}
.trust-item i { font-size: 14px; color: var(--emerald); }

.auth-stats {
    display: flex; justify-content: center; gap: 28px;
    margin-top: 24px; padding: 0 16px; width: 100%; max-width: 440px;
    animation: authCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.15s; opacity: 0; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
    font-size: 1.15rem; font-weight: 800; display: block; line-height: 1.2;
    background: var(--gradient-ai); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 0.66rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

.field-wrapper { position: relative; }
.field-wrapper .field-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 16px; transition: color 0.2s; pointer-events: none;
}
.field-wrapper .field-input { padding-left: 42px; }
.field-wrapper:focus-within .field-icon { color: var(--violet-light); }

@media (max-width: 768px) {
    .auth-container { padding: 24px 12px; }
    .auth-card { padding: 30px 24px; max-width: 100%; }
    .auth-stats { gap: 24px; max-width: 100%; }
    .auth-container::before, .auth-container::after { display: none; }
}
@media (max-width: 480px) {
    .auth-container { padding: 16px 10px; }
    .auth-card { padding: 24px 18px; border-radius: var(--radius-sm); }
    .auth-header h1 { font-size: 1.2rem; }
    .auth-header .auth-logo { height: 36px; }
    .auth-submit { font-size: 0.88rem; padding: 12px 18px; }
    .auth-field .field-input { padding: 11px 14px; font-size: 0.84rem; }
    .field-wrapper .field-input { padding-left: 38px; }
    .auth-trust { gap: 12px; }
    .auth-stats { gap: 18px; margin-top: 20px; }
}
