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

:root {
  --bg: #0b0c10;
  --panel: #13151e;
  --text: #e9ecf1;
  --muted: #8a93a6;
  --border: rgba(255,255,255,0.07);
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --r: 16px;
  --topbar: rgba(17, 19, 26, 0.75);
  --soft: rgba(255,255,255,0.05);
  --soft2: rgba(255,255,255,0.07);
  --softHover: rgba(255,255,255,0.09);
  --promo-bg: rgba(8, 8, 16, 0.92);
  --promo-badge-bg: rgba(10, 12, 18, 0.9);
  --promo-text: var(--text);
  --promo-muted: color-mix(in srgb, var(--promo-text) 88%, transparent);
  --promo-hover-overlay: rgba(255,255,255,0.05);
  --promo-lift: 6px;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;
  --nav-text: var(--text);
  --homebtns: var(--text);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] { display: none !important; }

a {
  color: inherit;
  text-decoration: none;
  position: relative;
}

a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: #f59e0b;
  border-radius: 999px;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5), 0 0 16px rgba(245, 158, 11, 0.2);
  transition: width 450ms cubic-bezier(.22,.68,0,1.1);
}

a:hover::after {
  width: 97%;
}

.btn::after, .icon-btn::after, .promo-card-link::after, .video-card::after,
.nav-dd-btn::after, .dropdown-item::after, .tab-btn::after, .provider::after,
.drawer-links a::after, .brand::after {
  display: none !important;
}






/* ───── Topbar ───── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: var(--topbar);
  backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  transform: scale(1.7);
  transform-origin: left center;
}

@media (max-width: 640px) {
  .brand-logo { display: none; }
}

.navlinks {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-self: center;
  margin-left: 0;
}

.right {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  margin-left: 0;
}

.navlinks a {
  opacity: 0.7;
  font-weight: 500;
  font-size: 15px;
  color: var(--nav-text); /* <-- USE VARIABLE */
  transition: opacity 160ms ease, color 160ms ease;
}
.navlinks a:hover { opacity: 1; }
.navlinks a.active { opacity: 1; text-decoration: none; color: var(--nav-text); font-weight: 700; }

/* Also apply it to the dropdown button and the right-side auth name so they match */
.nav-dd-btn { color: var(--nav-text); }
.auth-name { color: var(--nav-text); }


/* ───── Buttons ───── */
.icon-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.btn {
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 160ms ease;
}
.btn:hover, .icon-btn:hover { background: var(--softHover); border-color: rgba(255,255,255,0.12); }

/* ───── Dropdown ───── */
.dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  width: 180px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.dropdown-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  transition: background 120ms ease;
}
.dropdown-item:hover { background: var(--soft); }
.dropdown-item.danger { color: #ff9b9b; }

.page { max-width: 980px; margin: 0 auto; padding: 28px 20px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow);
}

.site-content { flex: 1; }

.site-footer {
  margin-top: 48px;
  padding: 20px 16px 28px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--muted);
  background: transparent;
  border-top: 1px solid var(--border);
}

/* ───── Modals ───── */
.modal-backdrop, .drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 30;
}

.modal {
  position: fixed;
  z-index: 40;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 28px));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  padding: 18px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 700; }

