/* CLEAN THEME: flatter, calmer look for everything except the cards.
   Loaded last. Delete this file (and its <link>) to get the old look back.
   The glow on epic + legendary cards is at the bottom. */

:root {
  --bg: #0f0d24;
  --bg-2: #1b1844;
  --panel: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.09);
  --muted: rgba(245, 241, 255, 0.6);
}
body { background: radial-gradient(ellipse at 50% -10%, #231f58, var(--bg) 65%) fixed; }
body::before, body::after, .bg-cards { display: none; }          /* no drifting glows, stars or floating cards */
::selection { background: var(--accent); color: var(--accent-ink); }
html { scrollbar-color: #4a4296 transparent; }

/* ---- top bar + tabs ---- */
.topbar { background: rgba(15, 13, 36, 0.88); box-shadow: none; }
.topbar::after, .brand-mark::after { content: none; }
.brand-mark { background: var(--accent); color: var(--accent-ink); box-shadow: none; border-radius: 7px; }
.tabs { gap: 0.15rem; padding: 0; background: none; }
.tab { padding: 0.45rem 1rem; border-radius: 10px; }
.tab:hover { background: rgba(255, 255, 255, 0.06); }
.tab.active { background: rgba(255, 181, 52, 0.16); color: var(--accent); box-shadow: none; }
.tab.active .tab-count { background: rgba(255, 181, 52, 0.22); }

/* ---- buttons ---- */
.btn { border-width: 1px; border-color: var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.06); }
.btn:hover { background: rgba(255, 255, 255, 0.12); transform: none; }
.btn:active { transform: translateY(1px); }
.btn-main, .btn-main:hover { color: var(--accent-ink); border-color: var(--accent); box-shadow: none; }
.btn-main { background: var(--accent); }
.btn-main:hover { background: #ffc65c; }
.btn:disabled { background: transparent; border-color: var(--line); }
.btn-discord { border-radius: 10px; box-shadow: none; }
.filters { background: none; border: 1px solid var(--line); border-radius: 12px; padding: 0.2rem; }
.filter { border-radius: 9px; }
.filter.active { background: rgba(255, 255, 255, 0.14); color: var(--ink); }

/* ---- surfaces: one flat panel style everywhere ---- */
.panel, .shelf, .stat, .free-status, .coll-bar, .shop-pack, .shelf-pack, .sell-row, .tip {
  background: var(--panel); border: 1px solid var(--line); box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.panel, .shelf, .coll-bar, .shop-pack, .free-status { border-radius: 14px; }
.stat { border-radius: 12px; }
.stat:hover, .shelf-pack:hover, .shop-pack:hover { transform: translateY(-2px); box-shadow: none; border-color: rgba(255, 255, 255, 0.25); }
.sell-row { border-left-width: 3px; }
.sell-row.is-shiny { background: rgba(255, 79, 163, 0.1); }
.tip { background: none; border: 0; border-radius: 0; font-size: 0.82rem; font-weight: 700; }

/* ---- packs screen ---- */
main { max-width: 1000px; }
.view { padding-top: 2.2rem; }
.hero-title { font-size: clamp(1.7rem, 4vw, 2.3rem); text-shadow: none; }
.hero-sub { font-weight: 700; }
.stats { gap: 0.6rem; }
.stat { min-width: 112px; padding: 0.6rem 0.9rem; }
.stat b { font-size: 1.6rem; }
.stat span { font-size: 0.66rem; }
.stat-shiny.has { box-shadow: none; }
.section-head h2, .shop-head h1 { text-shadow: none; }
.section-head h2 { font-size: 1.2rem; }
.rarity-bars { gap: 0.65rem; }
.progress { height: 8px; }
.pip { border-radius: 3px; }
.pip.on { box-shadow: none; }
.shelf-pack .sp-art, .sp-art { animation: none; }
.sp-open { box-shadow: none; border-radius: 8px; }
.shelf-empty { border-radius: 12px; }

/* ---- shop + account ---- */
.coins, .shop-balance { background: var(--panel); border-color: var(--line); }
.coin-icon { box-shadow: none; }
.account-chip { border: 1px solid var(--line); background: none; }
.toast { border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.admin-bar { background: rgba(27, 24, 68, 0.92); }

/* ---- calm tab switch ---- */
.view:not([hidden]) { animation: view-in 0.25s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* ---- CARDS: glow on epic and up (stronger the rarer it is) ---- */
.card[data-rarity="epic"] .card-front      { box-shadow: 0 0 20px 1px color-mix(in srgb, var(--rc) 55%, transparent), 0 12px 26px rgba(0, 0, 0, 0.45); }
.card[data-rarity="legendary"] .card-front { box-shadow: 0 0 28px 4px color-mix(in srgb, var(--rc) 65%, transparent), 0 12px 26px rgba(0, 0, 0, 0.45); }
.card[data-rarity="mythic"] .card-front    { box-shadow: 0 0 32px 6px color-mix(in srgb, var(--rc) 70%, transparent), 0 12px 26px rgba(0, 0, 0, 0.45); }
.card[data-rarity="exotic"] .card-front    { box-shadow: 0 0 36px 8px color-mix(in srgb, var(--rc) 72%, transparent), 0 12px 26px rgba(0, 0, 0, 0.45); }
.card[data-rarity="ultimate"] .card-front  { box-shadow: 0 0 40px 10px color-mix(in srgb, var(--rc) 75%, transparent), 0 0 70px 14px rgba(160, 10, 30, 0.35), 0 12px 26px rgba(0, 0, 0, 0.45); }
/* Celestial: cooler, tighter glow (icy blue-violet instead of a big pink halo) */
.card[data-rarity="celestial"] .card-front { box-shadow: 0 0 22px 4px rgba(150, 190, 255, 0.5), 0 0 40px 6px rgba(150, 130, 240, 0.22), 0 12px 26px rgba(0, 0, 0, 0.45); }
.card:not(.shiny):not(.violet):not(.metallic)[data-rarity="epic"] .card-front::before,
.card:not(.shiny):not(.violet):not(.metallic)[data-rarity="legendary"] .card-front::before,
.card:not(.shiny):not(.violet):not(.metallic)[data-rarity="mythic"] .card-front::before,
.card:not(.shiny):not(.violet):not(.metallic)[data-rarity="exotic"] .card-front::before,
.card:not(.shiny):not(.violet):not(.metallic)[data-rarity="ultimate"] .card-front::before,
.card:not(.shiny):not(.violet):not(.metallic)[data-rarity="celestial"] .card-front::before {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 11px; pointer-events: none; opacity: 0.55;
  background: linear-gradient(115deg, transparent 15%, color-mix(in srgb, var(--rc) 45%, transparent) 35%, rgba(255, 255, 255, 0.4) 47%, color-mix(in srgb, var(--rc) 45%, transparent) 59%, transparent 80%);
  background-size: 260% 260%; animation: shiny-holo 3.2s ease-in-out infinite alternate;
}
.card[data-rarity="legendary"]:not(.locked) .badge-rarity,
.card[data-rarity="mythic"]:not(.locked) .badge-rarity,
.card[data-rarity="exotic"]:not(.locked) .badge-rarity { box-shadow: 0 0 10px var(--rc); }

/* Ultimate: deep red, with a strong red glow */
.card[data-rarity="celestial"]:not(.locked) .badge-rarity { box-shadow: 0 0 6px rgba(170, 200, 255, 0.55); }
.card[data-rarity="ultimate"]:not(.locked) .badge-rarity { box-shadow: 0 0 12px var(--rc); }

/* Card top badges: slightly smaller so long pairs (Catastrophic + Legendary) fit on a 200px card */
.card-top .badge { font-size: 0.68rem; padding: 5px 8px; }

@media (prefers-reduced-motion: reduce) {
  .view:not([hidden]), .card:not(.shiny):not(.violet):not(.metallic)[data-rarity] .card-front::before { animation: none; }
}

/* ---- USE THE WHOLE SCREEN ---- */
#particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main { max-width: 1760px; padding: 0 clamp(1rem, 3vw, 3.5rem); }
.view-shop { max-width: none; }
.view-admin { max-width: 1200px; }
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.sell-list { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); }
.pack-col { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }

/* Packs screen on wide screens: pack in the middle, your stuff on both sides */
@media (min-width: 1100px) {
  .view-packs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px) minmax(0, 1fr); gap: 1.6rem 2.5rem; align-items: start; justify-items: stretch; }
  .packs-extra { display: contents; }
  .packs-top { grid-column: 1 / -1; grid-row: 1; }
  .pack-col { grid-column: 2; grid-row: 2; justify-self: center; }
  .extra-row { grid-column: 1; grid-row: 2; grid-template-columns: 1fr; }
  .shelf { grid-column: 3; grid-row: 2; }
  .cards { grid-column: 1 / -1; grid-row: 4; }
  .actions { grid-column: 1 / -1; grid-row: 5; justify-self: center; }
}
/* While a pack is opening: everything sits in the middle of the screen */
.view-packs:has(#packs-extra[hidden]) { min-height: calc(100vh - 66px); align-content: center; justify-content: center; }

/* special pack picked on the shelf */
.shelf-pack.selected { border-color: var(--glow); box-shadow: 0 0 0 1px var(--glow); }
.use-free { padding: 0.35rem 1rem; font-size: 0.85rem; }

/* ---- Recent pulls (mini cards) + matching left/right panel sizes ---- */
.showcase { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 0.8rem; width: 100%; }
.recent-tile { width: 120px; height: 186px; }
.recent-tile .card { transform: scale(0.6); transform-origin: 0 0; }
@media (max-width: 480px) { .recent-tile { width: 100px; height: 157px; } }
@media (min-width: 1100px) {
  .extra-row, .shelf { align-self: stretch; }          /* both sides are the same height */
  .shelf { display: flex; flex-direction: column; }
  .shelf-grid { flex: 1; align-content: center; }
}

/* ---- A LITTLE BIGGER: everything in rem grows 10%, and the fixed-pixel things below grow with it ---- */
html { font-size: 110%; }

.topbar { padding-block: 0.85rem; }                       /* top bar is a bit taller too */
.tab { padding: 0.55rem 1.15rem; }
.view, .view-packs:has(#packs-extra[hidden]) { min-height: calc(100vh - 74px); }
.admin-bar { top: 82px; }
@media (max-width: 560px) { .admin-bar { top: 118px; } }
.account-avatar { width: 30px; height: 30px; }

/* cards: same shape, 10% larger (text grows with the rem, so the box grows with it) */
.card { width: 220px; height: 341px; }
.card-art { height: 128px; }
.recent-tile { width: 132px; height: 205px; }
@media (max-width: 480px) {
  .card { width: 183px; height: 288px; }
  .card-art { height: 92px; }
  .recent-tile { width: 110px; height: 173px; }
}

/* the main pack (the tear strip stays 68px tall, only the body grows) */
.pack-stage { width: 242px; height: 341px; }
.pack-top { background-size: 242px 341px; }

.pip { width: 22px; height: 31px; }
.free-status { min-width: 264px; }
.stat { min-width: 123px; }
.shelf-pack { width: 165px; }
.sp-art { width: 92px; height: 130px; }
.sp-art.big { width: 114px; height: 160px; }

/* ---- tip lives under the pack now; pink bar in the Shiny view ---- */
.pack-col .tip { margin: 0; }
.view-packs:has(#packs-extra[hidden]) .tip { display: none; }
.view { padding-bottom: 1.5rem; }
.coll-bar.shiny-mode .progress-fill { background: linear-gradient(90deg, #ff4fa3, #ffd0ef); }
.coll-bar.shiny-mode .coll-text b { color: #ffb3e1; }

/* ---- no pointless scrolling on the Packs page; tip sits at the bottom of the windows ---- */
html.no-scroll { overflow: hidden; }
.pack-stage:not(.opening) .pack-rays { display: none; }       /* invisible rays were making the page taller */
.view { padding-top: 1.4rem; padding-bottom: 0.9rem; }
.pack-col { align-self: stretch; }
.pack-col .tip { margin-top: auto; }

/* Celestial holo sweep: softer and cooler than the other top tiers */
.card:not(.shiny):not(.violet):not(.metallic)[data-rarity="celestial"] .card-front::before {
  opacity: 0.35;
  background: linear-gradient(115deg, transparent 15%, rgba(140, 180, 255, 0.35) 35%, rgba(235, 245, 255, 0.45) 47%, rgba(160, 140, 245, 0.35) 59%, transparent 80%);
  background-size: 260% 260%;
}
