/* ========================================
   糖心手工DIY与创意工坊 - 主样式表
   彩虹渐变+白底缤纷创意风格
   ======================================== */

:root {
  --u30: #FF6B6B;
  --a71: #4ECDC4;
  --u78: #FFFFFF;
  --z65: #F8F9FA;
  --t72: #45B7D1;
  --e38: #2D3436;
  --g71: 16px;
  --k58: 0 4px 20px rgba(255, 107, 107, 0.1);
  --x49: linear-gradient(135deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7);
  --q83: linear-gradient(135deg, #FF6B6B, #FFEAA7);
  --j89: linear-gradient(135deg, #4ECDC4, #45B7D1);
  --h93: linear-gradient(135deg, #96CEB4, #4ECDC4);
  --p69: 'Microsoft YaHei', '微软雅黑', sans-serif;
  --z7: 'PingFang SC', '苹方', 'Hiragino Sans GB', sans-serif;
  --j79: 'Courier New', monospace;
  --p18: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --d54: 1200px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--z7);
  color: var(--e38);
  background-color: var(--u78);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--a71);
}

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

/* ========== 导航栏 ========== */
._21e8l {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid transparent;
  border-image: var(--x49) 1;
  padding: 12px 0;
}

.h8c7g1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--d54);
  margin: 0 auto;
  padding: 0 20px;
}

.mv-wrap {
  font-family: var(--p69);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--x49);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qr-box {
  display: flex;
  list-style: none;
  gap: 24px;
}

.qr-box a {
  color: var(--e38);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: var(--p18);
}

.qr-box a:hover {
  background: var(--z65);
  color: var(--u30);
}

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

.g8p8v9 span {
  width: 24px;
  height: 2px;
  background: var(--e38);
  border-radius: 2px;
  transition: var(--p18);
}

/* ========== 首屏英雄区 ========== */
.fn-body {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fn-body::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, rgba(255,107,107,0.05), rgba(78,205,196,0.05), rgba(69,183,209,0.05), rgba(150,206,180,0.05), rgba(255,234,167,0.05), rgba(255,107,107,0.05));
  animation: rotate-bg 30s linear infinite;
}

@keyframes rotate-bg {
  to { transform: rotate(360deg); }
}

._0mfiy {
  position: relative;
  z-index: 1;
}

.bx-chip {
  font-family: var(--p69);
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--x49);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.e5n2t5 {
  font-size: 1.2rem;
  color: #636e72;
  max-width: 700px;
  margin: 0 auto 32px;
  line-height: 1.8;
}

.c3i8r8 {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--g71);
  overflow: hidden;
  box-shadow: var(--k58);
}

/* ========== 通用卡片 ========== */
.h2p4n1 {
  background: var(--z65);
  border-radius: var(--g71);
  padding: 24px;
  box-shadow: var(--k58);
  transition: var(--p18);
  border: 1px solid rgba(0,0,0,0.03);
}

.h2p4n1:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(255,107,107,0.15);
}

.c7f3v8 {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.zt-box {
  font-family: var(--p69);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--e38);
}

.a2n8n2 {
  font-size: 0.9rem;
  color: #636e72;
  line-height: 1.6;
}

/* ========== 栏目网格 ========== */
.b6n8x6 {
  font-family: var(--p69);
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}

.b6n8x6::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--x49);
  border-radius: 2px;
  margin: 12px auto 0;
}

._ak68a {
  text-align: center;
  color: #636e72;
  margin-bottom: 40px;
  font-size: 1rem;
}

.b1d2i4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

._onevu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.m1t1u7 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ========== 教程卡片 ========== */
.s8i1s5 {
  background: var(--u78);
  border-radius: var(--g71);
  overflow: hidden;
  box-shadow: var(--k58);
  transition: var(--p18);
  border: 1px solid rgba(0,0,0,0.03);
}

.s8i1s5:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(78,205,196,0.2);
}

.s8i1s5 .c7f3v8 img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.jm-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  flex-wrap: wrap;
}

.jm-note .i4j2i3 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.vw-list {
  background: rgba(255,107,107,0.1);
  color: var(--u30);
}

