:root {
  --bg: #080911;
  --bg-elevated: #0f1221;
  --surface: #131729;
  --surface-hover: #1a2038;
  --border: #232946;
  --border-hover: #4c3d8f;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dim: rgba(124, 58, 237, 0.16);
  --green: #22c55e;
  --green-bright: #4ade80;
  --green-dim: rgba(34, 197, 94, 0.14);
  --accent: #f43f5e;
  --accent-dim: rgba(244, 63, 94, 0.15);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.15);
  --ring: #a78bfa;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.32);
  --shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 58, 237, 0.35);
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Noto Sans TC", sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Noto Sans TC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 45% at 50% -10%, rgba(124, 58, 237, 0.18), transparent 70%),
    radial-gradient(ellipse 50% 30% at 85% 5%, rgba(34, 197, 94, 0.08), transparent 60%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.skip-link:focus { left: 16px; }
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 9, 17, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed 0%, #22c55e 100%);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.45);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: #fff;
  font-weight: 800;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease;
  touch-action: manipulation;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.nav-links a.active {
  background: var(--primary-dim);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.45);
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.lang-switcher .lang-globe {
  color: var(--muted);
  margin: 0 4px 0 6px;
}
.lang-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 34px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease;
}
.lang-switcher a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.lang-switcher a.current {
  background: var(--primary);
  color: #fff;
}

/* Main */
main { flex: 1; padding: 36px 0 72px; }

/* Hero */
.hero {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 32px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--green-dim);
  color: var(--green-bright);
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

/* Stats Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 24px auto 0;
}
.stat-pill {
  background: rgba(19, 23, 41, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}
.stat-value.is-green { color: var(--green-bright); }
.stat-value.is-violet { color: var(--primary-light); }
.stat-value.is-amber { color: var(--amber); }
.stat-label {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}

/* Featured Spotlight Banner */
.spotlight {
  margin-top: 28px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14) 0%, rgba(19, 23, 41, 0.95) 55%, rgba(34, 197, 94, 0.1) 100%);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
}
@media (max-width: 820px) {
  .spotlight { grid-template-columns: 1fr; }
}
.spotlight-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0d18;
  overflow: hidden;
}
.spotlight-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}
.spotlight:hover .spotlight-media img { transform: scale(1.03); }
.spotlight-body {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.spotlight-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  line-height: 1.22;
  font-weight: 800;
}
.spotlight-desc {
  color: var(--text-secondary);
  font-size: 0.94rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sections */
.section { margin-top: 52px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}
.section-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--primary-dim);
  color: var(--primary-light);
}
.section-icon.is-green { background: var(--green-dim); color: var(--green-bright); }
.section-icon.is-amber { background: var(--amber-dim); color: var(--amber); }
.section-sub { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
.count-pill {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Filter Pills */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.filter-btn {
  min-height: 40px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
  touch-action: manipulation;
}
.filter-btn:hover { border-color: var(--border-hover); color: var(--text); }
.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
}

/* Grid & Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0c0f1d;
  overflow: hidden;
  cursor: pointer;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}
.card:hover .card-media img { transform: scale(1.04); }
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,9,17,0.35) 0%, transparent 45%, rgba(19,23,41,0.65) 100%);
  pointer-events: none;
}
.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}
.badge-free { background: rgba(34, 197, 94, 0.95); color: #052e16; }
.badge-key { background: rgba(59, 130, 246, 0.95); color: #fff; }
.badge-limited { background: rgba(245, 158, 11, 0.95); color: #1c1917; }
.badge-upcoming { background: rgba(124, 58, 237, 0.95); color: #fff; }
.badge-ended { background: rgba(71, 85, 105, 0.92); color: #f8fafc; }
.badge-platform { background: rgba(8, 9, 17, 0.85); color: #e2e8f0; border: 1px solid rgba(255, 255, 255, 0.14); }
.badge-savings { background: rgba(244, 63, 94, 0.95); color: #fff; }

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
}
.card-title a:hover { color: var(--green-bright); }
.card-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.price-strike { text-decoration: line-through; color: #64748b; margin-right: 6px; }
.price-free { color: var(--green-bright); font-weight: 800; }
.price-ended { color: #94a3b8; font-weight: 800; }
.price-sale { color: var(--amber); font-weight: 800; font-size: 1.02rem; }
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--amber);
  font-weight: 700;
  font-size: 0.8rem;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 120ms ease, filter 180ms ease, background 180ms ease, border-color 180ms ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #03210e;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.28);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-deal {
  flex: 1;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.28);
}
.btn-deal:hover { filter: brightness(1.08); }
.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); color: #fff; background: var(--surface-hover); }
.btn-save { padding: 10px 12px; }
.btn-save.saved {
  border-color: var(--green);
  color: var(--green-bright);
  background: var(--green-dim);
}

/* Detail Page */
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 40px;
  margin-bottom: 18px;
  transition: color 150ms ease;
}
.breadcrumb:hover { color: var(--text); }
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 880px) {
  .detail-layout { grid-template-columns: 1fr; }
}
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.detail-hero { aspect-ratio: 16 / 9; background: #0c0f1d; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-content { padding: 26px; }
.detail-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  margin: 12px 0 14px;
  line-height: 1.22;
}
.facts-box {
  margin-top: 22px;
  padding: 20px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.facts-box h2 { font-family: var(--font-display); font-size: 1.08rem; margin-bottom: 12px; }
.facts-grid { display: grid; gap: 10px; }
.fact-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}
.fact-row:last-child { border-bottom: none; padding-bottom: 0; }
.fact-row dt { color: var(--muted); font-weight: 600; }
.fact-row dd { color: var(--text); word-break: break-word; }
@media (max-width: 560px) {
  .fact-row { grid-template-columns: 1fr; gap: 2px; }
}

