/* 基础样式 */
:root {
    --male-primary: #3498db;
    --male-secondary: #2980b9;
    --female-primary: #e84393;
    --female-secondary: #fd79a8;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #1abc9c;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --gray: #95a5a6;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--male-primary), var(--male-secondary));
    color: white;
}

.btn-female {
    background: linear-gradient(135deg, var(--female-primary), var(--female-secondary));
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #c0392b);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #27ae60);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--male-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-control.error {
    border-color: var(--danger);
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--dark);
}

/* 消息提示 */
.alert {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--info);
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--male-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.2em;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
}

.modal-body {
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    .btn {
        padding: 8px 16px;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* 在现有main.css末尾添加以下样式 */

/* 错误提示样式 */
.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.input-error {
    border-color: #e74c3c !important;
    background-color: #fff5f5;
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
}

.input-success {
    border-color: #2ecc71 !important;
}

.success-message {
    color: #2ecc71;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 5px;
}

.success-message::before {
    content: '✓';
}

/* 输入提示 */
.input-hint {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-hint::before {
    content: '💡';
}

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

.strength-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.strength-text {
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
}

/* 建议列表 */
.suggestions-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    border-left: 3px solid #3498db;
}

.suggestions-list ul {
    margin: 0;
    padding-left: 20px;
}

.suggestions-list li {
    margin-bottom: 5px;
}

.suggestions-list li:last-child {
    margin-bottom: 0;
}

/* 加载动画 */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .strength-indicator {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .suggestions-list {
        font-size: 11px;
    }
}

/* 表单验证状态 */
.form-control:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
}

.form-control:valid:not(:focus):not(:placeholder-shown) {
    border-color: #2ecc71;
}

/* 禁用按钮样式 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    box-shadow: none !important;
}