/* 问价WJOO - 年轻化前端样式 */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --accent: #f472b6;
    --accent-dark: #ec4899;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #94a3b8;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-warm: linear-gradient(135deg, #f472b6 0%, #fb923c 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 12px rgba(99,102,241,.12);
    --shadow-lg: 0 12px 40px rgba(99,102,241,.15);
    --radius: 16px;
    --radius-sm: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

/* 顶部导航 */
.navbar {
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226,232,240,.6);
    padding: 0 28px;
    display: flex; align-items: center; height: 64px;
    position: sticky; top: 0; z-index: 50;
}
.navbar .logo { font-size: 20px; font-weight: 800; color: var(--primary); margin-right: 36px; letter-spacing: -.5px; }
.navbar a.nav-link { color: var(--muted); margin-right: 20px; font-weight: 500; font-size: 14px; padding: 6px 12px; border-radius: 8px; transition: all .2s; }
.navbar a.nav-link:hover { color: var(--primary); background: rgba(99,102,241,.06); }
.navbar a.nav-link.active { color: var(--primary); background: rgba(99,102,241,.08); font-weight: 600; }
.navbar .spacer { flex: 1; }
.navbar .points-badge { background: var(--gradient); color: #fff; border-radius: 20px; padding: 5px 14px; margin-left: 16px; font-size: 13px; font-weight: 600; }
.nav-greeting { color: var(--text); font-weight: 600; margin-right: 10px; font-size: 14px; }
.auth-badge { display: inline-flex; align-items: center; gap: 6px; background: #d1fae5; color: #059669; border-radius: 20px; padding: 4px 12px; margin-right: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; vertical-align: middle; }

.container { max-width: 1100px; margin: 32px auto; padding: 0 20px; }
.card { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); margin-bottom: 24px; border: 1px solid rgba(226,232,240,.5); }
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }

/* 表单 */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.form-group { display: flex; flex-direction: column; margin-bottom: 14px; }
.form-group label { margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
input[type=text], input[type=password], input[type=number], select, textarea {
    border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; outline: none; min-width: 200px; transition: all .2s; background: #fafbfc;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.1); background: #fff; }
textarea { width: 100%; resize: vertical; }

.btn {
    display: inline-block; border: none; border-radius: var(--radius-sm); padding: 10px 24px; font-size: 14px; font-weight: 600; cursor: pointer;
    background: var(--gradient); color: #fff; transition: all .25s; box-shadow: 0 2px 8px rgba(99,102,241,.25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.35); color: #fff; }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 2px 8px rgba(16,185,129,.25); }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 2px 8px rgba(245,158,11,.25); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 2px 8px rgba(239,68,68,.25); }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; }
.btn-outline:hover { background: rgba(99,102,241,.04); box-shadow: 0 2px 8px rgba(99,102,241,.1); }

/* 提示 */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; background: #fff; }
table.data-table th, table.data-table td { border-bottom: 1px solid var(--border); padding: 12px 14px; text-align: left; white-space: nowrap; }
table.data-table th { background: #f8fafc; color: var(--muted); font-weight: 600; font-size: 13px; }
table.data-table tr:hover td { background: #faf5ff; }
td.multi, th.multi { white-space: normal; min-width: 160px; }
.stars { color: #f59e0b; letter-spacing: 2px; }
.price { color: var(--danger); font-weight: 700; font-size: 15px; }
.tag { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.tag-pending { background: #fef3c7; color: #92400e; }
.tag-approved { background: #d1fae5; color: #065f46; }
.tag-rejected { background: #fee2e2; color: #991b1b; }
.points-plus { color: var(--success); font-weight: bold; }
.points-minus { color: var(--danger); font-weight: bold; }

/* 分页 */
.pagination { margin-top: 18px; display: flex; gap: 6px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 7px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: #fff; font-weight: 500; transition: all .2s; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--gradient); color: #fff; border-color: transparent; }

/* 搜索区 */
.search-hero {
    background: var(--gradient);
    border-radius: 24px;
    padding: 48px 36px 40px;
    color: #fff;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.search-hero::before {
    content: '';
    position: absolute; top: -50%; right: -20%; width: 400px; height: 400px;
    background: rgba(255,255,255,.08); border-radius: 50%;
}
.search-hero::after {
    content: '';
    position: absolute; bottom: -30%; left: -10%; width: 300px; height: 300px;
    background: rgba(255,255,255,.05); border-radius: 50%;
}
.search-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 6px; letter-spacing: -1px; position: relative; z-index: 1; }
.search-hero p { opacity: .9; margin-bottom: 24px; position: relative; z-index: 1; }
.search-box {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end;
    position: relative; z-index: 1;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.search-box .form-group { margin-bottom: 0; }
.search-box input, .search-box select { border-radius: var(--radius-sm); }
.hint { color: var(--muted); font-size: 13px; margin-top: 12px; }

.empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 15px; }
.footer { text-align: center; color: var(--muted); padding: 28px 0; font-size: 13px; }

/* 管理后台 */
.admin-layout { display: flex; min-height: 100vh; }
.admin-side { width: 210px; background: #1e1b4b; color: #c4b5fd; padding-top: 20px; flex-shrink: 0; }
.admin-side .logo { color: #fff; font-size: 17px; font-weight: 700; padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-side a { display: block; padding: 12px 20px; color: #c4b5fd; font-weight: 500; transition: all .2s; }
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { flex: 1; padding: 24px; background: #f1f5f9; }
.stat-cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px 24px; flex: 1; min-width: 160px; box-shadow: var(--shadow-sm); border: 1px solid rgba(226,232,240,.5); }
.stat-card .num { font-size: 28px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .label { color: var(--muted); font-size: 13px; margin-top: 4px; }

.login-box { max-width: 400px; margin: 80px auto; }
.inline-form { display: inline-block; }
.inline-form .btn { margin-right: 4px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 贡献页特色 */
.contribute-hero {
    background: var(--gradient-warm);
    border-radius: 24px;
    padding: 40px 36px;
    color: #fff;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.contribute-hero::before {
    content: '';
    position: absolute; top: -40%; right: -15%; width: 350px; height: 350px;
    background: rgba(255,255,255,.1); border-radius: 50%;
}
.contribute-hero h1 { font-size: 28px; font-weight: 800; position: relative; z-index: 1; }
.contribute-hero p { opacity: .9; position: relative; z-index: 1; margin-top: 8px; }

/* 动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.card { animation: fadeInUp .4s ease; }
.search-hero { animation: fadeInUp .5s ease; }

/* 响应式 */
@media (max-width: 768px) {
    .navbar { padding: 0 16px; height: 56px; }
    .navbar .logo { font-size: 17px; margin-right: 16px; }
    .navbar a.nav-link { margin-right: 10px; font-size: 13px; padding: 4px 8px; }
    .container { margin: 16px auto; padding: 0 12px; }
    .search-hero { padding: 32px 20px; border-radius: 18px; }
    .search-hero h1 { font-size: 24px; }
    .search-box { padding: 16px; gap: 10px; flex-direction: column; }
    .search-box .form-group { width: 100%; }
    .search-box input, .search-box select { width: 100%; min-width: unset; }
    .form-row { flex-direction: column; }
    .card { padding: 20px; border-radius: 14px; }
}
