/* ============================================
   糖心穿搭日记与时尚社区 - 核心样式表
   黑白极简+玫瑰金高级时尚风格
   ============================================ */

:root {
  --primary: #B76E79;
  --primary-light: #D4949C;
  --primary-dark: #8E4F58;
  --secondary: #F4E4E4;
  --bg: #FFFFFF;
  --card: #FAFAFA;
  --accent: #000000;
  --text: #1A1A1A;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #EEEEEE;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 1px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 20px rgba(183,110,121,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Songti SC', 'SimSun', 'Noto Serif SC', serif;
  --font-brand: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.8;
  overflow-x: hidden;
}

/* 排版 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.4;
  color: var(--accent);
  letter-spacing: 0.02em;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 品牌名样式 */
.brand-name {
  font-family: var(--font-brand);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-weight: 300;
}

/* 容器 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--primary);
  margin: 1rem auto 0;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* 头部导航 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-brand);
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.site-logo span {
  color: var(--primary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text);
  letter-spacing: 0.05em;
  position: relative;
  padding: 0.3rem 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  transition: var(--transition);
}

/* 首屏 Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-height) + 2rem) 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-content {
  max-width: 700px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 200;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 2;
  margin-bottom: 2rem;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--bg);
}

/* OOTD 网格 */
.ootd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ootd-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  transition: var(--transition);
  aspect-ratio: 3/4;
}

.ootd-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.ootd-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ootd-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--bg);
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
}

.ootd-card:hover .ootd-overlay {
  opacity: 1;
  transform: translateY(0);
}

.ootd-author {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.ootd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ootd-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  backdrop-filter: blur(4px);
}

/* 穿搭公式卡 */
.formula-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  transition: var(--transition);
}

.formula-card:hover {
  box-shadow: var(--shadow-hover);
}

.formula-item {
  text-align: center;
  min-width: 80px;
}

.formula-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 0 auto 0.5rem;
}

.formula-item span {
  font-size: 0.8rem;
  color: var(--text-light);
}

.formula-plus {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 200;
}

.formula-equals {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 200;
}

/* 品牌标签云 */
.brand-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 2rem 0;
}

.brand-tag {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text);
  transition: var(--transition);
  cursor: pointer;
}

.brand-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--secondary);
}

.brand-tag .price-range {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* 达人榜 */
.fashionista-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.fashionista-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.fashionista-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.fashionista-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--secondary);
}

.fashionista-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.fashionista-info .style-tag {
  font-size: 0.8rem;
  color: var(--primary);
}

.fashionista-info .fans {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 卡片通用 */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* 二手闲置 */
.secondhand-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.secondhand-item:hover {
  border-color: var(--primary);
}

.secondhand-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
}

.secondhand-info {
  flex: 1;
}

.secondhand-price {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 500;
}

.secondhand-condition {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.1rem 0.5rem;
  background: var(--secondary);
  border-radius: 2px;
  display: inline-block;
}

/* 面包屑 */
.breadcrumb {
  padding: 1rem 0;
  margin-top: var(--header-height);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 0.5rem;
}

/* 页脚 */
.site-footer {
  background: var(--accent);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--bg);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  padding: 0.3rem 0;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
}

.footer-bottom .brand-name {
  color: var(--primary-light);
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.faq-question {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--primary);
  transition: var(--transition);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding-top: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.8;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* 搜索 */
.search-box {
  max-width: 600px;
  margin: 2rem auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-results {
  margin-top: 2rem;
}

.search-result-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.search-result-item h3 a {
  color: var(--accent);
}

.search-result-item p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* 身材匹配工具 */
.body-match-tool {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.body-match-tool label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.body-match-tool input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.body-match-tool input:focus {
  border-color: var(--primary);
}

/* 挑战模块 */
.challenge-banner {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}

.challenge-banner .challenge-theme {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.challenge-banner .challenge-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 视差效果 */
.parallax-section {
  position: relative;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  top: -20%;
  left: 0;
  right: 0;
  bottom: -20%;
  z-index: -1;
}

.parallax-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}

/* 页面内容区 */
.page-content {
  padding-top: var(--header-height);
  min-height: calc(100vh - 300px);
}

.page-header {
  padding: 3rem 0;
  text-align: center;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.page-body {
  padding: 3rem 0;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-light);
  margin: 0.2rem;
  transition: var(--transition);
}

.tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 内链模块 */
.related-links {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-links h3 {
  margin-bottom: 1rem;
}

.related-links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.related-links li a {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text);
  transition: var(--transition);
}

.related-links li a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--secondary);
}

/* 合规页面 */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.legal-content h2 {
  margin-top: 2rem;
}

.legal-content p, .legal-content li {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 2;
}

.legal-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

/* 404 页面 */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-page h1 {
  font-size: 8rem;
  font-weight: 100;
  color: var(--primary);
  line-height: 1;
}

.error-page p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin: 1rem 0 2rem;
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* 响应式 */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.1rem; }

  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .hero {
    min-height: 80vh;
  }

  .hero-title {
    font-size: 2rem;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: var(--transition);
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .ootd-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .fashionista-list {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .formula-card {
    padding: 1rem;
  }

  .formula-item img {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .ootd-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}

/* 打印样式 */
@media print {
  .site-header,
  .site-footer,
  .nav-toggle {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }
}
