@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --background: #070c17;
  --foreground: #f8fafc;
  --card: rgba(17, 24, 39, 0.88);
  --muted-foreground: #94a3b8;
  --border: rgba(148, 163, 184, 0.18);
  --accent: #34d399;
  --info: #60a5fa;
  --warning: #fbbf24;
  --critical: #f87171;
  --focus-ring: #93c5fd;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
  --radius: 22px;
  --font-sans: "Fira Sans", "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  background:
    radial-gradient(circle at 8% 0%, rgba(96, 165, 250, 0.18), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(52, 211, 153, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(7, 12, 23, 0.96), rgba(11, 18, 32, 0.98));
}

.index-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 32px 20px 24px;
}

.index-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.index-title {
  margin: 0;
  color: var(--foreground);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.index-subtitle {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.index-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.12);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.index-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.style-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.78));
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.36);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.style-card:hover,
.style-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.48);
}

.style-card::before {
  content: "";
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--info), var(--accent), transparent);
}

.style-card header {
  display: grid;
  gap: 6px;
}

.style-card h2 {
  margin: 0;
  color: var(--foreground);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.style-card p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.6;
}

.style-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.style-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #04140d;
  background: linear-gradient(135deg, #34d399, #60a5fa);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.style-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(52, 211, 153, 0.18);
}

.style-meta {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 12px;
}

.index-footer {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--muted-foreground);
  background: var(--card);
  font-size: 14px;
}

.index-footer p {
  margin: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  color: #04140d;
  background: var(--accent);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .index-shell {
    padding: 18px 12px 16px;
  }

  .index-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .style-card footer {
    align-items: stretch;
    flex-direction: column;
  }

  .style-link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
