/* ============================================================
   Auth Elegant - 轻奢高级暗金风格登录页样式
   与 sponsor-elegant.css 风格统一
   ============================================================ */

/* --- CSS 变量 --- */
:root {
    --au-bg-primary: #0a0a0f;
    --au-bg-secondary: #12121a;
    --au-bg-card: #16161f;
    --au-bg-input: #1c1c28;
    --au-bg-input-focus: #1e1e2c;

    --au-gold-light: #f0d078;
    --au-gold: #d4a853;
    --au-gold-dark: #b8922e;
    --au-gold-deeper: #8a6d1f;
    --au-gold-gradient: linear-gradient(135deg, #f0d078 0%, #d4a853 50%, #b8922e 100%);
    --au-gold-gradient-hover: linear-gradient(135deg, #f5dc8e 0%, #e0b96a 50%, #c9a040 100%);
    --au-gold-glow: 0 0 20px rgba(212, 168, 83, 0.3);
    --au-gold-glow-strong: 0 0 30px rgba(212, 168, 83, 0.5), 0 0 60px rgba(212, 168, 83, 0.2);
    --au-gold-border-glow: 0 0 0 1px rgba(212, 168, 83, 0.3), 0 0 15px rgba(212, 168, 83, 0.15);

    --au-text-primary: #e8e6e3;
    --au-text-secondary: #9a9a9a;
    --au-text-muted: #6a6a6a;
    --au-text-gold: #d4a853;

    --au-border-color: #2a2a3a;
    --au-border-focus: rgba(212, 168, 83, 0.5);

    --au-danger: #e74c3c;
    --au-danger-bg: rgba(231, 76, 60, 0.1);
    --au-danger-border: rgba(231, 76, 60, 0.3);
    --au-success: #2ecc71;
    --au-success-bg: rgba(46, 204, 113, 0.1);
    --au-success-border: rgba(46, 204, 113, 0.3);

    --au-qq-blue: #12b7f5;
    --au-qq-blue-hover: #0ea1d9;

    --au-radius-sm: 6px;
    --au-radius-md: 10px;
    --au-radius-lg: 16px;
    --au-radius-xl: 24px;

    --au-shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    --au-shadow-input: 0 2px 8px rgba(0, 0, 0, 0.2);
    --au-shadow-btn: 0 4px 16px rgba(212, 168, 83, 0.3);
    --au-shadow-btn-hover: 0 8px 24px rgba(212, 168, 83, 0.5), 0 4px 12px rgba(212, 168, 83, 0.3);

    --au-transition-fast: 0.2s ease;
    --au-transition-normal: 0.3s ease;
    --au-transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --au-font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    --au-z-index-toast: 10000;
    --au-z-index-overlay: 9999;
}

/* --- 全屏布局 --- */
.au-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--au-bg-primary);
    font-family: var(--au-font-family);
    color: var(--au-text-primary);
    overflow: hidden;
    position: relative;
}

/* 背景装饰 */
.au-login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(212, 168, 83, 0.03) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(212, 168, 83, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* --- 主容器 --- */
.au-login-container {
    display: flex;
    width: 960px;
    max-width: 95vw;
    min-height: 580px;
    background: var(--au-bg-card);
    border-radius: var(--au-radius-lg);
    box-shadow: var(--au-shadow-card);
    overflow: hidden;
    position: relative;
    z-index: 1;
    border: 1px solid var(--au-border-color);
}

/* --- 左侧表单区域 --- */
.au-login-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
}

/* Logo / 品牌 */
.au-login-brand {
    text-align: center;
    margin-bottom: 36px;
}

.au-login-brand-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--au-gold-gradient);
    border-radius: var(--au-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #0a0a0f;
    box-shadow: var(--au-gold-glow);
}

.au-login-brand h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--au-text-primary);
    margin: 0;
    letter-spacing: 0.5px;
}

.au-login-brand p {
    font-size: 13px;
    color: var(--au-text-muted);
    margin: 6px 0 0;
}

/* --- Tab 切换 --- */
.au-login-tabs {
    display: flex;
    background: var(--au-bg-input);
    border-radius: var(--au-radius-sm);
    padding: 3px;
    margin-bottom: 28px;
    border: 1px solid var(--au-border-color);
}

.au-login-tab {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--au-text-secondary);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--au-transition-fast);
    position: relative;
}

