:root {
  --canvas: #09090b;
  --surface: #18181b;
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #14b8a6;
  --accent-hover: #0d9488;
  --hairline: #27272a;
  --skeleton-base: #27272a;
  --skeleton-sheen: #3f3f46;
  --radius-sm: 6px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: var(--canvas);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.75rem;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

/* Pong */
.pong-toggle-btn {
  padding: 0.5rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background-color: var(--accent);
  color: #09090b;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.45);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.pong-toggle-btn:hover {
  background-color: #2dd4bf;
  border-color: #2dd4bf;
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(45, 212, 191, 0.65);
}

.pong-toggle-btn.is-active {
  background-color: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}

.pong-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.pong-scoreboard {
  position: fixed;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background-color: rgba(24, 24, 27, 0.9);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.pong-paddle {
  position: fixed;
  width: 14px;
  height: 100px;
  border-radius: 7px;
  background-color: var(--accent);
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.6);
  will-change: transform;
}

.pong-ball {
  position: fixed;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #f4f4f5;
  box-shadow: 0 0 16px rgba(244, 244, 245, 0.85);
  will-change: transform;
}

.pong-hit {
  outline: 2px solid var(--accent) !important;
  box-shadow: 0 0 18px rgba(20, 184, 166, 0.55) !important;
  transition: outline 0.15s ease, box-shadow 0.15s ease;
}

@keyframes score-glow-pulse {
  0% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 0 rgba(45, 212, 191, 0);
  }
  40% {
    transform: translateX(-50%) scale(1.18);
    box-shadow: 0 0 28px rgba(45, 212, 191, 0.95), 0 0 10px rgba(255, 255, 255, 0.8);
    border-color: #2dd4bf;
  }
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  }
}

.pong-scoreboard.is-scoring {
  animation: score-glow-pulse 0.65s ease-out;
}

.pong-score-popup {
  position: fixed;
  transform: translateX(-50%);
  color: #5eead4;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  text-shadow: 0 0 14px rgba(45, 212, 191, 0.95), 0 0 5px #ffffff;
  pointer-events: none;
  z-index: 10000;
  animation: score-popup-float 0.85s ease-out forwards;
}

.pong-edge-flash {
  position: fixed;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 9998;
}

.pong-light-ray {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0% 50%;
  filter: blur(4px);
  border-radius: 999px;
  animation: light-ray-shoot 0.55s ease-out forwards;
}

.pong-edge-flash.is-left .pong-light-ray {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(239, 68, 68, 0.85) 28%, transparent 100%);
}

.pong-edge-flash.is-right .pong-light-ray {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(45, 212, 191, 0.85) 28%, transparent 100%);
}

@keyframes light-ray-shoot {
  0% {
    opacity: 0;
    transform: rotate(var(--ray-angle)) scaleX(0.2);
  }
  20% {
    opacity: 1;
    transform: rotate(var(--ray-angle)) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--ray-angle)) scaleX(1.25);
  }
}

.footer-arcade-bar {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-chip {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background-color: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.8rem;
}

@keyframes score-popup-float {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.7);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -4px) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -34px) scale(1);
  }
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--ink);
}

.icon-btn:focus-visible,
.add-to-cart-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Main */
.page-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 3.5rem 5rem;
}

.intro-band {
  padding-bottom: 2.5rem;
  margin-bottom: 3.75rem;
  border-bottom: 1px solid var(--hairline);
}

.intro-band h1 {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 22ch;
  margin-bottom: 0.75rem;
}

.intro-band p {
  color: var(--muted);
  max-width: 58ch;
  font-size: 1rem;
}

.catalog-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.catalog-bar h2 {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.catalog-status {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 4.5rem 3.5rem;
}

.money-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background-color: var(--surface);
  border: 1px solid var(--hairline);
  color: #2dd4bf;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.add-to-cart-btn.is-owned {
  background-color: #27272a;
  color: #a1a1aa;
  cursor: default;
}

/* Product Card */
.product-card {
  background-color: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.product-card:hover {
  border-color: #a1a1aa;
}

.product-card.fade-in {
  animation: fadeInItem 0.45s ease forwards;
}

@keyframes fadeInItem {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-image {
  width: 100%;
  height: 76px;
  object-fit: contain;
  display: block;
  background-color: #121215;
  padding: 0.25rem;
  border-bottom: 1px solid var(--hairline);
}

.product-body {
  padding: 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.25rem;
}

.product-title {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.product-description {
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--hairline);
}

.product-price {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

.add-to-cart-btn {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.add-to-cart-btn:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Skeleton Loader */
.skeleton-card {
  background-color: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    var(--skeleton-base) 25%,
    var(--skeleton-sheen) 50%,
    var(--skeleton-base) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.skeleton-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skeleton-line {
  height: 13px;
  border-radius: 4px;
}

.skeleton-line.title {
  width: 68%;
  height: 17px;
}

.skeleton-line.short {
  width: 48%;
}

.skeleton-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
}

.skeleton-price {
  width: 60px;
  height: 18px;
  border-radius: 4px;
}

.skeleton-btn {
  width: 110px;
  height: 32px;
  border-radius: var(--radius-sm);
}

/* Scroll & Footer */
.scroll-sentinel {
  height: 24px;
  margin-top: 1rem;
}

.end-message {
  text-align: center;
  color: var(--muted);
  margin-top: 2rem;
  font-size: 0.92rem;
}

.hidden {
  display: none;
}

.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card.fade-in,
  .skeleton-shimmer {
    animation: none;
  }
}
