/* Drop rates & pack odds — page styles on top of site.css.
   The legacy variable names are aliased so the data tables' inline colours keep working. */
.drop-rates {
  --primary: var(--gold);
  --secondary: var(--flame);
  --text-main: var(--text);
  --text-muted: var(--muted);
  --rarity-common: #b7bccb;
  --rarity-rare: #6fb4ff;
  --rarity-epic: #c084fc;
  --panel: var(--ink-2);
  --panel-2: #231d58;
  --panel-3: #110d2c;
}

.drop-rates .section { max-width: 1000px; margin: 0 auto; padding: 0 20px 48px; }
.drop-rates .section > h2 { text-align: center; margin: 24px 0 26px; text-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.drop-rates h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 14px; }
.drop-rates h3 { font-size: 1.25rem; }
.drop-rates h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; margin: 28px 0 10px; color: var(--gold); }
.drop-rates p { color: var(--muted); }
.drop-rates p strong { color: var(--text); }
.drop-rates a { color: var(--gold); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85em; color: var(--gold); background: rgba(255, 196, 58, .14); padding: 3px 6px; border-radius: 6px; }

/* panels */
.glass-panel {
  position: relative; overflow: hidden; padding: clamp(24px, 4vw, 40px);
  border: 3px solid #0f0b26; border-radius: var(--radius-lg); background: var(--panel);
  box-shadow: 0 8px 0 #0f0b26, 0 24px 50px rgba(0, 0, 0, .35);
}
.glass-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--gold), var(--flame)); }