.providers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.provider {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 14px;
  text-align: center;
  background: var(--soft);
  transition: background 140ms ease, transform 120ms ease;
  font-weight: 500;
}
.provider:hover { background: var(--softHover); text-decoration: none; transform: translateY(-1px); }
.provider.discord {
  background: #5865f2;
  border-color: rgba(88, 101, 242, 0.6);
  color: #ffffff;
}
.provider.discord:hover { background: #4c5be3; }
.provider.twitch {
  background: #9146ff;
  border-color: rgba(145, 70, 255, 0.6);
  color: #ffffff;
}
.provider.twitch:hover { background: #7f3df0; }

/* ───── Consent ───── */
.consent-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.72);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.consent-modal {
  width: min(520px, calc(100% - 24px));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  padding: 20px;
}
.consent-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.consent-lead { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.consent-check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 14px; }
.consent-check input { margin-top: 3px; }
.consent-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.consent-accept { background: #3b82f6; border-color: rgba(59, 130, 246, 0.5); color: #fff; }
.consent-accept:hover { background: #2563eb; }
.consent-accept:disabled { opacity: 0.55; cursor: not-allowed; }
.consent-note { margin-top: 10px; font-size: 12px; color: var(--muted); }
.consent-declined { margin-top: 8px; color: #ff9b9b; font-size: 13px; }
body.consent-locked { overflow: hidden; }
body.consent-locked > *:not(.consent-backdrop) { filter: blur(6px); }

.provider-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  transform: translateY(1px);
}
.provider-icon svg { width: 20px; height: 20px; fill: currentColor; }

/* ───── FAQ ───── */
.faq-list { display: grid; gap: 10px; }
.faq-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  transition: background 140ms ease;
}
.faq-item:hover { background: rgba(255,255,255,0.045); }
.faq-q-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq-q { font-weight: 700; font-size: 14px; }
.faq-a { color: var(--muted); margin-top: 8px; font-size: 14px; line-height: 1.55; }
.faq-toggle {
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 12px;
  transition: background 120ms ease;
}
.faq-a img, .faq-q img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.faq-a a, .faq-q a { text-decoration: underline; }

.faq-editor { display: grid; gap: 10px; margin-top: 10px; }
.faq-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.home-logo { display: flex; justify-content: center; align-items: center; margin-top: 6px; margin-bottom: 20px; }
.home-logo img { width: 100%; max-width: 500px; height: auto; }

.hint { color: var(--muted); margin: 12px 0 0; font-size: 12px; }

/* ───── Drawer ───── */
.drawer {
  position: fixed;
  z-index: 40;
  top: 0; left: 0;
  height: 100%;
  width: 280px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 32px rgba(0,0,0,0.4);
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 12px; }
.drawer-links { display: flex; flex-direction: column; gap: 4px; padding: 8px 2px; }
.drawer-links a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  margin: 0;
  opacity: 0.75;
  font-size: 14px;
  font-weight: 500;
  transition: background 120ms ease, opacity 120ms ease;
}
.drawer-links a:hover { background: rgba(255,255,255,0.05); text-decoration: none; opacity: 1; }
.drawer-links .drawer-admin-toggle { margin: 0; }
.drawer-links { gap: 4px; }
.drawer-footer { margin-top: auto; padding: 10px 2px 2px; }
.full { width: 100%; }

.profile-row { display: flex; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 14px; border: 1px solid var(--border); background: var(--soft); object-fit: cover; }
.big { font-size: 18px; font-weight: 800; }
.muted { color: var(--muted); font-size: 13px; }

.burger { display: none; }
@media (max-width: 700px) {
  .navlinks { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 420px) {
  .providers { grid-template-columns: 1fr; }
}

.auth-btn { display: inline-flex; align-items: center; gap: 8px; }
.auth-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--soft);
}
.auth-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

.connect-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.provider-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.provider-label { font-weight: 700; width: 90px; flex: 0 0 auto; font-size: 14px; }
.provider-status { display: flex; align-items: center; gap: 10px; min-width: 0; }
.provider-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--soft);
  flex: 0 0 auto;
}
.provider-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.connect-actions { display: inline-flex; align-items: center; gap: 8px; }

/* ───── Promo Cards ───── */
.cards-section.fullbleed { width: 100%; padding: 22px 16px 40px; }
.cards-wrap { max-width: 1600px; margin: 0 auto; }
.cards-section { margin-top: 18px; }
.cards-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cards-block { width: 100%; }
.cards-heading { margin: 0 0 16px; font-size: 20px; font-weight: 800; letter-spacing: 0.3px; padding: 0 2px; color: var(--text); }