.au-login-tab:hover {
    color: var(--au-text-primary);
}

.au-login-tab.au-active {
    background: var(--au-bg-card);
    color: var(--au-gold);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.au-login-tab.au-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--au-gold);
    border-radius: 1px;
}

/* --- 表单 --- */
.au-login-form {
    width: 100%;
}

/* 输入框组 */
.au-input-group {
    position: relative;
    margin-bottom: 20px;
}

.au-input-group .au-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--au-text-muted);
    font-size: 15px;
    transition: color var(--au-transition-fast);
    pointer-events: none;
    z-index: 2;
}

.au-input-group input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    background: var(--au-bg-input);
    border: 1px solid var(--au-border-color);
    border-radius: var(--au-radius-sm);
    color: var(--au-text-primary);
    font-size: 14px;
    font-family: var(--au-font-family);
    transition: all var(--au-transition-normal);
    outline: none;
    box-sizing: border-box;
}

.au-input-group input::placeholder {
    color: var(--au-text-muted);
    font-size: 13px;
}

.au-input-group input:focus {
    border-color: var(--au-border-focus);
    background: var(--au-bg-input-focus);
    box-shadow: var(--au-gold-border-glow);
}

.au-input-group input:focus ~ .au-input-icon,
.au-input-group input:focus + .au-input-icon {
    color: var(--au-gold);
}

/* 密码输入框右侧眼睛按钮 */
.au-input-group .au-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--au-text-muted);
    font-size: 15px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--au-transition-fast);
    z-index: 2;
}

.au-input-group .au-password-toggle:hover {
    color: var(--au-gold);
}

/* 密码输入框需要右侧 padding */
.au-input-group.au-has-toggle input {
    padding-right: 44px;
}

/* 错误状态 */
.au-input-group.au-error input {
    border-color: var(--au-danger);
    background: var(--au-danger-bg);
}

.au-input-group.au-error .au-input-icon {
    color: var(--au-danger);
}

.au-input-error-msg {
    display: none;
    font-size: 12px;
    color: var(--au-danger);
    margin-top: 6px;
    padding-left: 4px;
    line-height: 1.4;
}

.au-input-group.au-error .au-input-error-msg {
    display: block;
    animation: auShake 0.3s ease;
}

@keyframes auShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* --- 记住我 & 忘记密码 --- */
.au-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
}

/* 自定义复选框 */
.au-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.au-checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.au-checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--au-border-color);
    border-radius: 3px;
    background: var(--au-bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--au-transition-fast);
    flex-shrink: 0;
}

.au-checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 9px;
    color: #0a0a0f;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--au-transition-fast);
}

.au-checkbox-wrapper input[type="checkbox"]:checked + .au-checkbox-custom {
    background: var(--au-gold-gradient);
    border-color: var(--au-gold);
    box-shadow: 0 0 8px rgba(212, 168, 83, 0.3);
}

.au-checkbox-wrapper input[type="checkbox"]:checked + .au-checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.au-checkbox-label {
    color: var(--au-text-secondary);
    font-size: 13px;
}

.au-forgot-link {
    color: var(--au-gold);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--au-transition-fast);
}

.au-forgot-link:hover {
    color: var(--au-gold-light);
    text-decoration: underline;
}

/* --- 登录按钮 --- */
.au-login-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--au-gold-gradient);
    border: none;
    border-radius: var(--au-radius-sm);
    color: #0a0a0f;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--au-font-family);
    cursor: pointer;
    transition: all var(--au-transition-normal);
    box-shadow: var(--au-shadow-btn);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.au-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.au-login-btn:hover {
    background: var(--au-gold-gradient-hover);
    box-shadow: var(--au-shadow-btn-hover);
    transform: translateY(-2px);
}

.au-login-btn:hover::before {
    left: 100%;
}

.au-login-btn:active {
    transform: translateY(0);
    box-shadow: var(--au-shadow-btn);
}

/* 按钮加载状态 */
.au-login-btn.au-loading {
    pointer-events: none;
    opacity: 0.85;
}

.au-login-btn.au-loading .au-btn-text {
    visibility: hidden;
}

.au-login-btn .au-btn-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(10, 10, 15, 0.2);
    border-top-color: #0a0a0f;
    border-radius: 50%;
    animation: auSpin 0.7s linear infinite;
}

