* { box-sizing: border-box; }

:root {
  --bg-top: #26242e;
  --bg-bottom: #121116;
  --card-top: #34313f;
  --card-bottom: #24222b;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eceef2;
  --text-dim: #a9aeb8;
  --text-faint: #7d828c;
  --free: #3fbf6f;
  --free-dark: #2a9a55;
  --paid: #f0b429;
  --paid-dark: #c98a0a;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { background: var(--bg-bottom); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(139, 92, 246, 0.22), transparent 70%),
    radial-gradient(900px 700px at 100% 100%, rgba(168, 85, 247, 0.10), transparent 70%),
    radial-gradient(800px 600px at 0% 60%, rgba(99, 102, 241, 0.08), transparent 70%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  padding: 48px 0 36px;
  text-align: center;
}
.suite-banner {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 180px;
  margin: 0 auto;
  border-radius: 16px;
}
.site-header p {
  margin: 8px 0 0;
  color: var(--text-dim);
}

/* Grid */
.plugins {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

/* Card */
.plugin {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--card-top) 0%, var(--card-bottom) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 10px 30px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.plugin:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 16px 40px rgba(0, 0, 0, 0.35);
}
.plugin.is-choosing {
  transform: scale(1.02);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 20px 50px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.plugin-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: filter 0.5s var(--ease-out), transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
}
.plugin.is-choosing .plugin-content {
  filter: blur(8px) saturate(0.8);
  transform: scale(1.04);
  opacity: 0.55;
  pointer-events: none;
}

/* Banner, sized to the artwork's own aspect ratio so it's never cropped or stretched */
.plugin-hero {
  position: relative;
  aspect-ratio: 1536 / 783;
  overflow: hidden;
}
.plugin-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.8s var(--ease-out);
}
.plugin:hover .plugin-banner { transform: scale(1.08); }
.plugin-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 75%, var(--card-top) 100%);
}

.plugin-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 4px 14px 14px;
  text-align: center;
}
.plugin-name {
  margin: 0;
  font-size: 18px;
}
.plugin-desc {
  flex: 1;
  margin: 4px 0 14px;
  color: var(--text-dim);
  font-size: 14px;
}

/* Missing banner placeholder */
.plugin-banner.img-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 60%),
    linear-gradient(135deg, #4a3f63 0%, #2a2733 100%);
  color: #e3e6eb;
  font-weight: 700;
  font-size: 32px;
}

/* Buttons: lift on hover, squash on press, light sweep, click ripple */
.btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-out), filter 0.2s ease;
}
.btn:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease-out);
}
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.btn:hover:before { left: 130%; }
.btn:active {
  transform: translateY(1px) scale(0.96);
  transition-duration: 0.08s;
  filter: brightness(0.95);
}
.btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

.btn-free {
  background: linear-gradient(180deg, #52d282 0%, var(--free) 50%, var(--free-dark) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 4px 0 #1f7a42, 0 8px 18px rgba(63, 191, 111, 0.3);
}
.btn-free:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 6px 0 #1f7a42, 0 14px 26px rgba(63, 191, 111, 0.4);
}
.btn-free:active {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 1px 0 #1f7a42, 0 4px 10px rgba(63, 191, 111, 0.25);
}

.btn-paid {
  background: linear-gradient(180deg, #ffd76a 0%, var(--paid) 50%, var(--paid-dark) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 4px 0 #8a5c06, 0 8px 18px rgba(240, 180, 41, 0.3);
}
.btn-paid:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 6px 0 #8a5c06, 0 14px 26px rgba(240, 180, 41, 0.4);
}
.btn-paid:active {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 1px 0 #8a5c06, 0 4px 10px rgba(240, 180, 41, 0.25);
}

.btn-disabled,
.btn-disabled:hover,
.btn-disabled:active {
  background: #45404f;
  box-shadow: none;
  transform: none;
  filter: none;
  cursor: default;
  color: #b3b8c1;
}
.btn-disabled:before { display: none; }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  pointer-events: none;
  animation: ripple 0.6s var(--ease-out) forwards;
}
@keyframes ripple {
  to { transform: scale(1); opacity: 0; }
}

.btn-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-faint);
}

/* Marketplace choices, popping up over the blurred card */
.market-choices {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  visibility: hidden;
  transition: visibility 0s linear 0.45s;
}
.plugin.is-choosing .market-choices {
  visibility: visible;
  transition-delay: 0s;
}
.market-title {
  margin: 0 0 4px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out);
}
.market-choices .btn {
  opacity: 0;
  transform: translateY(18px) scale(0.85);
  transition: opacity 0.25s ease, transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), filter 0.2s ease;
}
.plugin.is-choosing .market-title {
  opacity: 1;
  transform: none;
}
.plugin.is-choosing .market-choices .btn {
  opacity: 1;
  transform: none;
  transition: opacity 0.3s ease, transform 0.5s var(--ease-spring), box-shadow 0.35s var(--ease-out), filter 0.2s ease;
}
.plugin.is-choosing .market-choices .btn:nth-of-type(1) { transition-delay: 0.05s, 0.05s, 0s, 0s; }
.plugin.is-choosing .market-choices .btn:nth-of-type(2) { transition-delay: 0.12s, 0.12s, 0s, 0s; }
.plugin.is-choosing .market-choices .btn:nth-of-type(3) { transition-delay: 0.19s, 0.19s, 0s, 0s; }
.plugin.is-choosing .market-choices .btn:hover { transform: translateY(-2px); transition-delay: 0s; }
.plugin.is-choosing .market-choices .btn:active { transform: translateY(1px) scale(0.96); transition-delay: 0s; transition-duration: 0.08s; }

.btn-market {
  background: linear-gradient(180deg, #7b6aa3 0%, #5f5186 50%, #4c416c 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 4px 0 #2e2742, 0 8px 18px rgba(0, 0, 0, 0.35);
}
.btn-market:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 0 #2e2742, 0 14px 26px rgba(0, 0, 0, 0.45);
}
.btn-market:active {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 1px 0 #2e2742, 0 4px 10px rgba(0, 0, 0, 0.3);
}
.btn-market.is-spigot { background: linear-gradient(180deg, #f5a54a 0%, #ed8a1e 50%, #d0730c 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 4px 0 #8f4f07, 0 8px 18px rgba(237, 138, 30, 0.3); }
.btn-market.is-polymart { background: linear-gradient(180deg, #4fd1c5 0%, #25b3a6 50%, #1a9488 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 4px 0 #0f6159, 0 8px 18px rgba(37, 179, 166, 0.3); }
.btn-market.is-modrinth { background: linear-gradient(180deg, #3ddc84 0%, #1bbf66 50%, #139c52 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 4px 0 #0b6a37, 0 8px 18px rgba(27, 191, 102, 0.3); }
.btn-market.is-voxel { background: linear-gradient(180deg, #ff7a6e 0%, #f0493a 50%, #cc2e21 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 4px 0 #7d160e, 0 8px 18px rgba(240, 73, 58, 0.3); }

.empty { color: var(--text-dim); text-align: center; }

/* Footer */
.site-footer {
  margin-top: 56px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 480px) {
  .site-header { padding: 32px 0 24px; }
  .site-header h1 { font-size: 30px; }
  .site-header h1 span { font-size: 16px; }
}

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