.cards-grid-primary {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 740px) { .cards-grid-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards-grid-primary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1450px) { .cards-grid-primary { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.cards-grid-secondary {
  display: grid;
  gap: 16px;
  align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards-grid-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cards-grid-secondary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1450px) { .cards-grid-secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.promo-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.promo-card-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 6px;
  border-radius: 26px;
}

.promo-card.secondary {
  padding: 22px 18px;
  min-height: 360px;
  border-radius: 22px;
}
.promo-card.secondary .promo-title { font-size: 14px; letter-spacing: 2px; }
.promo-card.secondary .promo-lines { font-size: 14px; gap: 10px; }
.promo-card.secondary .promo-logo img { max-height: 56px; }

.promo-card-link,
.promo-card-link:hover,
.promo-card-link:focus,
.promo-card-link:active,
.promo-card-link:visited { text-decoration: none !important; }
.promo-card-link { cursor: pointer; }

.cards-grid-secondary { align-items: start; }
.promo-card.secondary { min-height: auto; height: auto; }
.promo-card:not(.secondary) .promo-inner { height: 100%; }

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

.promo-card {
  --accent: #12b5ff;
  --accent2: var(--accent);
  position: relative;
  border-radius: 24px;
  padding: 32px 26px;
  min-height: 560px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,0.06));
  background:
    radial-gradient(1200px circle at 15% 0%,
      color-mix(in srgb, var(--accent) 18%, transparent),
      transparent 55%),
    radial-gradient(900px circle at 85% 100%,
      color-mix(in srgb, var(--accent2) 14%, transparent),
      transparent 60%),
    var(--promo-bg);
  color: var(--promo-text);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 8px 40px color-mix(in srgb, var(--accent) 30%, transparent);
  overflow: hidden;
  transition: transform 180ms cubic-bezier(.22,.68,0,1.2), box-shadow 200ms ease, border-color 180ms ease;
  will-change: transform;
}

.promo-card::before {
  content: "";
  position: absolute;
  inset: -40px;
  background:
    radial-gradient(600px circle at 20% 0%,
      color-mix(in srgb, var(--accent) 12%, transparent),
      transparent 60%);
  filter: blur(20px);
  opacity: 0.8;
  pointer-events: none;
}

.promo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--promo-hover-overlay);
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.promo-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.promo-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, rgba(255,255,255,0.08));
  background: var(--promo-badge-bg);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 30%, transparent);
}

.promo-logo { margin-top: 34px; display: flex; align-items: center; justify-content: center; min-height: 90px; width: 100%; }
.promo-logo img { max-height: 68px; max-width: 80%; object-fit: contain; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5)); }
.promo-title { margin-top: 6px; font-weight: 800; letter-spacing: 2.5px; font-size: 16px; opacity: 0.85; text-transform: uppercase; }

.promo-divider {
  width: 70%;
  height: 1px;
  margin: 24px 0 20px;
  background: linear-gradient(to right, transparent, color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,0.08)), transparent);
}

.promo-lines { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; font-size: 16px; letter-spacing: 0.3px; }
.promo-lines .mutedline { color: var(--promo-muted); opacity: 1; }

.promo-actions { margin-top: 16px; display: flex; justify-content: center; }
.promo-info-btn {
  border-color: color-mix(in srgb, var(--accent) 50%, rgba(255,255,255,0.15));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 20%, transparent);
}
.promo-card.secondary .promo-info-btn { font-size: 12px; padding: 8px 12px; }

.promo-highlight { margin-top: auto; padding-top: 24px; font-size: 18px; letter-spacing: 0.5px; }
.promo-highlight .accent { color: var(--accent); font-weight: 800; margin-right: 8px; }

.promo-card:hover {
  transform: translateY(calc(var(--promo-lift) * -1));
  border-color: color-mix(in srgb, var(--accent) 60%, rgba(255,255,255,0.12));
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 12px 48px color-mix(in srgb, var(--accent) 40%, transparent),
    0 20px 48px rgba(0,0,0,0.3);
}
.promo-card:hover::after { opacity: 1; }

.card-info-modal.modal { width: min(640px, calc(100% - 28px)); }
.tournament-info-trigger { margin-top: 6px; padding: 0; border: 0; background: transparent; color: var(--link); cursor: pointer; text-align: left; font: inherit; }
.tournament-info-trigger:hover { text-decoration: underline; }
.tournament-image-modal.modal { width: min(960px, calc(100% - 28px)); top: 8%; }
.tournament-image-modal-img { display: block; width: 100%; max-height: 75vh; object-fit: contain; border-radius: 12px; }
.card-info-line { margin: 0; color: var(--promo-muted); font-size: 14px; line-height: 1.5; }

