:root {
    --primary-color: #456bc2;
    --primary-light: #5a7fd6;
    --primary-dark: #345299;
    --accent-color: #4cd7f6;
    --gradient-start: #456bc2;
    --gradient-end: #4cd7f6;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --background-light: #f8faff;
    --error-color: #ff4757;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background: var(--background-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%);
    overflow: hidden;
    z-index: -1;
}

.light-beam {
    position: absolute;
    width: 200vw;
    height: 200vh;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 20%,
        transparent 60%);
    animation: rotateBeam 20s linear infinite;
    transform-origin: center;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at center, rgba(255,255,255,0.15) 0%, transparent 1px),
        radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 1px);
    background-size: 30px 30px, 15px 15px;
    animation: particlesMove 40s linear infinite;
}

.particles::after {
    background-image: 
        radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 2px),
        radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 1px);
    background-size: 40px 40px, 20px 20px;
    animation: particlesMove 60s linear infinite reverse;
}

.flow-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 0%, transparent 49%, rgba(255,255,255,0.05) 50%, transparent 51%, transparent 100%),
        linear-gradient(90deg, transparent 0%, transparent 49%, rgba(255,255,255,0.02) 50%, transparent 51%, transparent 100%);
    background-size: 50px 100%, 30px 100%;
    animation: flowLines 3s linear infinite;
}

@keyframes flowLines {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 50px 0, 30px 0;
    }
}

@keyframes rotateBeam {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes particlesMove {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(100px, 100px);
    }
}

.container {
    width: 100%;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.form-box {
    width: 90%;
    max-width: 380px;
    position: relative;
    margin: 5% auto;
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.button-box {
    width: 240px;
    margin: 0 auto 40px;
    position: relative;
    border-radius: 24px;
    background: var(--background-color);
}

.toggle-btn {
    padding: 12px 24px;
    width: 120px;
    cursor: pointer;
    background: transparent;
    border: 0;
    outline: none;
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

#btn {
    top: 0;
    left: 0;
    position: absolute;
    width: 120px;
    height: 100%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 24px;
    transition: left 0.3s ease;
}

.active-btn {
    color: white !important;
}

.login-container {
    max-width: 100%;
    position: relative;
    min-height: 240px;
}

.input-group {
    width: 100%;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(20px);
}

.input-group.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    transform: translateX(0);
}

.input-wrapper {
    margin-bottom: 16px;
}

.verification-code {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.verification-code .input-field {
    flex: 1;
    margin: 0;
}

.send-code-btn {
    padding: 0 20px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 44px;
    margin-top: 8px;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    background: var(--background-color);
    font-size: 14px;
    transition: all 0.3s ease;
    height: 44px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: 0;
    outline: none;
    border-radius: 24px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
}

.switch-login-type {
    text-align: center;
    margin: 24px 0;
}

.switch-btn {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.agreement {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

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

h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 26px;
    color: var(--text-primary);
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

h2 .highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding: 0 4px;
}

h2 .highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
    opacity: 0.5;
}

.forgot-password {
    text-align: right;
    margin-top: 12px;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--primary-light);
}

/* 第三方登录样式 */
.third-party-login {
    margin-top: 36px;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.divider .line {
    flex: 1;
    height: 1px;
    background: var(--border-color);
    max-width: 80px;
}

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

.login-icons {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.icon-item:active {
    transform: scale(0.95);
}

.icon-item span {
    font-size: 12px;
    color: var(--text-secondary);
}

.icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.icon:hover {
    transform: scale(1.05);
}

.icon.wechat {
    background: linear-gradient(135deg, #3eb94e, #2d9939);
}

.icon.qq {
    background: linear-gradient(135deg, #4EACEA, #2E86C3);
}

.icon.alipay {
    background: linear-gradient(135deg, #1677ff, #0066ff);
}

/* 移除旧的重复样式 */
.other-login {
    display: none;
}

.social-icons {
    display: none;
}

.social-icon {
    display: none;
}

.error-message {
    color: var(--error-color) !important;
    font-size: 12px !important;
    margin-top: 4px !important;
    animation: errorShake 0.4s ease-in-out;
}

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

/* 对话框样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dialog {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 85%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
}

.dialog-overlay.active .dialog {
    transform: translateY(0);
    opacity: 1;
}

.dialog-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
}

.dialog-title {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 16px;
}

.dialog-button {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
    margin-top: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dialog-button:active {
    transform: scale(0.98);
} 