/* ============================================================
   BLOODERA STORE — C3Gaming-inspired layout
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0a0a0e;
  --bg2:      #0f0f14;
  --bg3:      #16161e;
  --border:   rgba(255,255,255,.07);
  --border2:  rgba(255,255,255,.13);
  --red:      #DC143C;
  --red-glow: rgba(220,20,60,.4);
  --gold:     #D4AF37;
  --text:     #e8e8f0;
  --muted:    #7a7a90;
  --radius:   12px;
}

html { scroll-behavior: smooth; scroll-snap-type: none; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  background: rgba(8,8,12,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}

.nav-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo img { display: block; }

/* IP Copy button */
.nav-ip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.nav-ip:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); }
.ip-icon { font-size: .9rem; }
.ip-copy-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-left: 2px;
}

/* Right actions */
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }

.currency-wrap {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 7px 10px;
}
.currency-select {
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.currency-select option { background: #1a1a24; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity .15s, transform .12s;
  white-space: nowrap;
}
.nav-btn:hover { opacity: .85; transform: translateY(-1px); }

.discord-btn { background: #5865F2; color: #fff; }
.admin-btn   { background: rgba(255,255,255,.07); color: var(--muted); border: 1px solid var(--border2); }

/* IGN input */
.nav-ign {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 6px 12px;
}
.ign-icon { font-size: .9rem; }
.ign-input {
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: .84rem;
  font-weight: 600;
  width: 110px;
  outline: none;
}
.ign-input::placeholder { color: var(--muted); }

/* Cart button */
.nav-cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 7px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  position: relative;
  white-space: nowrap;
}
.nav-cart-btn:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.22); }
.cart-icon { flex-shrink: 0; }
.cart-badge {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 20px;
  padding: 0 5px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 70vh;
  margin-top: 64px; /* navbar height */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* Minecraft-atmosphere gradient — swap for a real BG image: */
  /* background: url('/bg.jpg') center/cover no-repeat; */
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(220,20,60,.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 20%,  rgba(80,0,20,.35)  0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 10%,  rgba(20,0,40,.4)   0%, transparent 60%),
    linear-gradient(180deg, #05000d 0%, #0a0010 40%, #120008 100%);
}

/* Grid overlay (Minecraft vibe) */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(220,20,60,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220,20,60,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--bg) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 20px;
}

.hero-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(2rem, 6vw, 4.5rem);
  color: #fff;
  text-shadow:
    0 0 20px var(--red-glow),
    0 0 60px var(--red-glow),
    0 0 100px rgba(220,20,60,.2);
  letter-spacing: .05em;
  line-height: 1.3;
  /* Red pixel-glow effect */
  -webkit-text-stroke: 2px rgba(220,20,60,.4);
}

.hero-sub {
  margin-top: 20px;
  color: rgba(255,255,255,.55);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .04em;
}

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.categories {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 0 24px 50px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  /* Pull cards up to overlap hero bottom */
  margin-top: -60px;
}

.cat-card {
  background: rgba(18,18,26,.95);
  border: 2px solid var(--border2);
  border-radius: 16px;
  width: 180px;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  backdrop-filter: blur(10px);
}

.cat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(220,20,60,.5);
  box-shadow: 0 12px 40px rgba(220,20,60,.2);
}

.cat-card.active {
  border-color: var(--red);
  background: rgba(220,20,60,.1);
  box-shadow: 0 8px 32px rgba(220,20,60,.25);
}

.cat-icon { font-size: 2.8rem; line-height: 1; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.cat-name { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; }

/* ============================================================
   BILLING BAR
   ============================================================ */
.billing-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}

.billing-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.billing-label { font-size: .82rem; color: var(--muted); font-weight: 500; }

.billing-toggle {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
}

.bill-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: 7px 18px;
  cursor: pointer;
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.bill-btn.active { background: var(--red); color: #fff; }
.bill-btn:not(.active):hover { background: rgba(255,255,255,.06); color: var(--text); }

.save-badge {
  background: var(--gold);
  color: #000;
  font-size: .65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .02em;
}

/* ============================================================
   PRODUCTS
   ============================================================ */
.store-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 100px;
  scroll-margin-top: 80px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.product-card {
  background: #13131c;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  border-color: var(--border2);
}

.card-stripe { height: 4px; width: 100%; }

.card-body { padding: 22px 22px 0; flex: 1; }

.card-icon { font-size: 2.2rem; margin-bottom: 10px; }

.card-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
}

.card-desc {
  margin-top: 6px;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.55;
}