/* ───── Admin ───── */
.admin-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
@media (max-width: 1000px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.json-editor {
  width: 100%;
  height: 420px;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}

.uploads-list { display: grid; gap: 10px; margin-top: 12px; }
.tab-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tab-btn.active { border-color: rgba(255,255,255,0.25); font-weight: 700; }
.tab-panel { display: none; margin-top: 12px; }
.tab-panel.active { display: block; }

.tournament-list { display: grid; gap: 14px; margin-top: 10px; justify-items: center; }
.tournament-section { margin-top: 18px; }
.tournament-card h2 { margin: 0 0 4px; }
.tournament-card { width: min(100%, 960px); }
.tournament-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tournament-search { display: flex; justify-content: flex-end; margin: 8px 0; }
.tournament-search input[type="search"] { max-width: 260px; width: 100%; }

.tournament-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
  letter-spacing: 0.6px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center; 
}

.tournament-pill--live {
  color: green;
  background: rgba(0,255,0,0.04);
}
.tournament-pill--live::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  margin-right: 6px;
  animation: livePulse 2s ease-in-out infinite;
  flex-shrink: 0;
  margin-top: 1px
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.tournament-pill--closed {
  color: red;
  background: rgba(255,0,0,0.04);
}


/* ───── Tables ───── */
.table-wrap {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  overflow: auto;
  max-height: 380px;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  background: rgba(19, 21, 30, 0.95);
  padding: 12px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.tournament-card .table-wrap thead th,
.tournament-card .table-wrap tbody td { text-align: center; }

.table-wrap tbody td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 16px;
  transition: background 140ms ease;
}

/* Alternate row tinting (very subtle) */
.table-wrap tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.015);
}
/* But respect our hover and top-3 overrides */
.table-wrap tbody tr:nth-child(even):hover td {
  background: rgba(255,255,255,0.06);
}
.table-wrap tbody tr:nth-child(1) td,
.table-wrap tbody tr:nth-child(2) td,
.table-wrap tbody tr:nth-child(3) td {
  background-color: revert;
}



/* ───── Top 3 Leaderboard Highlights ───── */

/* Row-level styling */
.tournament-card .table-wrap tbody tr:nth-child(1) td {
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  border-bottom-color: color-mix(in srgb, var(--gold) 20%, transparent);
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
}
.tournament-card .table-wrap tbody tr:nth-child(1) td:first-child::before {
  animation: goldPulse 2.5s ease-in-out infinite;
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 16px rgba(255, 215, 0, 0.6); }
}

.tournament-card .table-wrap tbody tr:nth-child(1) td:first-child {
  border-left: 3px solid var(--gold);
  padding-left: 7px;
}

.tournament-card .table-wrap tbody tr:nth-child(2) td {
  background: color-mix(in srgb, var(--silver) 10%, transparent);
  border-bottom-color: color-mix(in srgb, var(--silver) 16%, transparent);
  font-size: 16px;
  font-weight: bold;
}
.tournament-card .table-wrap tbody tr:nth-child(2) td:first-child {
  border-left: 3px solid var(--silver);
  padding-left: 7px;
}

.tournament-card .table-wrap tbody tr:nth-child(3) td {
  background: color-mix(in srgb, var(--bronze) 10%, transparent);
  border-bottom-color: color-mix(in srgb, var(--bronze) 16%, transparent);
  font-size: 16px;
  font-weight: bold;
}
.tournament-card .table-wrap tbody tr:nth-child(3) td:first-child {
  border-left: 3px solid var(--bronze);
  padding-left: 7px;
}

/* Hide the existing #1 #2 #3 HTML text in the first cell */
.tournament-card .table-wrap tbody tr:nth-child(1) td:first-child,
.tournament-card .table-wrap tbody tr:nth-child(2) td:first-child,
.tournament-card .table-wrap tbody tr:nth-child(3) td:first-child {
  font-size: 0;
  line-height: 0;
}