.y8s5m8 {
  background: rgba(78,205,196,0.1);
  color: var(--a71);
}

.x4c6j9 {
  background: rgba(69,183,209,0.1);
  color: var(--t72);
}

.s8i1s5 .b1c6d9 {
  padding: 0 20px 20px;
}

/* ========== 难度星级 ========== */
.w7h9f3 {
  display: inline-flex;
  gap: 2px;
}

.w7h9f3 .tx-tag {
  width: 16px;
  height: 16px;
  display: inline-block;
}

.w7h9f3 .tx-tag.a2p4b2 {
  color: #FFEAA7;
}

.w7h9f3 .tx-tag.m8i9k1 {
  color: #dfe6e9;
}

/* ========== 步骤流程 ========== */
.h5h4v3 {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  padding-left: 40px;
}

.h5h4v3::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--x49);
  border-radius: 2px;
}

._x112w {
  position: relative;
  background: var(--z65);
  border-radius: var(--g71);
  padding: 24px;
  opacity: 0;
  transform: translateX(20px);
  animation: step-appear 0.5s ease forwards;
}

._x112w:nth-child(1) { animation-delay: 0.1s; }
._x112w:nth-child(2) { animation-delay: 0.2s; }
._x112w:nth-child(3) { animation-delay: 0.3s; }
._x112w:nth-child(4) { animation-delay: 0.4s; }
._x112w:nth-child(5) { animation-delay: 0.5s; }

@keyframes step-appear {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mv-slot {
  position: absolute;
  left: -40px;
  top: 24px;
  width: 30px;
  height: 30px;
  background: var(--x49);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

._xx1i2 {
  font-size: 0.8rem;
  color: var(--a71);
  margin-top: 8px;
}

/* ========== 材料清单 ========== */
.q6a7d1 {
  background: var(--z65);
  border-radius: var(--g71);
  padding: 24px;
}

.q6a7d1 table {
  width: 100%;
  border-collapse: collapse;
}

.q6a7d1 th,
.q6a7d1 td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.9rem;
}

.q6a7d1 th {
  font-weight: 700;
  color: var(--e38);
  background: rgba(78,205,196,0.05);
}

.q6a7d1 .qr-mark {
  color: var(--u30);
  font-weight: 700;
  font-family: var(--j79);
}

/* ========== 作品展示瀑布流 ========== */
.bw-flow {
  columns: 3;
  column-gap: 20px;
}

.h9q7m1 {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--g71);
  overflow: hidden;
  box-shadow: var(--k58);
  transition: var(--p18);
}

.h9q7m1:hover {
  transform: scale(1.02);
}

.h9q7m1 img {
  width: 100%;
  display: block;
}

.h9q7m1 ._a3d8s {
  padding: 12px 16px;
  background: var(--u78);
}

/* ========== Before/After 对比 ========== */
._5qyem {
  position: relative;
  overflow: hidden;
  border-radius: var(--g71);
  cursor: col-resize;
}

._5qyem img {
  width: 100%;
  display: block;
}

._5qyem ._h77gb {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  overflow: hidden;
}

._5qyem .l8c9b5 {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  cursor: col-resize;
}

/* ========== 按钮 ========== */
.c7f2p9 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--p18);
}

.xz-flow {
  background: var(--x49);
  color: white;
  box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.xz-flow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,107,0.4);
  color: white;
}

.wd-slot {
  background: var(--z65);
  color: var(--e38);
  border: 2px solid rgba(0,0,0,0.05);
}

.wd-slot:hover {
  border-color: var(--u30);
  color: var(--u30);
}

/* ========== 面包屑 ========== */
.mv-head {
  padding: 16px 0;
  font-size: 0.85rem;
  color: #636e72;
}

.mv-head a {
  color: #636e72;
}

.mv-head a:hover {
  color: var(--u30);
}

.mv-head ._acthj {
  margin: 0 8px;
}

/* ========== 页脚 ========== */
.k5f3h6 {
  background: var(--e38);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
  margin-top: 80px;
}