.card-features {
  margin-top: 16px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-features li {
  font-size: .81rem;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}
.card-features li .check { flex-shrink: 0; font-weight: 800; font-size: .75rem; margin-top: 1px; }

.card-pricing { padding: 18px 22px 22px; }

.price-main { font-size: 1.9rem; font-weight: 800; color: #fff; line-height: 1; }
.price-period { font-size: .8rem; color: var(--muted); font-weight: 500; margin-left: 4px; }
.price-yearly-note { font-size: .74rem; color: var(--gold); margin-top: 4px; font-weight: 500; }

.btn-buy {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .15s, transform .12s;
  color: #fff;
}
.btn-buy:hover { opacity: .85; transform: translateY(-1px); }
.btn-buy:active { transform: scale(.98); }

.popular-badge {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--gold);
  color: #000;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
}

/* ============================================================
   QUANTITY SELECTOR (keys/gems)
   ============================================================ */
.qty-selector {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  justify-content: center;
}

.qty-btn {
  flex: 0 0 auto;
  width: 72px;
}

.qty-btn {
  flex: 1;
  background: var(--bg3);
  border: 2px solid var(--border2);
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 800;
  padding: 9px 4px 7px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  letter-spacing: .04em;
}
.qty-btn:hover {
  border-color: var(--card-color, var(--red));
  color: #fff;
  transform: translateY(-2px);
}
.qty-btn.active {
  background: color-mix(in srgb, var(--card-color, var(--red)) 20%, transparent);
  border-color: var(--card-color, var(--red));
  color: #fff;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--card-color, var(--red)) 30%, transparent);
}
.qty-discount {
  font-size: .62rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: .03em;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-icon { font-size: 3rem; margin-bottom: 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.footer-ip { font-size: .85rem; color: var(--muted); }
.footer-copy { font-size: .72rem; color: #383848; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(8px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: #16161f;
  border: 1px solid var(--border2);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 30px;
  position: relative;
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    }
}

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 6px;
  transition: background .15s;
}
.modal-close:hover { background: rgba(255,255,255,.08); color: var(--text); }

.modal-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.modal-icon { font-size: 2.4rem; }
.modal-title { font-size: 1.35rem; font-weight: 800; letter-spacing: .04em; color: #fff; }
.modal-price-line { font-size: .88rem; color: var(--muted); margin-top: 4px; }

/* Receipt toggle */
.receipt-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 9px;
}
.receipt-label {
  font-size: .84rem;
  font-weight: 600;
  color: var(--text);
}
.receipt-toggle {
  display: flex;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  overflow: hidden;
}
.receipt-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.receipt-btn.active { background: var(--red); color: #fff; }
.receipt-btn:not(.active):hover { background: rgba(255,255,255,.06); color: var(--text); }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.form-group input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  outline: none;
  transition: border-color .15s;
}
.form-group input:focus { border-color: var(--red); }
.form-hint { display: block; margin-top: 5px; font-size: .72rem; color: #50505a; }

.form-error {
  background: rgba(220,20,60,.1);
  border: 1px solid rgba(220,20,60,.3);
  border-radius: 8px;
  color: #ff6b80;
  font-size: .82rem;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.btn-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  background: var(--red);
  border: none;
  border-radius: 9px;
  color: #fff;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.btn-pay:hover { background: #b8102e; }
.btn-pay:active { transform: scale(.98); }
.btn-pay:disabled { opacity: .55; cursor: not-allowed; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   SKELETON
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -500px 0; }
  100% { background-position:  500px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, #1c1c28 50%, var(--bg3) 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 6px;
}
.skeleton-card {
  background: #13131c;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.skeleton-icon  { width: 44px; height: 44px; border-radius: 8px; }
.skeleton-title { height: 18px; width: 55%; }
.skeleton-desc  { height: 12px; width: 88%; }
.skeleton-desc2 { height: 12px; width: 72%; }
.skeleton-price { height: 32px; width: 42%; margin-top: 6px; }
.skeleton-btn   { height: 44px; width: 100%; border-radius: 9px; margin-top: 4px; }

/* ============================================================
   TOAST (copy IP feedback)
   ============================================================ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e1e2c;
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px 24px;
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero-title { font-size: 1.8rem; }
  .categories { gap: 12px; margin-top: -40px; }
  .cat-card { width: 140px; height: 130px; }
  .cat-icon { font-size: 2.2rem; }
  .products-grid { grid-template-columns: 1fr; }
  .nav-ip .ip-copy-label { display: none; }
  .modal-box { padding: 22px; }
}

@media (max-width: 520px) {
  .navbar { padding: 0 14px; gap: 10px; }
  .nav-btn span { display: none; }
  .discord-btn svg { margin: 0; }
  .cat-card { width: 110px; height: 110px; }
  .cat-name { font-size: .72rem; }
}