/* General hover effect for ALL leaderboard rows */
.tournament-card .table-wrap tbody tr:hover td {
  background: rgba(255,255,255,0.06);
}

/* Optional: smooth out the hover transition for all rows */
.tournament-card .table-wrap tbody td {
  transition: background 140ms ease;
}




/* Hover intensify */
.tournament-card .table-wrap tbody tr:nth-child(1):hover td {
  background: color-mix(in srgb, var(--gold) 20%, transparent);
}
.tournament-card .table-wrap tbody tr:nth-child(2):hover td {
  background: color-mix(in srgb, var(--silver) 16%, transparent);
}
.tournament-card .table-wrap tbody tr:nth-child(3):hover td {
  background: color-mix(in srgb, var(--bronze) 16%, transparent);
}

/* Coin badge via pseudo-element on the first cell */
.tournament-card .table-wrap tbody tr:nth-child(1) td:first-child::before,
.tournament-card .table-wrap tbody tr:nth-child(2) td:first-child::before,
.tournament-card .table-wrap tbody tr:nth-child(3) td:first-child::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px; /* Restore font size so the number inside the coin is visible */
  line-height: 1;  /* Restore line-height */
  margin-right: 0px;
  margin-left: 2px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Gold Coin */
.tournament-card .table-wrap tbody tr:nth-child(1) td:first-child::before {
  content: "1";
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #1a1200;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
}

/* Silver Coin */
.tournament-card .table-wrap tbody tr:nth-child(2) td:first-child::before {
  content: "2";
  background: linear-gradient(135deg, #e0e0e0, #a8a8a8);
  color: #1a1a1a;
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.35);
}

/* Bronze Coin */
.tournament-card .table-wrap tbody tr:nth-child(3) td:first-child::before {
  content: "3";
  background: linear-gradient(135deg, #e8a84c, #b87333);
  color: #1a1200;
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.4);
}

/* Responsive adjustments */
@media (max-width: 700px) {
  /* Keep these global - they apply to ALL tables */
  .table-wrap table { min-width: 0; }
  .table-wrap thead th, .table-wrap tbody td { padding: 8px; font-size: 12px; }
  
  /* Add .tournament-card to these so they only affect tournament leaderboards */
  .tournament-card .table-wrap tbody tr:nth-child(1) td:first-child,
  .tournament-card .table-wrap tbody tr:nth-child(2) td:first-child,
  .tournament-card .table-wrap tbody tr:nth-child(3) td:first-child {
    border-left-width: 2px;
  }
  
  .tournament-card .table-wrap tbody tr:nth-child(1) td:first-child::before,
  .tournament-card .table-wrap tbody tr:nth-child(2) td:first-child::before,
  .tournament-card .table-wrap tbody tr:nth-child(3) td:first-child::before {
    width: 22px;
    height: 22px;
    font-size: 10px;
    margin-right: 6px;
  }
}






.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}
.upload-left { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.upload-thumb { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.upload-url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; font-size: 13px; }

body.admin-page .page { max-width: 1400px; }
body.admin-page .admin-grid { grid-template-columns: 0.9fr 2.1fr; }
body.admin-page .json-editor { height: 560px; }

.preview-title { max-width: 1600px; margin: 0 auto 18px; padding: 0 16px; }
.section-title { margin: 18px 0 10px; font-size: 18px; font-weight: 800; }

/* ───── Video Grid ───── */
.video-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.video-card {
  display: block;
  text-decoration: none !important;
  color: inherit;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(.22,.68,0,1.1), box-shadow 180ms ease;
}
.video-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

.video-thumb {
  height: 160px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.video-thumb-fallback {
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 55%),
              rgba(255,255,255,0.04);
}
.video-title {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 14px;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 2000; }
.video-modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, calc(100vw - 28px));
  background: rgba(10, 12, 18, 0.96);
  border: 1px solid var(--border);
  border-radius: 18px;
  z-index: 2001;
  padding: 12px;
}
.video-close { position: absolute; top: 10px; right: 10px; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.video-frame iframe { width: 100%; height: 100%; }

.admin-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.input {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color 140ms ease;
}
.input:focus { border-color: rgba(255,255,255,0.18); outline: none; }

@media (max-width: 900px) { .admin-form { grid-template-columns: 1fr; } }

.admin-list { display: grid; gap: 10px; margin-top: 10px; }
.admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px;
  background: rgba(255,255,255,0.03);
}
.admin-row-left { display: grid; gap: 6px; min-width: 0; }
.tag {
  display: inline-flex; width: fit-content;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px;
}

