/* ===================== HOLLOWCROSS - meta UI ===================== */
:root { --cred: #6fb6c9; --r-mythic: #e23b6d; }

/* screen / view visibility (overrides base .screen rules) */
.screen { display: none; }
.screen.active { display: block; }
#screen-auth.active { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
#screen-game.active { display: flex; flex-direction: column; gap: 6px; padding: 8px; min-height: 100vh; }
.view { display: none; max-width: 1100px; margin: 0 auto; padding: 18px 14px 60px; }
.view.active { display: block; }
.hidden { display: none !important; }

/* ---------- auth ---------- */
.auth-box {
  background: rgba(12,10,14,0.88); border: 1px solid #2a242f; border-radius: 12px;
  padding: 30px 34px; width: 380px; max-width: 92vw; text-align: center;
  box-shadow: 0 0 60px rgba(142,28,32,0.25);
}
.auth-box #logo { max-width: 220px; margin-bottom: 6px; }
.tabs { display: flex; gap: 6px; margin: 14px 0; }
.tab { flex: 1; background: #1a1620; border: 1px solid #2e2733; color: var(--muted); padding: 9px; border-radius: 6px; cursor: pointer; font-weight: 700; letter-spacing: 1px; }
.tab.active { background: linear-gradient(180deg,#b3262b,#6e1417); color: #fff; border-color: #d8b27a40; }
.auth-form { display: none; flex-direction: column; gap: 10px; }
.auth-form.active { display: flex; }
.auth-form input { padding: 12px; background: #0c0a0e; border: 1px solid #3a3340; color: var(--ink); border-radius: 6px; font-size: 15px; }
.auth-form button { margin-top: 4px; }
.auth-form .ghost { background: none; border: 1px solid #3a3340; color: var(--muted); }
.verify-info { color: var(--muted); font-size: 14px; margin: 0; }
.auth-msg { margin-top: 12px; min-height: 20px; color: #e0a06a; font-size: 14px; }
.auth-msg.good { color: var(--gold); }

/* ---------- top bar ---------- */
#topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 8px 16px; background: rgba(10,8,12,0.95); border-bottom: 1px solid #2a242f;
}
#topbar .brand { font-family: Georgia, serif; letter-spacing: 3px; color: var(--gold); font-weight: 700; }
#topbar nav { display: flex; gap: 4px; }
.navbtn { background: none; border: 1px solid transparent; color: var(--muted); padding: 7px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.navbtn:hover { color: var(--ink); }
.navbtn.active { color: var(--ink); border-color: #3a3340; background: #17131c; }
#topbar .spacer { flex: 1; }
#topbar .gems { font-weight: 700; color: #d8b048; }
#topbar .gems .cred { color: var(--cred); margin-left: 6px; }
#topbar .gems .lvl { color: var(--gold); margin-left: 6px; }
#topbar .who { color: var(--ink); }

/* ---------- panels / hub ---------- */
.panel { background: rgba(14,12,16,0.7); border: 1px solid #2a242f; border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 14px; color: var(--gold); font-family: Georgia, serif; letter-spacing: 1px; }
.panel h2 small { color: var(--muted); font-weight: normal; font-size: 13px; letter-spacing: 0; }
.muted { color: var(--muted); }
.hub-hero { text-align: center; padding-top: 10px; }
.play-zone { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.play-card { background: rgba(14,12,16,0.8); border: 1px solid #2e2733; border-radius: 12px; padding: 18px 22px; width: 340px; max-width: 92vw; }
.play-card h3 { margin: 0 0 6px; color: var(--ink); }
.play-card .row { display: flex; gap: 10px; margin-top: 12px; }
.play-card select { flex: 1; background: #0c0a0e; border: 1px solid #3a3340; color: var(--ink); border-radius: 6px; padding: 10px; }
.hub-cards { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.hub-card { background: #15121a; border: 1px solid #2e2733; border-radius: 10px; padding: 16px 22px; cursor: pointer; min-width: 180px; transition: transform .1s, border-color .15s; }
.hub-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.hub-card h3 { margin: 0 0 4px; color: var(--gold); }
.hub-card p { margin: 0; color: var(--muted); font-size: 13px; }

button.big { font-size: 16px; padding: 12px 26px; }
button.small { padding: 6px 12px; font-size: 13px; }
button.ghost { background: none; border: 1px solid #3a3340; color: var(--muted); }

/* ---------- shop ---------- */
.bundle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bundle { background: #15121a; border: 1px solid #2e2733; border-radius: 10px; padding: 14px; text-align: center; }
.bundle h4 { margin: 0 0 8px; color: var(--ink); }
.bundle-gems { font-size: 20px; color: #d8b048; font-weight: 800; margin-bottom: 10px; }
.pack-filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chip { background: #15121a; border: 1px solid #2e2733; color: var(--muted); padding: 7px 14px; border-radius: 20px; cursor: pointer; font-weight: 600; }
.chip.active { background: var(--gold); color: #1a1206; border-color: var(--gold); }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pack-card { background: #15121a; border: 1px solid #2e2733; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; }
.pack-card h4 { margin: 0 0 6px; color: var(--gold); }
.pack-desc { color: var(--muted); font-size: 13px; flex: 1; }
.pack-buy { display: flex; gap: 8px; margin-top: 12px; }
.buy { background: linear-gradient(180deg,#b3262b,#6e1417); border: 1px solid #d8b27a40; color: #fff; padding: 9px 12px; border-radius: 6px; cursor: pointer; font-weight: 700; flex: 1; }
.buy.alt { background: linear-gradient(180deg,#2c6f86,#173f4d); }
.buy:disabled { filter: grayscale(.8) brightness(.6); cursor: default; }

/* ---------- collection ---------- */
.coll-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.coll-filters input, .coll-filters select { background: #0c0a0e; border: 1px solid #3a3340; color: var(--ink); border-radius: 6px; padding: 9px; }
.coll-filters .ownedonly { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; justify-items: center; }

/* card badges / states (cards themselves styled in style.css) */
.card.locked { filter: grayscale(1) brightness(.4); }
.count-badge { position: absolute; z-index: 4; top: 4px; right: 4px; background: #111; color: var(--gold); border: 1px solid var(--gold); border-radius: 10px; padding: 1px 7px; font-weight: 800; font-size: 12px; }
.new-badge { position: absolute; z-index: 4; top: 22px; right: 4px; background: #cf5a2a; color: #fff; border-radius: 4px; padding: 1px 6px; font-weight: 800; font-size: 10px; letter-spacing: 1px; }

/* mythic rarity */
.card.rarity-mythic { border-color: var(--r-mythic); box-shadow: 0 0 22px var(--r-mythic); }

/* ---------- salvage ---------- */
.salvage-rows { display: flex; flex-direction: column; gap: 10px; }
.salvage-row { display: flex; align-items: center; gap: 14px; background: #15121a; border: 1px solid #2e2733; border-left-width: 4px; border-radius: 8px; padding: 12px 16px; }
.salvage-row .sname { font-weight: 700; min-width: 120px; }
.salvage-row .sdupes { flex: 1; color: var(--muted); }
.salvage-row .buy { flex: 0 0 auto; }
.rarity-tag-common { border-left-color: #6b6b6b; }
.rarity-tag-rare { border-left-color: #3f7fb0; }
.rarity-tag-super { border-left-color: #8a4fb0; }
.rarity-tag-ultra { border-left-color: #c8a45a; }
.rarity-tag-legend { border-left-color: #cf5a2a; }
.rarity-tag-mythic { border-left-color: var(--r-mythic); }

/* ---------- overlays (pack reveal / game over) ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); }
.reveal-box { background: rgba(14,11,16,0.96); border: 1px solid #2e2733; border-radius: 14px; padding: 26px; text-align: center; max-width: 92vw; box-shadow: 0 0 80px rgba(207,90,42,0.3); }
.reveal-box h2 { color: var(--gold); font-family: Georgia, serif; letter-spacing: 2px; margin: 0 0 18px; }
.reveal-box h2.win { color: var(--gold); text-shadow: 0 0 18px var(--gold); }
.reveal-box h2.lose { color: #b03442; }
.reveal-cards { display: grid; grid-template-columns: repeat(4, 120px); gap: 12px; justify-content: center; margin-bottom: 20px; }
@media (max-width: 560px) { .reveal-cards { grid-template-columns: repeat(2, 120px); } }
.reveal-slot { animation: pop .45s cubic-bezier(.2,.9,.3,1.3) backwards; }
@keyframes pop { from { transform: scale(.3) rotate(-8deg); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.go-rewards { margin: 6px 0 18px; color: var(--ink); font-size: 16px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; align-items: center; }
.go-rewards .rw { background: #1a1620; border: 1px solid #3a3340; padding: 5px 12px; border-radius: 16px; font-weight: 700; }
.go-rewards .rw.muted { color: var(--muted); font-weight: normal; }
.go-rewards .lvlup { color: var(--gold); }

/* ---------- game status ---------- */
.game-status { text-align: center; color: var(--gold); min-height: 22px; letter-spacing: 1px; }

/* ---------- quests ---------- */
.navbtn.badge { position: relative; }
.navbtn.badge::after { content: ""; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: #cf5a2a; box-shadow: 0 0 6px #cf5a2a; }
.count-badge.inline { position: static; display: inline-block; vertical-align: middle; }

.day-cycle { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.day { flex: 1; min-width: 92px; background: #14111a; border: 1px solid #2e2733; border-radius: 8px; padding: 10px; text-align: center; }
.day .dnum { display: block; color: var(--muted); font-size: 12px; }
.day .drw { display: block; color: var(--ink); font-weight: 700; font-size: 13px; margin-top: 4px; }
.day.next { border-color: var(--gold); box-shadow: 0 0 14px rgba(200,164,90,0.35); }
.day.past { opacity: 0.45; }

.quest-list { display: flex; flex-direction: column; gap: 10px; }
.quest { display: flex; align-items: center; gap: 14px; background: #14111a; border: 1px solid #2e2733; border-radius: 8px; padding: 12px 16px; }
.q-main { flex: 1; }
.q-bar { margin-top: 8px; height: 7px; background: #0c0a0e; border-radius: 4px; overflow: hidden; }
.q-bar div { height: 100%; background: linear-gradient(90deg, #8e1c20, #cf5a2a); }
.q-reward { color: #d8b048; font-weight: 700; min-width: 130px; text-align: right; font-size: 13px; }
.q-action { min-width: 110px; text-align: right; }
.q-prog { color: var(--muted); }
.q-claimed { color: #6fc97a; font-weight: 700; }

/* ---------- story / tutorial ---------- */
.story-box { background: rgba(12,10,14,0.97); border: 1px solid #3a2f33; border-radius: 14px; padding: 30px 34px; width: 560px; max-width: 92vw; box-shadow: 0 0 80px rgba(142,28,32,0.35); }
.story-box .title { font-size: 30px; margin: 0 0 14px; text-align: center; }
.story-text { color: var(--ink); line-height: 1.6; min-height: 150px; }
.story-text p { margin: 0 0 12px; }
.story-text b { color: var(--gold); }
.story-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
#story-dots { display: flex; gap: 7px; }
#story-dots .dot { width: 9px; height: 9px; border-radius: 50%; background: #3a3340; }
#story-dots .dot.on { background: var(--gold); }
