:root {
    --primary-color: #FF6B9D;
    --primary-dark: #E85A8A;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --bg-primary: #FFF5F7;
    --bg-secondary: #FFFFFF;
    --text-primary: #2D3748;
    --text-secondary: #718096;
    --border-color: #E2E8F0;
    --shadow-sm: 0 2px 8px rgba(255, 107, 157, 0.08);
    --shadow-md: 0 4px 16px rgba(255, 107, 157, 0.12);
    --shadow-lg: 0 8px 32px rgba(255, 107, 157, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #FFF5F7 0%, #FFE8EE 50%, #FFF0F5 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== 认证容器 ========== */
.auth-container {
    display: flex;
    min-height: 100vh;
}

/* ========== 左侧装饰区 ========== */
.auth-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -200px;
    left: -200px;
    animation: float 6s ease-in-out infinite;
}

.auth-left::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -150px;
    right: -150px;
    animation: float 8s ease-in-out infinite reverse;
}

.auth-decoration {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    animation: fadeInUp 0.8s ease-out;
}

.decoration-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: bounce 2s infinite;
}

.auth-decoration h1 {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
}

.auth-decoration p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 48px;
}

.decoration-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    opacity: 0.95;
}

.feature-icon {
    font-size: 24px;
}

/* ========== 右侧表单区 ========== */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-primary);
}

.auth-box {
    width: 100%;
    max-width: 480px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.6s ease-out;
}

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

.auth-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========== 表单样式 ========== */
.auth-form {
    margin-bottom: 24px;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text-primary);
    transition: var(--transition);
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.forgot-link, .terms-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover, .terms-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-auth {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-auth:active {
    transform: translateY(0);
}

.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

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

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

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

.auth-divider span {
    background: var(--bg-secondary);
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-switch {
    text-align: center;
    font-size: 15px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: var(--transition);
}

.auth-switch a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.offline-mode {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.offline-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

/* ========== Toast 提示 ========== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

.toast.show {
    display: flex;
}

.toast.success {
    border-left: 4px solid #4CAF50;
}

.toast.error {
    border-left: 4px solid #F44336;
}

.toast.info {
    border-left: 4px solid #2196F3;
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .auth-left {
        display: none;
    }
    
    .auth-right {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .auth-right {
        padding: 20px;
    }
    
    .auth-box {
        padding: 32px 24px;
    }
    
    .auth-header h2 {
        font-size: 28px;
    }
}

/* ========== 登录方式 Tab ========== */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: calc(var(--radius-sm) - 2px);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Noto Sans SC', sans-serif;
}

.auth-tab:hover {
    color: var(--primary-color);
}

.auth-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ========== 验证码输入组 ========== */
.code-input-group {
    display: flex;
    gap: 12px;
}

.code-input-group input {
    flex: 1;
}

.btn-send-code {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--secondary-color), #3DBDB4);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-width: 110px;
}

.btn-send-code:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-send-code:disabled {
    background: #CBD5E0;
    cursor: not-allowed;
    transform: none;
}

.btn-send-code.counting {
    background: #CBD5E0;
    cursor: not-allowed;
}

/* ========== 第三方登录 ========== */
.social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-wechat {
    border-color: #07C160;
    color: #07C160;
}

.btn-wechat:hover {
    background: #07C160;
    color: white;
}

.btn-qq {
    border-color: #12B7F5;
    color: #12B7F5;
}

.btn-qq:hover {
    background: #12B7F5;
    color: white;
}

.social-icon {
    width: 20px;
    height: 20px;
}

/* ========== 加载动画 ========== */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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