.video-admin-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.video-admin-subtitle { margin: 0 0 10px; font-weight: 800; opacity: 0.95; font-size: 14px; }
@media (max-width: 900px) { .video-admin-split { grid-template-columns: 1fr; } }

.modal-body { display: grid; gap: 12px; margin-top: 10px; }
.modal-body .input { font-size: 15px; padding: 12px 14px; }
.modal-body .field span { font-size: 12px; }
#editVideoModal.modal { width: min(720px, calc(100vw - 28px)); }

.field span { display: block; font-size: 12px; opacity: 0.7; margin-bottom: 6px; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.btn.danger { border-color: rgba(255, 80, 80, 0.4); color: #ff9b9b; }
.btn.danger:hover { box-shadow: 0 0 16px rgba(255,80,80,0.2); }

#editVideoModal { width: min(980px, calc(100vw - 28px)); }
#editVideoModal .field { width: 100%; }
#editVideoModal .input { width: 100%; box-sizing: border-box; }

/* ───── Nav Dropdown ───── */
.nav-dd { display: inline-flex; align-items: center; position: relative; }
.navlinks a, .nav-dd-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  line-height: 1;
  border-radius: 10px;
  transition: background 120ms ease;
}
.navlinks a.active, .nav-dd-btn.active { box-shadow: inset 0 -2px 0 rgba(255,255,255,0); }
.nav-dd-btn { background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; }
.nav-dd-btn:hover { background: var(--soft); opacity: 1; }
.nav-dd-btn.active { background: var(--soft2); opacity: 1; font-weight: 700; }

.nav-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: auto;
  transform: translateX(0);
  min-width: 200px;
  z-index: 2000;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  padding: 6px;
}
.nav-dd-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  opacity: 0.8;
  font-size: 13px;
  transition: background 120ms ease;
}
.nav-dd-menu a:hover { background: var(--soft); opacity: 1; }
.nav-dd-menu a.active { background: var(--soft2); opacity: 1; font-weight: 700; }

.caret { opacity: 0.6; display: inline-block; transition: transform 140ms ease; }
.nav-dd-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.drawer-admin-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }

/* ───── Drawer Admin ───── */
.drawer-admin-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 120ms ease;
}
.drawer-admin-toggle:hover { background: var(--soft); }
.drawer-admin-sub {
  display: grid;
  gap: 4px;
  padding-left: 12px;
  margin-top: 4px;
  border-left: 1px solid var(--border);
}
.drawer-admin-sub a { opacity: 0.75; font-size: 13px; }

/* ───── Themes ───── */
html { color-scheme: dark; }

select, select.input {
  background-color: rgba(255,255,255,0.03);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
}
select option { background-color: var(--panel); color: var(--text); }


