/* ===================================================
   瑜伽裤百科 (Yugaku.Wiki) — 全局样式表 v2.0
   设计理念：暖糯治愈 · 轻盈有质感
   =================================================== */

/* ===== 0. 字体引入 ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

/* ===== 1. CSS变量 ===== */
:root {
    --bg: #faf8f5;
    --bg-card: #ffffff;
    --text: #2d2a24;
    --text-light: #777;
    --text-muted: #999;
    --border: #eee;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);

    /* 品牌色 —— 暖调粉金体系 */
    --pink: #e94560;
    --pink-light: #fce4e8;
    --pink-dark: #c23152;
    --blue-dark: #0f3460;
    --blue-darker: #1a1a2e;
    --gold: #f5a623;
    --gold-light: #fef3d5;
    --gold-dark: #d4891a;
    --green: #2ecc71;
    --green-light: #e8f8ef;
    --purple: #9b59b6;
    --purple-light: #f0e6f6;

    --tag-serious-bg: #e8f0fe;
    --tag-serious-text: #1a73e8;
    --tag-fun-bg: #fef3e2;
    --tag-fun-text: #e67e22;

    --gap: 24px;
    --radius: 16px;
    --radius-sm: 8px;
}

/* ===== 2. 基础重置 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

a { color: var(--pink); text-decoration: none; transition: all 0.2s; }
a:hover { text-decoration: none; opacity: 0.8; }

/* ===== 4. 滚动条美化 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bbb; }

/* ===== 5. 导航栏 ===== */
.header {
    background: linear-gradient(135deg, var(--blue-darker), var(--blue-dark));
    color: #fff;
    padding: 14px 0;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.logo { font-size: 22px; font-weight: 900; letter-spacing: 0.5px; }
.logo a {
    background: linear-gradient(90deg, var(--pink), var(--gold), var(--pink));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}
.logo a:hover { text-decoration: none; }
@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}
.logo .subtitle {
    font-weight: 400; font-size: 12px;
    -webkit-text-fill-color: #8899aa;
    margin-left: 6px;
}
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.nav a {
    color: #ccd6e0; font-size: 13px; font-weight: 500;
    padding: 4px 0; transition: all 0.25s;
    border-bottom: 2px solid transparent;
    position: relative; white-space: nowrap;
}

