/* 男性穿搭指南 - 全局样式 */
:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --accent-hover: #2980b9;
    --bg: #f5f6fa;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e1e8ed;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* === 认证页面 === */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container { width: 100%; max-width: 420px; padding: 20px; }

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px 32px;
}

.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header h1 { font-size: 28px; margin-bottom: 8px; }
.auth-header p { color: var(--text-light); font-size: 14px; }

.auth-form { display: none; }
.auth-form.active { display: block; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.auth-switch a { color: var(--accent); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.form-message {
    min-height: 20px;
    font-size: 13px;
    margin-bottom: 12px;
    color: var(--danger);
}

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

/* === Dashboard === */
.dashboard-page { background: var(--bg); }

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 60px;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow);
}

.nav-brand { font-size: 18px; font-weight: 700; }
.nav-user { display: flex; align-items: center; gap: 12px; }
.user-email { font-size: 14px; opacity: 0.9; }

.admin-badge {
    background: var(--warning);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.btn-logout:hover { background: rgba(255,255,255,0.3); }

.dashboard-container { display: flex; min-height: calc(100vh - 60px); }

.sidebar {
    width: 220px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 16px 0;
    flex-shrink: 0;
}

.sidebar-item {
    display: block;
    padding: 12px 24px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-item:hover { background: var(--bg); }
.sidebar-item.active { background: rgba(52,152,219,0.08); border-left-color: var(--accent); color: var(--accent); font-weight: 600; }

.main-content { flex: 1; padding: 32px; overflow-y: auto; }

.content-section { display: none; }
.content-section.active { display: block; }

.content-section h2 { margin-bottom: 24px; font-size: 24px; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-value { font-size: 32px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.stat-label { font-size: 14px; color: var(--text-light); }

/* 快速操作 */
.quick-actions { background: var(--card-bg); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.quick-actions h3 { margin-bottom: 16px; }

.btn-action {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 12px;
    margin-bottom: 8px;
    transition: all 0.2s;
}
.btn-action:hover { border-color: var(--accent); color: var(--accent); }

/* 表单 */
.data-form { background: var(--card-bg); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); max-width: 800px; }
.form-row { display: flex; gap: 16px; margin-bottom: 4px; }
.form-row .form-group { flex: 1; }

/* 推荐结果 */
.recommendation-results { margin-top: 24px; }

.rec-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.rec-card h4 { color: var(--accent); margin-bottom: 12px; }
.rec-items { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.rec-item { background: var(--bg); padding: 8px 16px; border-radius: 8px; font-size: 14px; }
.rec-item strong { color: var(--primary); }

/* 趋势 */
.trends-results { margin-top: 24px; }
.trend-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trend-type-badge {
    background: var(--accent);
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* 衣橱 */
.wardrobe-results { margin-top: 24px; }
.wardrobe-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 管理后台 */
.admin-panel { background: var(--card-bg); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.admin-status { background: var(--bg); border-radius: 8px; padding: 16px; margin-bottom: 20px; font-family: monospace; font-size: 13px; }
.admin-users { margin-top: 16px; }

/* 加载动画 */
.loading { text-align: center; padding: 40px; color: var(--text-light); }
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 响应式 */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-item { padding: 12px; text-align: center; font-size: 18px; }
    .sidebar-item span { display: none; }
    .form-row { flex-direction: column; }
    .main-content { padding: 16px; }
}
