/* 登录页面样式 */
:root {
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #f093fb;
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-color: #4ade80;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(180deg, #01baef 0%, #398bf9 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

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

.floating-element {
    position: absolute;
    font-size: 2rem;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.floating-element.element-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element.element-2 {
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element.element-3 {
    top: 40%;
    left: 5%;
    animation-delay: 4s;
}

.floating-element.element-4 {
    top: 60%;
    right: 10%;
    animation-delay: 6s;
}

.floating-element.element-5 {
    bottom: 30%;
    left: 20%;
    animation-delay: 8s;
}

.floating-element.element-6 {
    bottom: 20%;
    right: 25%;
    animation-delay: 10s;
}

.floating-element.element-7 {
    top: 70%;
    left: 40%;
    animation-delay: 12s;
}

.floating-element.element-8 {
    top: 30%;
    right: 40%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-40px) rotate(-5deg);
        opacity: 0.15;
    }
    75% {
        transform: translateY(-20px) rotate(3deg);
        opacity: 0.1;
    }
}

/* 顶部导航 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo i {
    margin-right: 0.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.nav-link i {
    margin-right: 0.5rem;
}

/* 主容器 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    position: relative;
    z-index: 10;
}

.auth-wrapper {
    max-width: 500px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
    backdrop-filter: blur(10px);
}



/* 登录表单区域 */
.login-section {
    padding: 4rem;
    position: relative;
}



.login-form-container {
    max-width: 400px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

/* 表单样式 */
.auth-form {
    width: 100%;
}



.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
}

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

.input-wrapper input.error {
    border-color: var(--error-color);
}

.input-wrapper input.success {
    border-color: var(--success-color);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    z-index: 10;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    min-height: 1rem;
}

.help-text {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}







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

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

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

.checkbox-wrapper 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;
}

.agreement-checkbox {
    font-size: 0.875rem;
    line-height: 1.4;
}



.link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* 按钮样式 */
.auth-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-button {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-medium);
}

.guest-button {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: var(--shadow-medium);
    margin-bottom: 1rem;
}

.guest-button:hover {
    background: linear-gradient(135deg, #5a6268 0%, #3d4246 100%);
}



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

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

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-loader {
    display: none;
}

.auth-button.loading .button-text {
    display: none;
}

.auth-button.loading .button-loader {
    display: block;
}

/* 分隔线 */
.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: var(--bg-primary);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}





/* 提示消息 */
.alert-message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    max-width: 400px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;
}

.alert-content {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-message.success {
    border-left: 4px solid var(--success-color);
}

.alert-message.success .alert-icon {
    color: var(--success-color);
}

.alert-message.error {
    border-left: 4px solid var(--error-color);
}

.alert-message.error .alert-icon {
    color: var(--error-color);
}

.alert-message.warning {
    border-left: 4px solid var(--warning-color);
}

.alert-message.warning .alert-icon {
    color: var(--warning-color);
}

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



/* 响应式设计 */
@media (max-width: 1024px) {
    .login-section {
        padding: 3rem 2rem;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 6rem 1rem 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .logo span {
        display: none;
    }
    

    
    .login-section {
        padding: 2rem 1.5rem;
    }
    

    

    

    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .alert-message {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 5rem 0.5rem 0.5rem;
    }
    
    .auth-wrapper {
        border-radius: 0;
        min-height: 100vh;
    }
    

    
    .login-section {
        padding: 1.5rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    

}

/* 性能优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element {
        animation: none;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --bg-primary: #1f2937;
        --bg-secondary: #374151;
        --border-color: #4b5563;
    }
    
    .top-nav {
        background: rgba(31, 41, 55, 0.95);
    }
    
    .auth-wrapper {
        background: var(--bg-primary);
    }
    
    .input-wrapper input {
        background: var(--bg-primary);
        color: var(--text-primary);
    }
    
    .social-button {
        background: var(--bg-primary);
    }
    
    .alert-message {
        background: var(--bg-primary);
    }
    
    .divider span {
        background: var(--bg-primary);
    }
} 