/* ─── Imports ───────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:           #0a0a0a;
  --surface:      #111111;
  --surface-hover:#1a1a1a;
  --border:       #252525;
  --gold:         #c9a84c;
  --gold-light:   #e8d48a;
  --gold-dark:    #8b7235;
  --text:         #f0f0f0;
  --text-muted:   #777;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.7);
  --transition:   0.2s ease;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold-light);
}

img {
  max-width: 100%;
  display: block;
}

/* ─── Navigation ────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.nav-brand:hover {
  color: var(--gold-light);
}

.nav-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(201, 168, 76, 0.08);
}

.nav-links a.active {
  color: var(--gold);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
}

/* ─── Main content ──────────────────────────────────────────────────────────── */
main {
  flex: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 28px;
  border-radius: 24px;
  filter: drop-shadow(0 0 32px rgba(201, 168, 76, 0.25));
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  font-weight: 400;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
}

.btn-gold {
  background: var(--gold);
  color: #0a0a0a;
}

.btn-gold:hover {
  background: var(--gold-light);
  color: #0a0a0a;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(201, 168, 76, 0.35);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn-outline:hover {
  background: rgba(201, 168, 76, 0.1);
  color: var(--gold-light);
}

/* ─── Stats ─────────────────────────────────────────────────────────────────── */
.stats-section {
  padding: 0 24px 72px;
}

.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.stat-card:hover {
  border-color: rgba(201, 168, 76, 0.3);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Section headers ───────────────────────────────────────────────────────── */
.section {
  padding: 0 24px 80px;
}

.section-header {
  max-width: 1200px;
  margin: 0 auto 32px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title span {
  color: var(--gold);
}

.section-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gold);
  white-space: nowrap;
}

.section-link:hover {
  color: var(--gold-light);
}

/* ─── Partner cards grid ────────────────────────────────────────────────────── */
.partners-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ─── Partner card ──────────────────────────────────────────────────────────── */
.partner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
}

.partner-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.4);
  box-shadow: var(--shadow-hover);
  background: var(--surface-hover);
}

.partner-card.featured {
  border-color: rgba(201, 168, 76, 0.35);
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.15), 0 4px 20px rgba(201, 168, 76, 0.08);
}

.partner-card.featured:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.5), 0 8px 40px rgba(201, 168, 76, 0.15);
}

.featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gold);
  color: #0a0a0a;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 20px;
  z-index: 5;
}

/* Banner area */
.card-banner-wrap {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, #151515 0%, #1e1e1e 100%);
  overflow: visible;
  flex-shrink: 0;
}

/* Clip only the image/placeholder, not the icon that overhangs */
.card-banner,
.card-banner-placeholder {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-banner-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #141414 0%, #1c1c1c 50%, #141414 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* inner box removed */

/* Icon overlapping banner */
.card-icon-wrap {
  position: absolute;
  bottom: 0;
  left: 20px;
  transform: translateY(50%);
  z-index: 2;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface);
  background: var(--surface);
}

.card-icon-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: linear-gradient(135deg, #1c1c1c, #252525);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
}