._ua3r0 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.dk-head {
  font-family: var(--p69);
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.rp-body {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
}

._gulrg {
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  font-size: 1rem;
}

.y2m4d4 {
  list-style: none;
}

.y2m4d4 li {
  margin-bottom: 10px;
}

.y2m4d4 a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: var(--p18);
}

.y2m4d4 a:hover {
  color: var(--a71);
}

._ohafz {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

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

.q2g2i4 {
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 20px 0;
}

._hvfw3 {
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.v7r4h1 {
  margin-top: 12px;
  color: #636e72;
  line-height: 1.8;
  font-size: 0.95rem;
  display: none;
}

.q2g2i4.active .v7r4h1 {
  display: block;
}

/* ========== 搜索页 ========== */
.s4o5h9 {
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
}

.s4o5h9 input {
  width: 100%;
  padding: 16px 24px;
  padding-right: 50px;
  border: 2px solid var(--z65);
  border-radius: 30px;
  font-size: 1rem;
  outline: none;
  transition: var(--p18);
}

.s4o5h9 input:focus {
  border-color: var(--u30);
  box-shadow: 0 0 0 4px rgba(255,107,107,0.1);
}

.s4o5h9 button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: var(--x49);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ========== 页面区块间距 ========== */
._lt18q {
  padding: 60px 0;
}

.m6u2d7 {
  background: var(--z65);
  padding: 60px 0;
}

/* ========== 标签 ========== */
._qo1qb {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255,107,107,0.08);
  color: var(--u30);
  margin: 2px 4px;
}

.bx-mark {
  background: rgba(150,206,180,0.15);
  color: #00b894;
}

.u8h1j7 {
  background: rgba(69,183,209,0.15);
  color: var(--t72);
}

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

@keyframes bounce-check {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

._eznmg {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

._eznmg.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== 404页面 ========== */
.o8l9f9 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.z8g6n9 {
  font-size: 8rem;
  font-weight: 900;
  background: var(--x49);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .bx-chip {
    font-size: 2rem;
  }

  .e5n2t5 {
    font-size: 1rem;
  }

  .qr-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    gap: 8px;
  }

  .qr-box.active {
    display: flex;
  }

  .g8p8v9 {
    display: flex;
  }

  .b1d2i4, ._onevu, .m1t1u7 {
    grid-template-columns: 1fr;
  }

  ._ua3r0 {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .bw-flow {
    columns: 1;
  }

  .b6n8x6 {
    font-size: 1.5rem;
  }

  .h5h4v3 {
    padding-left: 30px;
  }

  ._lt18q {
    padding: 40px 0;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  ._onevu {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .bw-flow {
    columns: 2;
  }

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

/* ========== 挑战赛模块 ========== */
._mbpz8 {
  background: var(--x49);
  border-radius: var(--g71);
  padding: 40px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

._mbpz8::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse-bg 4s ease-in-out infinite;
}

@keyframes pulse-bg {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

._1lq7s {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.a2s2k8 {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 20px;
  position: relative;
}

._ls9rf {
  text-align: center;
}

._ls9rf ._0a4xd {
  font-size: 2rem;
  font-weight: 800;
}

._ls9rf .tx-mark {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ========== 工坊卡片 ========== */
.hp-list {
  background: var(--u78);
  border-radius: var(--g71);
  overflow: hidden;
  box-shadow: var(--k58);
  transition: var(--p18);
}

.hp-list:hover {
  transform: translateY(-4px);
}

.zt-wrap {
  padding: 20px;
  background: var(--j89);
  color: white;
}

._d12z4 {
  padding: 20px;
}

/* ========== 工具推荐 ========== */
._g55ni {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--z65);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: var(--p18);
}

._g55ni:hover {
  background: rgba(78,205,196,0.05);
  border-color: var(--a71);
}

._l2udw {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* ========== 下载页 ========== */
.bw-tag {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 40px 0;
}

._ogfjv {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--z65);
  border-radius: var(--g71);
}

.zt-foot {
  width: 48px;
  height: 48px;
  background: var(--x49);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .bw-tag {
    grid-template-columns: 1fr;
  }
}
