/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
    color: #34495e;
    font-size: 0.9rem;
}

.logout-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    color: white;
    text-decoration: none;
}

.auth-links {
    display: flex;
    gap: 0.8rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4c93);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
    color: white;
    text-decoration: none;
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

/* 主要内容区域 */
.main {
    padding: 0.5rem 0;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.welcome-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.welcome-section p {
    font-size: 1rem;
    color: #7f8c8d;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.feature-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 认证页面样式 - 重新设计 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.05"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.05"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, #667eea, #764ba2, #667eea);
    border-radius: 17px;
    z-index: -1;
    opacity: 0.1;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 登录标签页 - 重新设计 */
.login-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ecf0f1;
    background: #f8f9fa;
    position: relative;
}

.login-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-btn {
    flex: 1;
    padding: 0.8rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #7f8c8d;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tab-btn:hover:not(.active) {
    background: #ecf0f1;
    color: #2c3e50;
}

/* 表单样式 - 重新设计 */
.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.3rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.2rem;
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2c3e50;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #bdc3c7;
}

/* 验证码输入组 */
.code-input-group {
    display: flex;
    gap: 0.8rem;
}

.code-input-group input {
    flex: 1;
}

.code-input-group .btn {
    white-space: nowrap;
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
}

/* 图片验证码 */
.captcha-group {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.captcha-group input {
    flex: 1;
}

.captcha-image {
    position: relative;
    display: flex;
    align-items: center;
}

.captcha-canvas {
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    background: #f8f9fa;
}

.refresh-btn {
    position: absolute;
    right: -40px;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: scale(1.05);
}

/* 认证页面底部 */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ecf0f1;
}

.auth-footer a {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.auth-footer a:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.divider {
    margin: 0 0.8rem;
    color: #bdc3c7;
}

/* 消息提示 - 重新设计 */
.message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    pointer-events: none;
}

.message.success {
    background: linear-gradient(135deg, #d5f4e6, #c8f7c5);
    color: #27ae60;
    border: 1px solid #a8e6cf;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

.message.error {
    background: linear-gradient(135deg, #fadbd8, #f8d7da);
    color: #e74c3c;
    border: 1px solid #f5b7b1;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .features-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .welcome-section h2 {
        font-size: 1.8rem;
    }
    
    .welcome-section p {
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
}

/* 加载动画 */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ecf0f1;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 额外美化 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.strength-item {
    margin: 0.2rem 0;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.strength-item.valid {
    color: #27ae60;
    background-color: rgba(39, 174, 96, 0.1);
    opacity: 1;
}

.strength-item.invalid {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

.password-strength-bar {
    height: 3px;
    border-radius: 2px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.password-strength-bar.weak {
    background: linear-gradient(90deg, #e74c3c 0%, #e74c3c 33%, #ecf0f1 33%, #ecf0f1 100%);
}

.password-strength-bar.medium {
    background: linear-gradient(90deg, #f39c12 0%, #f39c12 66%, #ecf0f1 66%, #ecf0f1 100%);
}

.password-strength-bar.strong {
    background: linear-gradient(90deg, #27ae60 0%, #27ae60 100%);
}

/* 高级输入框效果 */
.form-group input:not(:placeholder-shown) {
    background: white;
    border-color: #bdc3c7;
}

.form-group input:not(:placeholder-shown):focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 微妙的动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.6s ease-out;
}

.feature-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

/* 通用页面底部样式 */
.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    padding: 15px 0;
    z-index: 1300; /* 高于 main-content(1001)，避免被遮挡 */
}

.footer-copyright {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

.footer-copyright p {
    margin: 3px 0;
}

.beian-info a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.beian-info a:hover {
    color: #2563eb;
    text-decoration: underline;
} 