/* Card body */
.card-body {
  padding: 38px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
  word-break: break-word;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tag-public    { background: rgba(201, 168, 76, 0.15); color: var(--gold);    border: 1px solid rgba(201, 168, 76, 0.3); }
.tag-private   { background: rgba(168, 85, 247, 0.15); color: #c084fc;        border: 1px solid rgba(168, 85, 247, 0.3); }
.tag-java      { background: rgba(249, 115, 22, 0.15); color: #fb923c;        border: 1px solid rgba(249, 115, 22, 0.3); }
.tag-bedrock   { background: rgba(34, 197, 94, 0.15);  color: #4ade80;        border: 1px solid rgba(34, 197, 94, 0.3);  }
.tag-cracked   { background: rgba(59, 130, 246, 0.15); color: #60a5fa;        border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-other     { background: rgba(120, 120, 120, 0.15); color: #999;           border: 1px solid rgba(120, 120, 120, 0.3);}

.card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.card-footer {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  gap: 8px;
}

.card-details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.card-details-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: var(--surface-hover);
}

.card-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  flex: 1;
  justify-content: center;
}

.card-join-btn:hover {
  background: var(--gold);
  color: #0a0a0a;
  border-color: var(--gold);
  transform: none;
}

/* Arrow icon */
.arrow {
  font-style: normal;
  font-size: 0.95em;
}

/* ─── Partners page header ──────────────────────────────────────────────────── */
.page-header {
  padding: 56px 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.page-header h1 span {
  color: var(--gold);
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ─── Filter bar ────────────────────────────────────────────────────────────── */
.filter-bar {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.filter-tab {
  padding: 7px 18px;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.filter-tab.active {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  font-weight: 600;
}

/* ─── Tag filter chips ──────────────────────────────────────────────────────── */
.tag-filter-bar {
  max-width: 1200px;
  margin: 0 auto 28px;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag-chip {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.tag-chip:hover      { color: var(--text); border-color: rgba(255,255,255,0.2); }
.tag-chip.active     { color: #0a0a0a; border-color: transparent; }

.tag-chip.active,
.tag-chip:not([class*="tag-chip--"]).active { background: var(--gold); color: #0a0a0a; }

.tag-chip--public.active    { background: var(--gold);  color: #0a0a0a; border-color: transparent; }
.tag-chip--private.active   { background: #a855f7;      color: #fff;    border-color: transparent; }
.tag-chip--java.active      { background: #f97316;      color: #fff;    border-color: transparent; }
.tag-chip--bedrock.active   { background: #22c55e;      color: #fff;    border-color: transparent; }
.tag-chip--cracked.active   { background: #3b82f6;      color: #fff;    border-color: transparent; }
.tag-chip--other.active     { background: #6b7280;      color: #fff;    border-color: transparent; }

.tag-chip--public:hover     { color: var(--gold);  border-color: rgba(201,168,76,0.4); }
.tag-chip--private:hover    { color: #c084fc;       border-color: rgba(168,85,247,0.4); }
.tag-chip--java:hover       { color: #fb923c;       border-color: rgba(249,115,22,0.4); }
.tag-chip--bedrock:hover    { color: #4ade80;       border-color: rgba(34,197,94,0.4); }
.tag-chip--cracked:hover    { color: #60a5fa;       border-color: rgba(59,130,246,0.4); }
.tag-chip--other:hover      { color: #9ca3af;       border-color: rgba(120,120,120,0.4); }

.search-wrap {
  position: relative;
  flex-shrink: 0;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: block;
  flex-shrink: 0;
}

.search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 9px 14px 9px 36px;
  width: 240px;
  transition: border-color var(--transition);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: rgba(201, 168, 76, 0.5);
}

/* ─── Partners page wrapper ─────────────────────────────────────────────────── */
.partners-page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ─── Empty state ───────────────────────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ─── Pagination ────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pag-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.pag-btn:hover {
  color: var(--text);
  border-color: rgba(201, 168, 76, 0.4);
  background: var(--surface-hover);
}

.pag-btn.active {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  border-color: rgba(201, 168, 76, 0.4);
  font-weight: 600;
}

.pag-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.pag-ellipsis {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0 4px;
  line-height: 36px;
}

/* ─── 404 page ──────────────────────────────────────────────────────────────── */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px;
  text-align: center;
  flex: 1;
}

.not-found-code {
  font-size: 7rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.not-found h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.not-found p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1rem;
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 5px;
  opacity: 0.7;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    width: 100%;
  }

  .filter-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding: 64px 24px 56px;
  }

  .section-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .page-header {
    padding: 40px 24px 28px;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    padding: 0 16px;
  }

  .nav-brand span {
    display: none;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}

/* ─── Partner detail page ───────────────────────────────────────────────────── */
.detail-banner-wrap {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: #0e0e0e;
}

.detail-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-banner-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #141414 0%, #1a1a1a 100%);
  transition: background 0.4s ease;
}

.detail-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 25%, rgba(10,10,10,0.6) 65%, rgba(10,10,10,1) 100%);
  pointer-events: none;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 0 0 32px;
  margin-top: -48px;
  position: relative;
  flex-wrap: wrap;
}

.detail-icon-wrap {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.detail-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.detail-icon-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: linear-gradient(135deg, #1c1c1c, #252525);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.detail-meta {
  flex: 1;
  padding-top: 56px;
  min-width: 0;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.detail-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.detail-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 56px;
  flex-shrink: 0;
}

.detail-join {
  width: auto;
  white-space: nowrap;
}

.detail-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  text-align: center;
}

.detail-back-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: var(--surface-hover);
}

.detail-section {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.detail-section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.detail-ad {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 0.975rem;
  line-height: 1.8;
  color: var(--text);
  word-break: break-word;
  --brand-tint: var(--gold);
}

.detail-ad p        { margin: 0 0 0.9em; }
.detail-ad p:last-child { margin-bottom: 0; }

.detail-ad strong   { color: var(--brand-tint); font-weight: 700; }
.detail-ad em       { font-style: italic; opacity: 0.9; }
.detail-ad u        { text-decoration: underline; text-underline-offset: 3px; }
.detail-ad s        { opacity: 0.55; }
.detail-ad code     { font-family: 'Consolas', 'Fira Mono', monospace; font-size: 0.88em;
                      background: rgba(255,255,255,0.06); padding: 1px 6px;
                      border-radius: 4px; color: var(--gold-light); }

.detail-ad ul       { margin: 0.5em 0 0.9em 1.4em; padding: 0; }
.detail-ad li       { margin-bottom: 0.3em; }

.detail-ad .ad-h1   { font-size: 1.4rem; font-weight: 800; margin: 0 0 0.5em;
                      color: var(--brand-tint); letter-spacing: -0.02em; }
.detail-ad .ad-h2   { font-size: 1.15rem; font-weight: 700; margin: 0.8em 0 0.4em;
                      color: var(--brand-tint); }
.detail-ad .ad-h3   { font-size: 1rem; font-weight: 600; margin: 0.7em 0 0.3em;
                      color: var(--brand-tint); opacity: 0.85; }

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.detail-info-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-info-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.detail-info-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

@media (max-width: 640px) {
  .detail-banner-wrap { height: 180px; }
  .detail-header { gap: 16px; margin-top: -32px; }
  .detail-icon, .detail-icon-placeholder { width: 72px; height: 72px; }
  .detail-name { font-size: 1.5rem; }
  .detail-actions { padding-top: 0; flex-direction: row; flex-wrap: wrap; }
  .detail-meta { padding-top: 44px; }
}

/* ─── Detail page entrance animations ───────────────────────────────────────── */
@keyframes detail-banner-in {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes detail-slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.detail-banner-wrap {
  animation: detail-banner-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.detail-header {
  animation: detail-slide-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.detail-section {
  animation: detail-slide-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.detail-section + .detail-section {
  animation-delay: 0.28s;
}