html[data-theme="midnight"] {
  --bg:#0b0c10; --panel:#13151e; --text:#e9ecf1; --muted:#8a93a6;
  --border:rgba(255,255,255,0.07); --shadow:0 4px 24px rgba(0,0,0,0.35);
  --topbar:rgba(17, 19, 26, 0.75);
  --nav-text: #f59e0b;
  --homebtns: #f59e0b;   
}
html[data-theme="aurora"] {
  --bg:#061410; --panel:#0f241c; --text:#eafff7; --muted:#8cc5b5;
  --border:rgba(170,255,226,0.10); --shadow:0 4px 24px rgba(0,0,0,0.40);
  --topbar:rgba(11, 31, 24, 0.72);
  --homebtns: #3dd1a7;
}
html[data-theme="lagoon"] {
  --bg:#041218; --panel:#0b2430; --text:#e9fbff; --muted:#8bc5cf;
  --border:rgba(120,255,238,0.12); --shadow:0 4px 24px rgba(0,0,0,0.40);
  --topbar:rgba(7, 31, 42, 0.72);
  --homebtns: #0d384e;
}
html[data-theme="ocean"] {
  --bg:#070b1a; --panel:#111838; --text:#eaf0ff; --muted:#96a5c8;
  --border:rgba(175,200,255,0.10); --shadow:0 4px 24px rgba(0,0,0,0.40);
  --topbar:rgba(13, 20, 48, 0.72);
  --homebtns: #111d4e;
}
html[data-theme="mocha"] {
  --bg:#120d0a; --panel:#201814; --text:#f4efe8; --muted:#b5a89c;
  --border:rgba(255,230,200,0.09); --shadow:0 4px 24px rgba(0,0,0,0.45);
  --topbar:rgba(27, 20, 16, 0.74);
  --homebtns: #35251c;
}
html[data-theme="ember"] {
  --bg:#140a0a; --panel:#281414; --text:#fff1f1; --muted:#cc9e9e;
  --border:rgba(255,160,160,0.10); --shadow:0 4px 24px rgba(0,0,0,0.45);
  --topbar:rgba(34, 16, 16, 0.74);
  --homebtns: #3b1a1a;
}
html[data-theme="violet"] {
  --bg:#0f0a18; --panel:#1e1432; --text:#f3efff; --muted:#b5aad4;
  --border:rgba(210,190,255,0.10); --shadow:0 4px 24px rgba(0,0,0,0.45);
  --topbar:rgba(24, 16, 42, 0.74);
  --homebtns: #22153f;
}
html[data-theme="slate"] {
  --bg:#0b0f12; --panel:#161e26; --text:#eef4f8; --muted:#9eafc0;
  --border:rgba(210,230,255,0.08); --shadow:0 4px 24px rgba(0,0,0,0.38);
  --topbar:rgba(18, 26, 32, 0.74);
  --homebtns: #172734;
}
html[data-theme="porcelain"] {
  color-scheme: light;
  --bg: #f3f5f9;
  --panel: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --border: rgba(17, 24, 39, 0.10);
  --shadow: 0 4px 20px rgba(17, 24, 39, 0.08);
  --topbar: rgba(255, 255, 255, 0.78);
  --soft: rgba(17, 24, 39, 0.04);
  --soft2: rgba(17, 24, 39, 0.07);
  --softHover: rgba(17, 24, 39, 0.10);
  --promo-bg: rgba(17, 24, 39, 0.90);
  --promo-badge-bg: rgba(17, 24, 39, 0.92);
  --promo-text: #f8fafc;
  --promo-muted: rgba(248, 250, 252, 0.84);
  --promo-hover-overlay: rgba(255,255,255,0.08);
}
html[data-theme="fuchsia"] {
  color-scheme: dark;
  --bg: #120015;
  --panel: #200328;
  --text: #fff1fb;
  --muted: #d49cc5;
  --border: rgba(255, 105, 200, 0.12);
  --shadow: 0 4px 24px rgba(0,0,0,0.45);
  --topbar: rgba(27, 3, 32, 0.78);
  --soft: rgba(255,255,255,0.05);
  --soft2: rgba(255,255,255,0.07);
  --softHover: rgba(255,255,255,0.10);
}

/* ───── Forms ───── */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 12px; color: var(--muted); font-weight: 500; }
.select {
  appearance: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
}

/* ───── Raffle ───── */
.raffle-row { text-decoration: none; color: inherit; transition: background 120ms ease; }
.raffle-row:hover { background: var(--soft); }
.raffle-kv { display: inline-flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.raffle-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.raffle-title { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.countdown { font-variant-numeric: tabular-nums; }

.checks { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft);
  font-size: 13px;
}
.check input { accent-color: var(--text); }

.reqs { margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--soft); }
.req-title { font-weight: 800; margin-bottom: 8px; font-size: 13px; }
.req-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* ───── Admin Roulette ───── */
.roulette-card { margin-top: 12px; }
.roulette-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.roulette-testrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 10px;
  flex-wrap: wrap;
}
.roulette-testrow-right { display: flex; align-items: center; gap: 10px; }
.roulette-fake-input { width: 110px; }

