/*
 * 全局样式
 * 用户认证系统样式文件
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #667eea;
    font-size: 24px;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.nav a:hover {
    color: #667eea;
}

/* 主要内容 */
.main {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 欢迎卡片 */
.welcome-card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 28px;
}

.welcome-card p {
    margin-bottom: 15px;
    font-size: 16px;
}

.feature-list {
    list-style: none;
    margin: 30px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.feature-list li {
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.action-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* 用户信息 */
.user-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
}

.user-info p {
    margin: 10px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.user-info p:last-child {
    border-bottom: none;
}

.user-info strong {
    color: #666;
    min-width: 100px;
    display: inline-block;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.8);
}

/* 认证页面样式 */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.auth-title {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 28px;
}

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

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

.form-group label {
    font-weight: 500;
    color: #444;
    font-size: 14px;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 复选框 */
.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 验证码 */
.captcha-wrapper {
    display: flex;
    gap: 10px;
}

.captcha-wrapper input {
    flex: 1;
}

.captcha-img {
    height: 46px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s;
}

.captcha-img:hover {
    border-color: #667eea;
}

/* 密码强度 */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
    border-radius: 3px;
}

.strength-fill.weak {
    width: 33%;
    background: #e74c3c;
}

.strength-fill.medium {
    width: 66%;
    background: #f39c12;
}

.strength-fill.strong {
    width: 100%;
    background: #27ae60;
}

.strength-text {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.strength-text span.weak {
    color: #e74c3c;
}

.strength-text span.medium {
    color: #f39c12;
}

.strength-text span.strong {
    color: #27ae60;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 提示框 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fde8e8;
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

.alert-success {
    background: #e8f8f5;
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

/* 认证页脚 */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .main {
        padding: 25px;
    }
    
    .welcome-card h2 {
        font-size: 22px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-title {
        font-size: 22px;
    }
}
