﻿@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --blue: #0a84ff;
  --green: #30d158;
  --indigo: #5e5ce6;
  --orange: #ff9f0a;
  --pink: #ff375f;
  --purple: #bf5af2;
  --teal: #40c8e0;
  --bg: #f2f2f7;
  --elev: #ffffff;
  --elev-2: rgba(255, 255, 255, 0.72);
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.6);
  --label-3: rgba(60, 60, 67, 0.3);
  --sep: rgba(60, 60, 67, 0.14);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.2);
  --radius: 22px;
  --nav-h: 58px;
  --spring: cubic-bezier(0.32, 1.35, 0.36, 1);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --elev: #1c1c1e;
    --elev-2: rgba(28, 28, 30, 0.72);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, 0.6);
    --label-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(84, 84, 88, 0.6);
    --fill: rgba(120, 120, 128, 0.24);
    --fill-2: rgba(120, 120, 128, 0.36);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --elev: #1c1c1e;
  --elev-2: rgba(28, 28, 30, 0.72);
  --label: #ffffff;
  --label-2: rgba(235, 235, 245, 0.6);
  --label-3: rgba(235, 235, 245, 0.3);
  --sep: rgba(84, 84, 88, 0.6);
  --fill: rgba(120, 120, 128, 0.24);
  --fill-2: rgba(120, 120, 128, 0.36);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Helvetica Neue", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(10, 132, 255, 0.08), transparent 60%),
    radial-gradient(760px 480px at 96% 0%, rgba(191, 90, 242, 0.07), transparent 58%),
    var(--bg);
  color: var(--label);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { display: block; }

::selection { background: rgba(10, 132, 255, 0.28); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lab-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: calc(var(--nav-h) + var(--safe-top));
  padding: var(--safe-top) clamp(12px, 3vw, 24px) 0;
  background: var(--elev-2);
  border-bottom: 0.5px solid var(--sep);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.nav-back,
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--blue);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-back:hover,
.theme-btn:hover { background: var(--fill); }
.nav-back:active,
.theme-btn:active { transform: scale(0.95); }

.nav-back svg { width: 17px; height: 17px; }

.nav-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
}

.theme-btn {
  justify-self: end;
  color: var(--label-2);
  font-size: 13px;
  font-weight: 500;
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.demo-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + var(--safe-top) + 30px) clamp(16px, 4vw, 40px) calc(72px + var(--safe-bottom));
}

.demo-head { max-width: 760px; }

.demo-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chip-accent {
  background: rgba(10, 132, 255, 0.14);
  color: var(--blue);
}

.demo-head h1 {
  margin: 0;
  font-size: clamp(34px, 5.6vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.demo-en {
  display: block;
  margin-top: 8px;
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--label-3);
}

.demo-lead {
  max-width: 54ch;
  margin: 18px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--label-2);
}

.demo-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(68vh, 660px);
  margin-top: 28px;
  padding: clamp(18px, 4vw, 48px);
  border-radius: 32px;
  background: var(--elev);
  border: 1px solid var(--sep);
  box-shadow: 0 34px 70px -44px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.demo-stage--plain {
  display: block;
  place-items: normal;
  justify-items: stretch;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 13.5px;
  line-height: 1.6;
}

.demo-note strong {
  flex: none;
  color: var(--label);
  font-weight: 600;
}

.demo-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.pager-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--elev);
  border: 1px solid var(--sep);
  text-decoration: none;
  transition: transform 0.3s var(--spring), background 0.2s ease;
}

.pager-card:hover { transform: translateY(-2px); background: var(--elev); }
.pager-card span { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label-3); }
.pager-card strong { font-size: 15px; font-weight: 600; }
.pager-next { align-items: flex-end; text-align: right; }
.pager-card.is-empty { opacity: 0; pointer-events: none; }

.seg {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  background: var(--fill);
  gap: 2px;
}

.seg button {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--label-2);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.seg button[aria-selected="true"] { color: var(--label); font-weight: 600; }
.seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.seg-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  border-radius: 8px;
  background: var(--elev);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.42s var(--spring), width 0.42s var(--spring);
  pointer-events: none;
}