.roulette-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent), color-mix(in srgb, var(--soft) 55%, transparent));
  padding: 10px;
  height: 106px;
}
.roulette-viewport::before, .roulette-viewport::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 3;
}
.roulette-viewport::before { left: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--panel) 92%, transparent), transparent); }
.roulette-viewport::after { right: 0; background: linear-gradient(270deg, color-mix(in srgb, var(--panel) 92%, transparent), transparent); }

.roulette-marker {
  position: absolute;
  top: 8px; bottom: 8px;
  left: 50%;
  width: 4px;
  transform: translateX(-2px);
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  z-index: 4;
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(255,255,255,0.15);
}

.roulette-track {
  --itemW: 134px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  transform: translate3d(0,0,0);
  will-change: transform;
}

.roulette-item {
  position: relative;
  flex: 0 0 var(--itemW);
  height: 86px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--soft) 85%, transparent);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  box-sizing: border-box;
  user-select: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.roulette-item img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--soft2);
  flex: 0 0 auto;
}
.roulette-item .name { font-weight: 700; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70px; }
.roulette-item.is-fake { border-style: dashed; opacity: 0.85; }

.roulette-badge {
  position: absolute;
  top: 6px; right: 6px;
  z-index: 2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
}

.roulette-item.is-winner {
  border-color: color-mix(in srgb, var(--accent) 60%, rgba(255,255,255,0.15));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent),
    0 0 20px color-mix(in srgb, var(--accent) 25%, transparent);
  transform: translateY(-1px) scale(1.02);
}

.roulette-status { margin-top: 8px; }
.roulette-card .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 520px) {
  .roulette-track { --itemW: 120px; gap: 10px; }
  .roulette-fake-input { width: 100px; }
  .roulette-item { height: 80px; padding: 10px; }
  .roulette-item img { width: 42px; height: 42px; }
}

/* ───── Toast ───── */
.toast {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 24px));
  z-index: 9999;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  padding: 16px;
  animation: toastPop 160ms cubic-bezier(.22,.68,0,1.15);
}
body.toast-open::before {
  content: "";
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 9998;
}
@keyframes toastPop {
  from { transform: translate(-50%, -50%) scale(0.96); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.toast.toast-error { border-color: rgba(255, 80, 80, 0.35); }
.toast.toast-ok { border-color: rgba(80, 255, 160, 0.25); }
.toast-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.toast-title { font-weight: 800; font-size: 15px; }
.toast-msg { opacity: 0.9; line-height: 1.5; font-size: 14px; }
.toast-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.toast .btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; height: 36px; padding: 0 14px; font-size: 13px; }
.toast-close { background: transparent; border: 0; cursor: pointer; color: var(--text); opacity: 0.6; transition: opacity 120ms ease; }
.toast-close:hover { opacity: 1; }

@media (max-width: 640px) {
  .toast-actions { flex-direction: column; align-items: stretch; }
  .toast .btn { width: 100%; }
}

/* ───── Requirement Chips ───── */
.req-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--soft);
}
.req-title { font-weight: 800; margin-bottom: 8px; font-size: 13px; }
.req-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.req-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--fill-1, rgba(255,255,255,0.03));
  color: inherit;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: background 120ms ease;
}
.req-chip.missing:hover { background: var(--softHover); cursor: pointer; }
.req-chip.ok { border-color: rgba(80, 255, 160, 0.25); }

.req-chip .mark {
  display: inline-flex;
  width: 16px; height: 16px;
  align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  line-height: 1;
  opacity: 0.85;
}
.req-chip.ok .mark { border-color: rgba(80, 255, 160, 0.35); }
.req-chip.missing .mark { border-color: rgba(255, 200, 120, 0.25); }


