/* =====================================================
   Chem_In_Life
   Elegant Beige + Refined Purple System
   ===================================================== */

/* ================== 颜色系统 ================== */

:root{
  /* 背景体系 */
  --bg: #cbc0ae;          /* 主背景米色 */
  --card: #f8f5ef;        /* 卡片暖白 */
  --border: #e4dbcf;      /* 边框色 */
  --shadow: 0 8px 22px rgba(0,0,0,0.08);
  --radius: 16px;

  /* 三层紫色文字体系 */
  --heading: #2a1f3a;     /* 标题层 */
  --text: #3b2952;        /* 正文层 */
  --muted: #7c6a99;       /* 次级说明层 */

  /* 品牌紫 */
  --brand: #654a86;       /* 主紫 */
  --brand-light: #8a73a8; /* hover紫 */
}

/* ================== 全局基础 ================== */

*{
  box-sizing: border-box;
}

body{
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* 容器 */
.container{
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 40px 0 70px;
}

/* ================== Navbar（升级版） ================== */

.nav{
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(203, 192, 174, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-bottom: 1px solid rgba(101, 74, 134, 0.25);
  box-shadow: 0 12px 30px rgba(101,74,134,0.08);
}

/* 底部渐变紫色线 */
.nav::after{
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(101,74,134,0.15),
    var(--brand),
    rgba(101,74,134,0.15)
  );
}

.nav-inner{
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Brand */
.brand{
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.3px;
  color: var(--brand);
  text-decoration: none;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 8px 14px;
  border-radius: 999px;

  background: rgba(248,245,239,0.75);
  border: 1px solid rgba(101,74,134,0.18);
  box-shadow: 0 8px 18px rgba(101,74,134,0.08);
}

.brand .dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, var(--brand));
  box-shadow: 0 0 0 3px rgba(101,74,134,0.15);
}

/* Links */
.links{
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.links a{
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--brand);

  padding: 8px 16px;
  border-radius: 999px;

  background: rgba(248,245,239,0.6);
  border: 1px solid rgba(101,74,134,0.18);

  transition: all 0.2s ease;
}

/* Hover */
.links a:hover{
  transform: translateY(-1px);
  background: var(--brand-light);
  color: white;
  box-shadow: 0 10px 20px rgba(101,74,134,0.15);
}

/* Active */
.links a.active{
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: white;
  box-shadow: 0 12px 25px rgba(101,74,134,0.25);
}

/* ================== 卡片 ================== */

.card{
  background: var(--card);
  border-radius: var(--radius);
  padding: 45px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ================== 标题体系 ================== */

h1{
  color: var(--heading);
  font-size: 32px;
  margin-bottom: 25px;
}

p{
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}

/* ================== 视频播放器 ================== */

.video-wrap{
  margin-top: 25px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(101,74,134,0.08);
}

video{
  width: 100%;
  display: block;
}

/* ================== 首页视频缩略图 ================== */

.video-row{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-top: 50px;
}

.video-card{
  width: 180px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.video-card img{
  width: 100%;
  border-radius: 14px;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  box-shadow: 0 8px 18px rgba(101,74,134,0.12);
}

.video-card img:hover{
  border-color: var(--brand);
  transform: scale(1.06);
}

.video-title{
  margin-top: 10px;
  font-size: 14px;
  color: var(--text);
}

/* ================== Footer ================== */

.footer{
  text-align: center;
  margin-top: 60px;
  font-size: 14px;
  color: var(--muted);
}

/* ================== 响应式优化 ================== */

@media (max-width: 768px){

  .card{
    padding: 30px;
  }

  .links a{
    font-size: 13px;
    padding: 7px 13px;
  }

  h1{
    font-size: 26px;
  }

}
