/* ── MFX Packs Storefront ── */

.packs-header {
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  max-width: 57.6470588235rem;
  padding: 24px 16px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.packs-header h1 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 6px;
  color: #fff;
  margin: 0;
  font-family: SF Pro Display, SF Pro Icons, Helvetica Neue, Helvetica, Arial, sans-serif;
}

.packs-header a {
  font-size: 13px;
  color: #888;
  text-decoration: none;
  font-family: SF Pro Text, Helvetica Neue, Helvetica, Arial, sans-serif;
}

.packs-header a:hover {
  color: #cacaca;
  text-decoration: underline;
}

/* ── Pack Card Grid ── */

.pack-grid {
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  max-width: 57.6470588235rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 16px;
}

.pack-card {
  background: radial-gradient(circle at 20px top, #373737, #212121);
  border-radius: var(--grid-tile-border-radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.pack-card:hover {
  transform: translateY(-2px);
  border-color: #444;
  text-decoration: none;
}

.pack-card-name {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  font-family: SF Pro Display, SF Pro Icons, Helvetica Neue, Helvetica, Arial, sans-serif;
}

.pack-card-tagline {
  font-size: 14px;
  color: #888;
  margin: 0;
  line-height: 1.4;
}

.pack-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.pack-card-price {
  font-size: 16px;
  font-weight: 600;
  color: #cacaca;
  margin-top: auto;
  padding-top: 8px;
}

.pack-card-link {
  font-size: 13px;
  color: #2997ff;
  text-decoration: none;
}

.pack-card-link:hover {
  text-decoration: underline;
}

/* ── Category Badges ── */

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-transitions { background: #7f4a00; color: #ffaa44; }
.badge-effects     { background: #003366; color: #66b3ff; }
.badge-performance { background: #2e1065; color: #a78bfa; }
.badge-utility     { background: #1a3a1a; color: #6fcf6f; }
.badge-creative    { background: #4a1942; color: #e879c8; }

.action-count {
  font-size: 12px;
  color: #888;
}

/* ── Loading Spinner ── */

.packs-loading {
  text-align: center;
  padding: 80px 20px;
  color: #666;
  font-size: 14px;
  font-family: SF Pro Text, Helvetica Neue, Helvetica, Arial, sans-serif;
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid #444;
  border-top-color: #cacaca;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.packs-error {
  text-align: center;
  padding: 80px 20px;
  color: #cc4444;
  font-size: 14px;
}

/* ── Pack Detail ── */

.pack-detail-nav {
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  max-width: 57.6470588235rem;
  padding: 0 16px;
}

.pack-overview-content,
.pack-compat-content,
.pack-actions-content {
  padding: 20px 28px;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.pack-actions-tile {
  grid-row: auto / span 1;
}

#pack-detail.grid-container {
  grid-auto-rows: auto;
}

a.pack-back,
a.pack-back:link,
a.pack-back:visited {
  display: inline-block;
  font-size: 13px;
  color: #cacaca;
  text-decoration: none;
  padding: 16px 0;
}

a.pack-back:hover {
  color: #fff;
  text-decoration: underline;
}

.pack-hero-name {
  font-size: 36px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.1;
  font-family: SF Pro Display, SF Pro Icons, Helvetica Neue, Helvetica, Arial, sans-serif;
}

.pack-hero-tagline {
  font-size: 17px;
  font-weight: 400;
  color: #888;
  margin: 8px 0 0;
}

/* ── Metadata Row ── */

.pack-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pack-meta-item {
  font-size: 13px;
  color: #888;
}

.pack-meta-item strong {
  color: #cacaca;
}

.difficulty-stars {
  color: #ffaa44;
  letter-spacing: 2px;
}

/* ── Description ── */

.pack-description {
  font-size: 14px;
  color: #cacaca;
  line-height: 1.5;
  margin-top: 10px;
  margin-bottom: 0;
  max-width: 40rem;
}

/* ── Stats ── */

.pack-stats {
  display: flex;
  gap: 24px;
  margin-top: 10px;
  font-size: 13px;
  color: #888;
  flex-wrap: wrap;
}

.pack-stats span {
  white-space: nowrap;
}

.pack-stats strong {
  color: #cacaca;
}

/* ── Actions Table ── */

.pack-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #cacaca;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.pack-section-title + .pack-section-title,
.pack-compat + .pack-section-title {
  margin-top: 16px;
}

.actions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.actions-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #666;
  padding: 8px 12px;
  border-bottom: 1px solid #333;
}

.actions-table td {
  padding: 12px;
  border-bottom: 1px solid #2a2a2a;
  color: #cacaca;
  vertical-align: top;
}

.actions-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.actions-table .action-name {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.actions-table .action-desc {
  color: #999;
  max-width: 24rem;
}

.duration-bar {
  display: inline-block;
  height: 6px;
  border-radius: 3px;
  background: #ffaa44;
  min-width: 6px;
  vertical-align: middle;
}

/* ── Compatibility ── */

.pack-compat {
  display: flex;
  gap: 24px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.pack-compat-item {
  font-size: 14px;
  color: #888;
  background: #2a2a2a;
  padding: 8px 16px;
  border-radius: 8px;
}

.pack-compat-item strong {
  color: #cacaca;
}

/* ── Pricing ── */

.pack-price-block {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.pack-price-amount {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  font-family: SF Pro Display, SF Pro Icons, Helvetica Neue, Helvetica, Arial, sans-serif;
}

.pack-price-currency {
  font-size: 14px;
  color: #888;
  font-weight: 400;
}

.btn-coming-soon {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 8px;
  background: #333;
  color: #888;
  border: 1px solid #444;
  cursor: default;
}

/* ── Buy Buttons ── */

.btn-buy {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 8px;
  background: #2997ff;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-buy:hover { background: #1a7fdb; }
.btn-buy:disabled { opacity: 0.6; cursor: default; }

.btn-buy-free {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 8px;
  background: #30d158;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-buy-free:hover { background: #28b34a; }
.btn-buy-free:disabled { opacity: 0.6; cursor: default; }

/* Free Actions: the bottom of a tile (demo link, facts, button), pinned to its foot */
.action-bottom {
  margin-top: auto;
}

hr.action-rule {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 14px 0;
}

a.action-demo {
  display: block;
}

/* the facts: a borderless table */
table.action-meta {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: normal;
}

table.action-meta th,
table.action-meta td {
  border: none;
  padding: 3px 0;
  vertical-align: top;
}

table.action-meta th {
  text-align: left;
  color: #888;
  font-weight: normal;
  white-space: nowrap;
  padding-right: 16px;
}

table.action-meta td {
  text-align: right;
  color: #cacaca;
}

/* Free Actions: "Add to MFX", .btn-buy-free's green across the whole tile */
a.btn-add-mfx {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 8px;
  background: #30d158;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease;
}

a.btn-add-mfx:hover { background: #28b34a; text-decoration: none; }

/* ── Email Form ── */

.email-form {
  margin-top: 24px;
  background: #2a2a2a;
  padding: 24px;
  border-radius: 12px;
  max-width: 400px;
}

.email-form-label {
  font-size: 14px;
  color: #cacaca;
  margin: 0 0 12px;
}

.email-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 14px;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
  margin-bottom: 12px;
}

.email-input:focus { border-color: #2997ff; }

.email-error {
  font-size: 13px;
  color: #ff453a;
  margin-bottom: 12px;
}

/* ── Purchase Success ── */

.purchase-success {
  margin-top: 24px;
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.3);
  padding: 20px 24px;
  border-radius: 12px;
  max-width: 400px;
}

.purchase-success p {
  font-size: 15px;
  color: #30d158;
  margin: 0;
  line-height: 1.5;
}

.purchase-success strong {
  color: #fff;
}

/* ── Changelog ── */

.changelog-entry {
  padding: 12px 0;
  border-bottom: 1px solid #2a2a2a;
}

.changelog-entry:last-child {
  border-bottom: none;
}

.changelog-version {
  font-size: 14px;
  font-weight: 600;
  color: #cacaca;
}

.changelog-date {
  font-size: 12px;
  color: #666;
  margin-left: 8px;
}

.changelog-notes {
  font-size: 14px;
  color: #888;
  margin-top: 4px;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .pack-grid {
    grid-template-columns: 1fr;
  }

  #pack-detail.grid-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .pack-hero-name {
    font-size: 28px;
  }

  .pack-hero-tagline {
    font-size: 15px;
  }

  .actions-table {
    font-size: 13px;
  }

  .actions-table th:nth-child(3),
  .actions-table td:nth-child(3),
  .actions-table th:nth-child(4),
  .actions-table td:nth-child(4) {
    display: none;
  }

  .pack-price-amount {
    font-size: 24px;
  }

  .pack-overview-tile,
  .pack-compat-tile,
  .pack-actions-tile {
    border-radius: var(--grid-tile-border-radius);
  }
}
