/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-color: #667eea;
    --secondary-color: #764ba2;

    /* 中性色 */
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-light: #a0aec0;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;

    /* 边框和分割 */
    --border-color: #e2e8f0;
    --border-focus: #667eea;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

    /* 边界半径 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* 动画 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    overflow-x: hidden;
}

/* 主容器 */
.login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* 左侧面板 */
.left-panel {
    flex: 1;
    background: var(--primary-gradient);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='7' cy='7' r='7'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    animation: pattern-move 20s linear infinite;
}

@keyframes pattern-move {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(60px, 60px);
    }
}

/* 品牌区域 */
.brand-section {
    text-align: center;
    z-index: 2;
    margin-bottom: 60px;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.logo-icon {
    margin-bottom: 20px;
    perspective: 1000px;
}

.cube {
    position: relative;
    width: 60px;
    height: 60px;
    transform-style: preserve-3d;
    animation: rotate-cube 6s infinite linear;
}

.face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.face.front {
    transform: translateZ(30px);
}

.face.back {
    transform: rotateY(180deg) translateZ(30px);
}

.face.right {
    transform: rotateY(90deg) translateZ(30px);
}

.face.left {
    transform: rotateY(-90deg) translateZ(30px);
}

.face.top {
    transform: rotateX(90deg) translateZ(30px);
}

.face.bottom {
    transform: rotateX(-90deg) translateZ(30px);
}

@keyframes rotate-cube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.brand-title {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}



/* 几何形状 */
.geometric-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: shape-float 4s ease-in-out infinite;
}

.circle-1 {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid white;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid white;
    bottom: 20%;
    right: 20%;
    animation-delay: 2s;
}

.triangle-1 {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid white;
    top: 60%;
    left: 20%;
    animation-delay: 1s;
}

.line-1 {
    width: 120px;
    height: 2px;
    background: white;
    top: 30%;
    left: 10%;
    transform: rotate(45deg);
    animation-delay: 1.5s;
}

.line-2 {
    width: 80px;
    height: 2px;
    background: white;
    bottom: 30%;
    right: 30%;
    transform: rotate(-30deg);
    animation-delay: 3s;
}

@keyframes shape-float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* 右侧面板 */
.right-panel {
    flex: 1;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

/* 表单头部 */
.form-header {
    text-align: center;
    margin-bottom: 40px;
}

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

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

/* 表单样式 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.input-field {
    position: relative;
}

.input-field input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-normal);
}

.input-field input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-light);
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--accent-color);
}

.eye-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-normal);
}

.input-field input:focus+.password-toggle+.input-border,
.input-field input:focus+.input-border {
    width: 100%;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
}

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-right: 8px;
    position: relative;
    transition: all var(--transition-fast);
}

.checkbox-container input[type="checkbox"]:checked+.checkmark {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.checkbox-container input[type="checkbox"]:checked+.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--secondary-color);
}

/* 登录按钮 */
.login-button {
    width: 100%;
    height: 52px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-button:active {
    transform: translateY(0);
}

.button-text {
    transition: opacity var(--transition-normal);
}

.button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.button-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.button-success svg {
    width: 24px;
    height: 24px;
    stroke-width: 3;
}

.login-button.loading .button-text {
    opacity: 0;
}

.login-button.loading .button-loader {
    opacity: 1;
}

.login-button.success .button-text {
    opacity: 0;
}

.login-button.success .button-success {
    opacity: 1;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}



/* 注册链接 */
.signup-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 16px;
}

.signup-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.signup-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* 底部备案 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 12px 0;
    z-index: 100;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

.beian-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.beian-info a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.beian-info a:hover {
    color: var(--accent-color);
}

.separator {
    color: var(--border-color);
}

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

    .right-panel {
        flex: 1;
        min-height: 100vh;
    }
}

@media (max-width: 768px) {
    .right-panel {
        padding: 20px;
    }

    .login-form-container {
        max-width: 100%;
    }

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

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

    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .right-panel {
        padding: 16px;
    }

    .login-form {
        gap: 20px;
    }

    .input-field input,
    .login-button {
        height: 48px;
    }

    .form-header {
        margin-bottom: 32px;
    }
}