.au-login-btn.au-loading .au-btn-spinner {
    display: block;
}

@keyframes auSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- 分割线 --- */
.au-login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    gap: 16px;
}

.au-login-divider::before,
.au-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--au-border-color);
}

.au-login-divider span {
    font-size: 12px;
    color: var(--au-text-muted);
    white-space: nowrap;
}

/* --- 社交登录 --- */
.au-social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.au-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid var(--au-border-color);
    border-radius: var(--au-radius-sm);
    background: var(--au-bg-input);
    color: var(--au-text-secondary);
    font-size: 13px;
    font-family: var(--au-font-family);
    cursor: pointer;
    transition: all var(--au-transition-fast);
    text-decoration: none;
}

.au-social-btn:hover {
    border-color: var(--au-qq-blue);
    color: var(--au-qq-blue);
    background: rgba(18, 183, 245, 0.05);
    transform: translateY(-1px);
}

.au-social-btn i {
    font-size: 18px;
}

.au-social-btn.au-qq-btn i {
    color: var(--au-qq-blue);
}

.au-social-btn.au-qq-btn:hover i {
    color: var(--au-qq-blue-hover);
}

/* --- 注册链接 --- */
.au-login-register {
    text-align: center;
    font-size: 13px;
    color: var(--au-text-muted);
}

.au-login-register a {
    color: var(--au-gold);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--au-transition-fast);
}

.au-login-register a:hover {
    color: var(--au-gold-light);
    text-decoration: underline;
}

/* --- 右侧装饰面板 --- */
.au-login-decor {
    width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    background: linear-gradient(160deg, #1a1510 0%, #0f0d0a 40%, #12100c 100%);
    position: relative;
    overflow: hidden;
}

/* 装饰面板金色光晕 */
.au-login-decor::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.au-login-decor::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.au-decor-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.au-decor-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
    background: var(--au-gold-gradient);
    border-radius: var(--au-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #0a0a0f;
    box-shadow: var(--au-gold-glow-strong);
}

.au-decor-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--au-text-primary);
    margin: 0 0 12px;
    letter-spacing: 0.5px;
}

.au-decor-content p {
    font-size: 14px;
    color: var(--au-text-secondary);
    line-height: 1.7;
    margin: 0 0 36px;
}

/* 特性列表 */
.au-decor-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    width: 100%;
}

.au-decor-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(212, 168, 83, 0.08);
}

.au-decor-features li:last-child {
    border-bottom: none;
}

.au-decor-features .au-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(212, 168, 83, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--au-gold);
    font-size: 14px;
    flex-shrink: 0;
}

.au-decor-features .au-feature-text {
    font-size: 13px;
    color: var(--au-text-secondary);
    line-height: 1.5;
}

.au-decor-features .au-feature-text strong {
    display: block;
    color: var(--au-text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

/* --- Toast 通知 --- */
.au-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: var(--au-z-index-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.au-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--au-radius-sm);
    font-size: 13px;
    font-family: var(--au-font-family);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    animation: auToastIn 0.35s ease;
    max-width: 360px;
    line-height: 1.5;
}

.au-toast.au-toast-success {
    background: var(--au-success-bg);
    border: 1px solid var(--au-success-border);
    color: var(--au-success);
}

.au-toast.au-toast-error {
    background: var(--au-danger-bg);
    border: 1px solid var(--au-danger-border);
    color: var(--au-danger);
}

.au-toast.au-toast-out {
    animation: auToastOut 0.3s ease forwards;
}

.au-toast i {
    font-size: 16px;
    flex-shrink: 0;
}

@keyframes auToastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes auToastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .au-login-container {
        flex-direction: column;
        max-width: 420px;
        min-height: auto;
        border-radius: var(--au-radius-md);
    }

    .au-login-form-section {
        padding: 36px 24px;
    }

    .au-login-decor {
        display: none;
    }

    .au-login-brand {
        margin-bottom: 28px;
    }

    .au-login-brand h1 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .au-login-form-section {
        padding: 28px 20px;
    }

    .au-social-login {
        flex-direction: column;
    }

    .au-login-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* --- 辅助 / 工具类 --- */
.au-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.au-hidden {
    display: none !important;
}

/* CSRF Token hidden input */
.au-csrf-input {
    display: none;
}