.detail-steps {
  margin-top: 24px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.25);
}
.detail-steps h2 { font-family: var(--font-display); font-size: 1.08rem; margin-bottom: 10px; }
.detail-steps ol { padding-left: 20px; color: var(--text-secondary); font-size: 0.94rem; }
.detail-steps li { margin-bottom: 8px; }
.notice-ended {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fecdd3;
  font-size: 0.92rem;
  margin: 14px 0;
}

/* FAQ & Legal */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color 180ms ease;
}
.faq-item[open] { border-color: var(--border-hover); }
.faq-item summary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--primary-light);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--text-secondary); font-size: 0.94rem; margin-top: 12px; }

.prose {
  max-width: 780px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.prose h1 { font-family: var(--font-display); font-size: 1.85rem; margin-bottom: 18px; }
.prose p { color: var(--text-secondary); margin-bottom: 14px; font-size: 0.98rem; }

/* Ad Slots */
.ad-slot { margin: 28px 0; text-align: center; }
.ad-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 6px;
}
.ad-custom-link img {
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Empty State */
.empty-box {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--primary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #06070d;
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 14px; }
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }
.footer-disclosure { font-size: 0.78rem; color: #64748b; line-height: 1.5; }

@media (max-width: 768px) {
  .container { padding: 0 14px; }
  .header-inner {
    min-height: 54px;
    padding: 8px 0;
    gap: 8px;
  }
  .brand { font-size: 1.12rem; }
  .brand-mark { width: 30px; height: 30px; font-size: 0.8rem; }
  .nav-links {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 6px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a {
    white-space: nowrap;
    min-height: 36px;
    padding: 6px 11px;
    font-size: 0.84rem;
  }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn { white-space: nowrap; flex-shrink: 0; }
  main { padding: 22px 0 56px; }
  .hero { margin-bottom: 22px; }
  .section { margin-top: 36px; }
  .detail-content { padding: 18px; }
  .prose { padding: 20px; }
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .stats-strip { gap: 8px; }
  .stat-pill { padding: 10px 8px; }
  .stat-value { font-size: 1.1rem; }
  .card-grid { grid-template-columns: 1fr; gap: 16px; }
  .spotlight-body { padding: 18px; }
}

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