/* ===== 登录按钮 ===== */
.login-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 16px; border-radius: 40px;
    background: rgba(233,69,96,0.15); border: 1px solid rgba(233,69,96,0.25);
    color: #e94560; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
}
.login-btn:hover { background: rgba(233,69,96,0.25); }
.user-menu {
    display: none; align-items: center; gap: 8px; cursor: pointer;
}
.user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #e94560, #f5a623);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.user-name { font-size: 12px; color: #ccd6e0; }
.nav a::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 0; height: 2px; background: var(--gold);
    transition: width 0.3s ease;
}
.nav a:hover { color: #fff; text-decoration: none; }
.nav a:hover::after { width: 100%; }
.nav a.active { color: #fff; border-bottom-color: var(--pink); }
.nav a.active::after { width: 100%; background: var(--pink); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

@media (max-width: 768px) {
    .header .container { flex-direction: column; }

    .nav { justify-content: center; gap: 6px; }
    .nav a { font-size: 12px; }
}
@media (max-width: 480px) {
    .nav a { font-size: 11px; gap: 4px; }
    .logo { font-size: 16px; }
    .logo .subtitle { display: none; }
}

/* ===== 6. 页面标题区 Hero ===== */
.page-hero {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-darker));
    color: #fff;
    padding: 64px 0 52px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '🧘‍♀️🧘‍♀️🧘‍♀️🧘‍♀️🧘‍♀️🧘‍♀️';
    position: absolute; top: -20px; right: -20px;
    font-size: 80px; opacity: 0.04; transform: rotate(15deg);
    pointer-events: none;
}
.page-hero h1 { font-size: 42px; font-weight: 900; margin-bottom: 12px; letter-spacing: -0.5px; }
.page-hero h1 em {
    background: linear-gradient(90deg, var(--pink), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    font-style: normal;
}
.page-hero p { color: #99aabb; font-size: 17px; max-width: 600px; margin: 0 auto; line-height: 1.7; }

@media (max-width: 768px) {
    .page-hero { padding: 48px 0 36px; }
    .page-hero h1 { font-size: 28px; }
    .page-hero p { font-size: 15px; }
}

/* ===== 7. Section 标题 ===== */
.section-title {
    text-align: center; padding: 48px 0 32px;
}
.section-title h2 { font-size: 28px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.3px; }
.section-title p { color: var(--text-light); font-size: 15px; }
.emoji-badge {
    display: inline-block; padding: 3px 14px; border-radius: 12px;
    font-size: 12px; font-weight: 600; margin-bottom: 10px;
}
.badge-serious { background: var(--tag-serious-bg); color: var(--tag-serious-text); }
.badge-fun { background: var(--tag-fun-bg); color: var(--tag-fun-text); }

/* ===== 8. 卡片网格 ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gap);
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid var(--border);
    cursor: default;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: #ddd;
}

.card-img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}
.card-img::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.2));
    pointer-events: none;
}

.card-content { padding: 20px; }

.tag {
    display: inline-block; padding: 2px 10px; border-radius: 6px;
    font-size: 12px; font-weight: 600; margin-bottom: 8px;
    transition: all 0.2s;
}
.tag-serious { background: var(--tag-serious-bg); color: var(--tag-serious-text); }
.tag-fun { background: var(--tag-fun-bg); color: var(--tag-fun-text); }
.tag-hot { background: var(--pink); color: #fff; }
.card-content h3 { font-size: 17px; margin-bottom: 6px; line-height: 1.4; }
.card-content p { font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* ===== 9. 卡片点击跳转版本 ===== */
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { text-decoration: none; color: inherit; }

/* ===== 10. 表格 ===== */
.table-wrap {
    overflow-x: auto; margin: 24px 0;
    background: #fff; border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8f6f3; font-weight: 600; color: var(--text); font-size: 13px; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: #faf8f5; }

/* ===== 11. 底部 Footer ===== */
.footer {
    text-align: center;
    padding: 48px 0 40px;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
    background: linear-gradient(180deg, transparent, #f5f0ea);
}
.footer-links {
    display: flex; gap: 20px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap;
}
.footer-links a { color: #888; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--pink); }
.footer .disclaimer {
    background: #fff3cd; color: #856404; padding: 10px 16px; border-radius: 8px;
    max-width: 600px; margin: 16px auto; font-size: 13px;
    border: 1px solid #faeccd;
}

/* ===== 12. 按钮 ===== */
.btn {
    display: inline-block; padding: 10px 28px; border-radius: 40px;
    font-weight: 600; font-size: 15px; transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none; cursor: pointer; text-decoration: none;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); text-decoration: none; }
.btn:active { transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--pink), var(--pink-dark));
    color: #fff;
}
.btn-primary:hover { box-shadow: 0 8px 25px rgba(233,69,96,0.35); }
.btn-outline {
    background: transparent; color: var(--pink); border: 2px solid var(--pink);
}
.btn-outline:hover {
    background: var(--pink); color: #fff; box-shadow: 0 8px 25px rgba(233,69,96,0.25);
}

/* ===== 13. 侧栏 + 内容布局 ===== */
.content-layout { display: flex; gap: 32px; margin: 32px 0; align-items: flex-start; }
.sidebar {
    width: 220px; flex-shrink: 0; position: sticky; top: 90px;
    background: #fff; border-radius: var(--radius); padding: 20px;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.sidebar h4 {
    font-size: 12px; color: var(--text-muted); margin-bottom: 12px;
    text-transform: uppercase; letter-spacing: 2px;
}
.sidebar a {
    display: block; padding: 7px 0; font-size: 14px; color: #555;
    transition: all 0.15s; border-bottom: 1px solid transparent;
}
.sidebar a:hover { color: var(--pink); text-decoration: none; padding-left: 4px; }
.main-content { flex: 1; min-width: 0; }

@media (max-width: 900px) {
    .content-layout { flex-direction: column; }
    .sidebar { width: 100%; position: static; }
}

/* ===== 14. Brand detail ===== */
.brand-detail {
    background: #fff; border-radius: var(--radius);
    padding: 32px; margin-bottom: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}
.brand-detail:hover { box-shadow: var(--shadow); }
.brand-detail h2 { font-size: 24px; margin-bottom: 4px; }
.brand-detail .brand-sub {
    color: var(--text-light); font-size: 14px; margin-bottom: 16px;
}
.brand-detail .brand-desc { font-size: 15px; margin-bottom: 16px; line-height: 1.8; }
.brand-detail .highlight {
    background: linear-gradient(135deg, #fff8e1, #fffef5);
    padding: 16px 20px; border-radius: 12px; margin: 12px 0;
    border-left: 3px solid var(--gold);
}
.brand-detail .highlight strong { color: var(--gold-dark); }

/* ===== 15. 面料实验室 ===== */
.fabric-compare {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--gap); margin: 24px 0;
}
.fabric-item {
    background: #fff; border-radius: var(--radius); padding: 24px;
    border: 1px solid var(--border); transition: all 0.25s;
}
.fabric-item:hover { border-color: #ddd; box-shadow: var(--shadow); }
.fabric-item h3 { margin-bottom: 8px; font-size: 17px; }
.fabric-item .meter {
    height: 8px; border-radius: 4px; margin: 8px 0; background: #eee;
    overflow: hidden;
}
.fabric-item .meter-bar { height: 100%; border-radius: 4px; transition: width 0.5s; }
.fabric-item .props { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fabric-item .props span {
    background: #f5f3f0; padding: 3px 10px; border-radius: 20px;
    font-size: 12px; color: #555;
}

/* ===== 16. 整活区 ===== */
.fun-section {
    background: linear-gradient(135deg, var(--blue-darker), #2d1b4e);
    padding: 48px 0; margin: 40px 0; color: #fff;
}
.fun-card {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius); padding: 28px;
    transition: all 0.25s; backdrop-filter: blur(4px);
}
.fun-card:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.fun-card h3 { font-size: 18px; margin-bottom: 8px; }
.fun-card p { color: #99aabb; font-size: 14px; }
.fun-card .votes {
    display: flex; gap: 16px; align-items: center; margin-top: 16px;
    font-size: 14px; color: #8899aa;
}

/* ===== 17. 养护秘籍 ===== */
.tip-card {
    background: #fff; border-radius: var(--radius); padding: 20px 24px;
    border-left: 4px solid var(--pink); margin-bottom: 16px;
    border: 1px solid var(--border); transition: all 0.2s;
}
.tip-card:hover { box-shadow: var(--shadow); }
.tip-card.do { border-left-color: var(--green); }
.tip-card.dont { border-left-color: var(--pink); }
.tip-card h4 { font-size: 16px; margin-bottom: 4px; }

/* ===== 18. 统计卡片 ===== */
.stat-card {
    background: #fff; border-radius: 12px; padding: 20px; text-align: center;
    box-shadow: var(--shadow); border: 1px solid var(--border);
    transition: all 0.25s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-card .num { font-size: 28px; font-weight: 800; }
.stat-card .label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* ===== 19. 滚动入场动画 ===== */
.fade-in {
    opacity: 0; transform: translateY(24px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== 20. 回到顶部 ===== */
.back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--pink-dark));
    color: #fff; border: none; cursor: pointer;
    font-size: 20px; display: none; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
    transition: all 0.25s; z-index: 99;
}
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(233,69,96,0.4); }

/* ===== 21. 响应式 ===== */
@media (max-width: 768px) {
    .page-hero h1 { font-size: 28px; }
    .header .container { flex-direction: column; }
    .nav { justify-content: center; gap: 6px; }
    .grid { grid-template-columns: 1fr; }
    .footer-links { gap: 12px; }
}
@media (max-width: 480px) {
    .card { border-radius: 12px; }
    .brand-detail { padding: 20px; }
}

/* ===== 22. 小工具 ===== */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }

/* ===== 23. 选中文本颜色 ===== */
::selection { background: var(--pink); color: #fff; }
::-moz-selection { background: var(--pink); color: #fff; }

/* ===== 24. Skeleton loading (占位闪烁) ===== */
@keyframes skeleton-loading {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}