.rules-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 22px; }
.rule-card { flex: 1 1 260px; max-width: 420px; padding: 22px; border: 2px solid #0f0b26; border-radius: var(--radius); background: var(--panel-2); box-shadow: 0 5px 0 #0f0b26; }
.rule-card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rule-card p { font-size: .98rem; }

/* pills */
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.pill-common { background: rgba(183, 188, 203, .14); color: var(--rarity-common); border: 1px solid rgba(183, 188, 203, .35); }
.pill-rare { background: rgba(111, 180, 255, .14); color: var(--rarity-rare); border: 1px solid rgba(111, 180, 255, .35); }
.pill-epic { background: rgba(192, 132, 252, .14); color: var(--rarity-epic); border: 1px solid rgba(192, 132, 252, .35); }
.pill-good { background: rgba(156, 224, 47, .14); color: var(--lime); border: 1px solid rgba(156, 224, 47, .35); }

/* accordions */
details.accordion { margin-bottom: 16px; border: 3px solid #0f0b26; border-radius: var(--radius); background: var(--panel); box-shadow: 0 6px 0 #0f0b26; }
details.accordion[open] { border-color: var(--gold); }
summary.acc-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 1.2rem; color: var(--text); }
summary.acc-header::-webkit-details-marker { display: none; }
summary.acc-header::after { content: ""; width: 12px; height: 12px; border: solid var(--gold); border-width: 0 3px 3px 0; transform: rotate(45deg); transition: transform .2s ease; margin-right: 6px; }
details.accordion[open] summary.acc-header::after { transform: rotate(-135deg); }
.acc-content { padding: 0 22px 22px; }

/* tables */
.table-wrapper { width: 100%; overflow-x: auto; margin: 14px 0 20px; border: 2px solid #0f0b26; border-radius: var(--radius-sm); background: var(--panel-3); }
.drop-rates table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; }
.drop-rates th, .drop-rates td { padding: 13px 16px; border-bottom: 1px solid var(--ink-line); font-size: .92rem; }
.drop-rates th { color: var(--gold); font-weight: 900; text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; }
.drop-rates tbody tr:last-child td { border-bottom: 0; }
.drop-rates tbody tr:hover { background: rgba(255, 255, 255, .04); }
.drop-rates td small { display: block; color: var(--muted); font-size: .75rem; margin-top: 3px; }
.drop-rates td.num, .drop-rates th.num { text-align: right; font-variant-numeric: tabular-nums; }

.formula-box { margin: 14px 0; padding: 14px 16px; border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; background: var(--panel-3); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85rem; color: var(--muted); white-space: pre-wrap; }
.worked-example { margin: 14px 0; padding: 14px 16px; border-left: 4px solid var(--flame); border-radius: 0 10px 10px 0; background: var(--panel-2); font-size: .95rem; color: #e6e1fb; }

.previews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 12px; }
.previews-grid img { width: 100%; border: 2px solid #0f0b26; border-radius: var(--radius-sm); }

/* calculator */
.calculator-wrapper { display: flex; flex-direction: column; gap: 18px; }
.hero-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.tab-btn {
  padding: 8px 15px; border: 2px solid #0f0b26; border-radius: 999px; cursor: pointer;
  background: var(--panel-2); color: var(--muted); font-weight: 800; font-size: .88rem;
  box-shadow: 0 3px 0 #0f0b26; transition: transform .12s ease, background .15s ease, color .15s ease;
}
.tab-btn:hover { transform: translateY(-2px); color: var(--text); }
.tab-btn[aria-pressed="true"] { background: var(--gold); color: var(--cream-ink); transform: translateY(1px); box-shadow: 0 2px 0 #0f0b26; }
#hero-name { font-size: 2.2rem !important; color: var(--gold) !important; margin-top: 4px !important; }
.hero-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-box { padding: 20px; text-align: center; border: 2px solid #0f0b26; border-radius: var(--radius); background: var(--panel-2); box-shadow: 0 5px 0 #0f0b26; }
.stat-box .percentage { margin: 8px 0 4px; font-family: var(--font-display); font-size: 2.3rem; }
.stat-box small { color: var(--muted); }
.stat-box.common { border-bottom: 4px solid var(--rarity-common); }
.stat-box.common .percentage { color: var(--rarity-common); }
.stat-box.rare { border-bottom: 4px solid var(--rarity-rare); }
.stat-box.rare .percentage { color: var(--rarity-rare); }
.stat-box.epic { border-bottom: 4px solid var(--rarity-epic); }
.stat-box.epic .percentage { color: var(--rarity-epic); }

/* responsive tables: each row becomes a card */
@media (max-width: 768px) {
  .drop-rates .section { padding-inline: 16px; }
  .table-wrapper { border: 0; background: transparent; overflow: visible; }
  .table-wrapper table, .table-wrapper tbody, .table-wrapper tr, .table-wrapper td { display: block; width: 100%; min-width: 0; }
  .table-wrapper thead { display: none; }
  .table-wrapper tr { margin-bottom: 12px; border: 2px solid #0f0b26; border-radius: var(--radius-sm); background: var(--panel-3); overflow: hidden; }
  .table-wrapper td { position: relative; min-height: 44px; padding: 11px 14px 11px 46%; text-align: right; border-bottom: 1px solid var(--ink-line); }
  .table-wrapper td:last-child { border-bottom: 0; }
  .table-wrapper td::before { content: attr(data-label); position: absolute; left: 14px; top: 11px; width: 42%; text-align: left; color: var(--gold); font-weight: 900; text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
  .table-wrapper td small { display: inline-block; margin-left: 6px; }
  .previews-grid, .hero-stats-grid { grid-template-columns: 1fr; }
}

/* language switcher (markup + base styles come from the multilingual page; this just seats it in the shared header) */
.site-header .language-switcher { position: relative; right: auto; top: auto; transform: none; --primary: var(--gold); }
.site-header .language-trigger { font-family: var(--font-body); background: var(--ink-2); border-color: var(--ink-line); }
.site-header .language-menu { background: var(--ink-2); border-color: var(--ink-line); }
.site-header .language-option { font-family: var(--font-body); }
.site-header .language-option[aria-checked="true"] { background: rgba(255, 196, 58, .15); box-shadow: inset 3px 0 0 var(--gold); }
@media (max-width: 600px) { .site-header .language-trigger { min-height: 38px; padding: 7px 9px; } }