.ios-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 13px;
  background: var(--fill);
  color: var(--label);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--spring), filter 0.2s ease, background 0.2s ease;
}

.ios-btn:hover { filter: brightness(0.97); }
.ios-btn:active { transform: scale(0.96); }
.ios-btn--primary { background: var(--blue); color: #fff; }
.ios-btn--tint { background: rgba(10, 132, 255, 0.14); color: var(--blue); }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 3px;
  background: var(--fill-2);
  outline: none;
  cursor: pointer;
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.range::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.glass {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.demo-head,
.demo-note,
.demo-pager {
  animation: lab-in 0.75s var(--ease) both;
}

.demo-stage {
  animation: lab-fade 0.7s ease both;
  animation-delay: 0.08s;
}

.demo-note { animation-delay: 0.14s; }
.demo-pager { animation-delay: 0.18s; }

@keyframes lab-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes lab-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.index-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + var(--safe-top) + 46px) clamp(16px, 4vw, 40px) calc(80px + var(--safe-bottom));
}

.index-hero { max-width: 820px; }

.index-eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
}

.index-hero h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 82px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.index-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--blue), var(--purple) 55%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.index-lead {
  max-width: 56ch;
  margin: 22px 0 0;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.8;
  color: var(--label-2);
}

.index-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 14px;
  background: var(--elev);
  border: 1px solid var(--sep);
}

.stat-pill strong { font-size: 19px; letter-spacing: -0.02em; }
.stat-pill span { font-size: 12px; color: var(--label-2); }

.index-tools {
  position: sticky;
  top: calc(var(--nav-h) + var(--safe-top));
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 44px 0 22px;
  padding: 12px 0;
  background: var(--bg);
  box-shadow: 0 10px 18px -20px rgba(0, 0, 0, 0.5);
}

.filter-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.filter-wrap::-webkit-scrollbar { display: none; }

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(278px, 1fr));
  gap: 16px;
}

.style-card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: 24px;
  background: var(--elev);
  border: 1px solid var(--sep);
  text-decoration: none;
  transition: transform 0.4s var(--spring), box-shadow 0.4s ease, opacity 0.3s ease;
  animation: card-in 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

.style-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -30px rgba(0, 0, 0, 0.5);
}

.style-card:active { transform: scale(0.985); }
.style-card.is-hidden { display: none; }

.thumb {
  position: relative;
  height: 152px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--c1), var(--c2));
  isolation: isolate;
}

.thumb::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.55), transparent 46%),
    radial-gradient(circle at 75% 70%, rgba(255, 255, 255, 0.22), transparent 40%);
  filter: blur(22px);
  transition: transform 0.7s var(--ease);
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.5;
}

.style-card:hover .thumb::before { transform: scale(1.15) rotate(4deg); }

.thumb-glyph {
  position: absolute;
  right: 14px;
  bottom: 2px;
  font-size: 66px;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.34);
  z-index: 1;
  line-height: 1;
}

.thumb-num {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.9);
}

.card-body { display: block; padding: 14px 6px 6px; }

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.card-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--label-3);
  text-transform: uppercase;
}

.card-era { font-size: 11px; color: var(--label-3); }

.card-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.card-title span { font-size: 12px; font-weight: 500; color: var(--label-3); }

.card-desc {
  display: block;
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--label-2);
}

.card-go {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 0.5px solid var(--sep);
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 210px;
  height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--fill);
  color: var(--label-2);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--label);
}

.search input::placeholder { color: var(--label-3); }
.search svg { width: 16px; height: 16px; flex: none; }

.index-empty {
  display: none;
  padding: 60px 20px;
  text-align: center;
  color: var(--label-2);
}

.index-empty.is-visible { display: block; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .demo-main { padding-top: calc(var(--nav-h) + var(--safe-top) + 22px); }
  .demo-stage {
    border-radius: 26px;
    min-height: min(64vh, 560px);
    padding: 18px 14px;
  }
  .demo-pager { grid-template-columns: 1fr; }
  .pager-next { align-items: flex-start; text-align: left; }
  .index-tools { margin-top: 32px; }
  .search { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
