/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 取自背景图 */
    --primary: #B85450;
    --primary-light: #D4746A;
    --primary-dark: #8B3A38;
    --accent-gold: #D4A574;
    --accent-cream: #F5E6D3;
    
    /* 玻璃效果 */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* 文字颜色 */
    --text-primary: #3D3D3D;
    --text-secondary: #666;
    --text-light: #999;
    --text-white: #FFFFFF;
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #B85450 0%, #D4746A 100%);
    --gradient-gold: linear-gradient(135deg, #D4A574 0%, #E8C99B 100%);
    
    /* 动画 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ========== 背景图层 ========== */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 根据水墨画风格调整：顶部暖红色调、中部淡雅、底部山峦深色渐变 */
    background: linear-gradient(
        to bottom,
        rgba(180, 60, 50, 0.15) 0%,
        rgba(120, 40, 30, 0.1) 30%,
        rgba(60, 30, 20, 0.15) 60%,
        rgba(30, 20, 15, 0.35) 100%
    );
}

/* ========== 粒子效果 ========== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float-up 15s infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========== 主容器 ========== */
.main-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========== 左侧品牌区 ========== */
.brand-section {
    flex: 1;
    max-width: 500px;
    color: var(--text-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.brand-content {
    animation: fade-in-left 1s ease-out;
}

@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-gold);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.character {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary-dark);
    position: relative;
    z-index: 1;
}

.logo-text h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 8px;
    margin-bottom: 8px;
}

.tagline {
    font-size: 14px;
    opacity: 0.9;
    letter-spacing: 2px;
}

/* 名言引用 */
.culture-quote {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.quote-mark {
    font-size: 60px;
    line-height: 1;
    opacity: 0.3;
    position: absolute;
    top: 10px;
    left: 20px;
}

.quote-text {
    font-size: 20px;
    line-height: 1.8;
    font-weight: 500;
    padding-left: 20px;
    margin-bottom: 15px;
}

.quote-author {
    font-size: 14px;
    opacity: 0.8;
    text-align: right;
}

/* 特色展示 */
.features {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

/* ========== 右侧表单区 ========== */
.form-section {
    flex: 0 0 420px;
    animation: fade-in-right 1s ease-out;
}

@keyframes fade-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 毛玻璃卡片 */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
}

/* 四角装饰 */
.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent-gold);
    opacity: 0.6;
}

.corner-tl {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.corner-tr {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.corner-bl {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.corner-br {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

/* 标签切换 */
.tab-container {
    display: flex;
    position: relative;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 5px;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.tab-btn.active {
    color: var(--text-white);
}

.tab-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: transform var(--transition-normal);
    box-shadow: 0 4px 15px rgba(184, 84, 80, 0.4);
}

.tab-btn:nth-child(2).active ~ .tab-indicator {
    transform: translateX(100%);
}

.tab-icon {
    font-size: 18px;
}

/* 表单内容 */
.form-content {
    display: none;
}

.form-content.active {
    display: block;
    animation: fade-in 0.4s ease;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    text-align: center;
    margin-bottom: 25px;
}

.form-header h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

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

.input-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.label-icon {
    font-size: 16px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 45px 14px 16px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    color: var(--text-primary);
    transition: all var(--transition-normal);
    outline: none;
}

.form-input:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(184, 84, 80, 0.2);
}

.form-input::placeholder {
    color: var(--text-light);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.form-input:focus ~ .input-line {
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.toggle-password:hover {
    opacity: 1;
}

.eye-icon {
    font-size: 18px;
}

/* 密码强度 */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.strength-text {
    font-size: 12px;
    color: var(--text-light);
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-me,
.agreement {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.custom-checkbox {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-light);
    border-radius: 4px;
    position: relative;
    transition: all var(--transition-fast);
}

.custom-checkbox:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 12px;
    transition: transform var(--transition-fast);
}

.custom-checkbox:checked + .checkmark::after {
    transform: translate(-50%, -50%) scale(1);
}

.agreement a {
    color: var(--primary);
    text-decoration: none;
}

.agreement a:hover {
    text-decoration: underline;
}

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

.forgot-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: var(--text-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(184, 84, 80, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 84, 80, 0.5);
}

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

.btn-text {
    letter-spacing: 4px;
}

.btn-icon {
    font-size: 18px;
    transition: transform var(--transition-normal);
}

.submit-btn:hover .btn-icon {
    transform: translateX(5px);
}

.btn-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:active .btn-ripple {
    width: 300px;
    height: 300px;
}

/* 分隔线 */
.divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 0, 0, 0.2),
        transparent
    );
}

.divider-text {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
}

/* 社交登录 */
.social-login {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

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

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

.social-btn.weibo {
    color: #E6162D;
}

/* 页脚 */
.form-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.form-footer p {
    font-size: 12px;
    color: var(--text-light);
}

/* ========== 浮动装饰元素 ========== */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.float-item {
    position: absolute;
    font-size: 100px;
    color: rgba(255, 255, 255, 0.05);
    font-weight: 700;
    animation: float-slow 20s infinite ease-in-out;
}

.float-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.float-2 {
    top: 60%;
    left: 8%;
    animation-delay: 5s;
}

.float-3 {
    top: 20%;
    right: 5%;
    animation-delay: 10s;
}

.float-4 {
    top: 70%;
    right: 10%;
    animation-delay: 15s;
}

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.03;
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
        opacity: 0.08;
    }
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        padding: 20px;
        gap: 30px;
    }

    .brand-section {
        max-width: 100%;
        text-align: center;
    }

    .logo {
        justify-content: center;
    }

    .culture-quote {
        display: none;
    }

    .features {
        justify-content: center;
    }

    .form-section {
        flex: none;
        width: 100%;
        max-width: 420px;
    }

    .float-item {
        font-size: 60px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 15px;
    }

    .glass-card {
        padding: 25px;
        border-radius: 20px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
    }

    .character {
        font-size: 32px;
    }

    .logo-text h1 {
        font-size: 28px;
    }

    .form-header h2 {
        font-size: 20px;
    }

    .tab-btn {
        font-size: 14px;
        padding: 12px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .submit-btn {
        font-size: 15px;
    }

    .btn-text {
        letter-spacing: 2px;
    }
}

/* ========== 动画类 ========== */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.pulse {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
