/* 认证页面公共样式 */
body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container {
    width: 100%;
    max-width: 500px;
    padding: 15px;
    margin: auto;
    animation: fadeIn 0.5s ease-in-out;
}

.auth-card {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

.auth-card:hover {
    transform: translateY(-5px);
}

.auth-card-body {
    padding: 40px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    color: #667eea;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.auth-form .form-control,
.auth-form .auth-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
}

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

/* 错误消息样式 */
.auth-alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-alert.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.auth-alert ul {
    margin: 0;
    padding-left: 20px;
}

.auth-alert li {
    margin-bottom: 5px;
}

/* 表单组样式 */
.auth-form-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-form-group.has-error {
    margin-bottom: 15px;
}

.auth-form-group.has-error .auth-form-control {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.auth-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* 错误状态样式 */
.auth-form-control.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.auth-form-control.success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

.auth-error-text {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* 按钮样式 */
.auth-btn-primary {
    width: 100%;
    padding: 14px 20px;
    background-color: #667eea;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn-primary:hover:not(:disabled) {
    background-color: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.auth-btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 链接样式 */
.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-link-text {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* 密码强度指示器样式 */
.password-strength-container {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    width: 100%;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-bottom: 5px;
    overflow: hidden;
}

.password-strength-indicator {
    height: 100%;
    width: 0;
    background-color: #dc3545;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.password-strength-text {
    font-size: 12px;
    color: #6c757d;
}

/* 密码强度等级样式 */
.strength-weak .password-strength-indicator {
    width: 25%;
    background-color: #dc3545;
}

.strength-medium .password-strength-indicator {
    width: 50%;
    background-color: #ffc107;
}

.strength-good .password-strength-indicator {
    width: 75%;
    background-color: #17a2b8;
}

.strength-strong .password-strength-indicator {
    width: 100%;
    background-color: #28a745;
}

.strength-weak .password-strength-text {
    color: #dc3545;
}

.strength-medium .password-strength-text {
    color: #ffc107;
}

.strength-good .password-strength-text {
    color: #17a2b8;
}

.strength-strong .password-strength-text {
    color: #28a745;
}

/* 协议复选框样式 */
.terms-container {
    margin-bottom: 25px;
}

.terms-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.terms-label input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 2px;
    cursor: pointer;
    transform: scale(1.1);
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* 加载状态样式 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式样式 */
@media (max-width: 576px) {
    .auth-card-body {
        padding: 25px;
    }
    
    .auth-logo h1 {
        font-size: 20px;
    }
    
    .auth-btn-primary {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .terms-label {
        font-size: 13px;
    }
}
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.auth-form .form-control::placeholder {
    font-size: 12px;
    color: #999;
    font-style: normal;
    letter-spacing: 0.05em;
}

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

/* 错误状态样式 */
.auth-form .form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.auth-form .form-control.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

.auth-form .error-text {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* 表单提示文本 */
.hint-text {
    color: #6c757d;
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

/* 输入框成功状态 */
.form-control.success {
    border-color: #2ecc71;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.25);
}

.form-control.success:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.25);
}

.auth-form .form-group {
    margin-bottom: 20px;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 0;
    background-color: transparent;
    transition: all 0.3s ease;
}

.auth-form .form-group.has-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.auth-form .form-group:hover {
    border-color: #e0e0e0;
    background-color: #ffffff;
}

.auth-form .form-label {
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    width: 100%;
    display: block;
    text-align: left;
}

.auth-form .form-control-wrapper {
    flex: 1;
    min-width: 0;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 20px;
}

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

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

/* 密码强度指示器样式 */
.password-strength-container {
    margin-top: 5px;
}

.password-strength-bar {
    height: 4px;
    width: 100%;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-bottom: 5px;
    overflow: hidden;
}

.password-strength-indicator {
    height: 100%;
    width: 0;
    background-color: #dc3545;
    transition: width 0.3s, background-color 0.3s;
}

.password-strength-text {
    font-size: 12px;
    color: #6c757d;
}

/* 密码强度等级样式 */
.strength-weak .password-strength-indicator {
    width: 25%;
    background-color: #dc3545;
}

.strength-medium .password-strength-indicator {
    width: 50%;
    background-color: #ffc107;
}

.strength-good .password-strength-indicator {
    width: 75%;
    background-color: #17a2b8;
}

.strength-strong .password-strength-indicator {
    width: 100%;
    background-color: #28a745;
}

.strength-weak .password-strength-text {
    color: #dc3545;
}

.strength-medium .password-strength-text {
    color: #ffc107;
}

.strength-good .password-strength-text {
    color: #17a2b8;
}

.strength-strong .password-strength-text {
    color: #28a745;
}

/* 协议复选框样式 */
.terms-container {
    margin-bottom: 15px;
}

.terms-container label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.terms-container input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

/* 加载状态样式 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.auth-alert {
    border-radius: 8px;
    margin-bottom: 20px;
}

.auth-title {
    color: #333;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 个人中心页面样式 */
.profile-container {
    padding: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-info {
    flex: 1;
    min-width: 250px;
}

.profile-info h2 {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.profile-info p {
    color: #666;
    margin-bottom: 8px;
}

.stats-card {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stats-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 编辑个人资料页面样式 */
.edit-profile-container {
    padding: 20px;
}

.avatar-upload {
    position: relative;
    margin-top: 10px;
}

.avatar-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

.avatar-upload label {
    display: inline-block;
    cursor: pointer;
}

.btn-sm {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

.edit-profile-form {
    margin-top: 20px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.edit-profile-form .form-group {
    margin-bottom: 15px;
    flex: 1;
    min-width: 200px;
}



.edit-profile-form .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.edit-profile-form .form-control {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.edit-profile-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    outline: none;
}

.edit-profile-form .form-control-file {
    margin-top: 5px;
}

.edit-profile-form .form-text {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.password-section {
    margin-top: 15px;
    padding-top: 10px;
}

/* 保存按钮上边距 */
.profile-actions a {
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    margin-top: 30px;
}

.password-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.btn-primary {
    background-color: #667eea;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background-color: #e2e8f0;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 85, 104, 0.2);
}

.btn-danger,
.btn-danger.btn-primary {
    background-color: #e53e3e;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
}

.btn-danger:hover {
    background-color: #c53030;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

/* 卡片样式统一 */
.card {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-body {
    padding: 20px !important;
}

.card-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h3 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-actions {
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
}