:root{
  --bg0:#070a12;
  --bg1:#0b1220;
  --card: rgba(16, 24, 40, .72);
  --card2: rgba(12, 18, 30, .78);
  --stroke: rgba(148, 163, 184, .22);
  --stroke2: rgba(148, 163, 184, .14);
  --text: #e8f0ff;
  --muted:#b7c3d6;

  /* Hypixel-ish accents */
  --cyan:#4fd7ff;
  --violet:#a78bfa;
  --pink:#fb7185;
  --green:#34d399;
  --gold:#fbbf24;
  --red:#fb7185;

  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --shadow2: 0 10px 30px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }

html, body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 15% 0%, rgba(79,215,255,.22), transparent 60%),
    radial-gradient(900px 600px at 85% 15%, rgba(167,139,250,.20), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(52,211,153,.10), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 55%, #070a12);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height:1.6;
  overflow-x:hidden;
}

/* subtle "minecraft" pattern, not pixel overload */
.bg-grid{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity:.18;
  mask-image: radial-gradient(700px 500px at 30% 10%, black 0%, transparent 70%);
}

.container{
  width:min(1120px, calc(100% - 36px));
  margin:0 auto;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:none; }

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:700;
  letter-spacing:.2px;
}
.brand img{ width:34px; height:34px; }

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 0;
  backdrop-filter: blur(12px);
}

.topbar::before{
  content:"";
  position:absolute;
  left:0; right:0; top:0; bottom:0;
  background: rgba(8, 12, 20, .55);
  border-bottom:1px solid var(--stroke2);
  z-index:-1;
}

#navLinks{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
#navLinks a{
  padding:10px 12px;
  border:1px solid transparent;
  border-radius:12px;
  color:rgba(232,240,255,.9);
  font-weight:600;
  font-size:14px;
}
#navLinks a:hover{
  border-color: var(--stroke);
  background: rgba(255,255,255,.05);
}
#navLinks a.active{
  border-color: rgba(79,215,255,.35);
  background: rgba(79,215,255,.10);
}

.cart-link span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  background: rgba(251,191,36,.18);
  border:1px solid rgba(251,191,36,.35);
  margin-left:8px;
  font-size:12px;
}

/* Mobile nav toggle */
.nav-toggle{
  display:none;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  font-size:16px;
  cursor:pointer;
}

.glass{
  background: var(--card);
  border: 1px solid var(--stroke2);
  box-shadow: var(--shadow2);
  border-radius: 18px;
}

.hero{
  margin-top:18px;
  padding:34px 34px 30px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:22px;
  align-items:start;
}

.kicker{
  display:inline-flex;
  gap:10px;
  align-items:center;
  font-weight:700;
  letter-spacing:.25px;
  color:rgba(232,240,255,.84);
  font-size:13px;
}
.kicker::before{
  content:"";
  width:10px; height:10px;
  border-radius:4px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 0 4px rgba(79,215,255,.10);
}

.hero h1{
  margin:10px 0 10px;
  font-family: "Press Start 2P", system-ui;
  font-size: 30px;
  line-height:1.25;
  letter-spacing:.6px;
}
.hero p{
  margin:0 0 14px;
  color: rgba(232,240,255,.86);
  font-size: 16px;
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin: 16px 0 8px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid var(--stroke);
  font-weight:800;
  font-size:14px;
  cursor:pointer;
  user-select:none;
  transition: transform .08s ease, background .2s ease, border-color .2s ease;
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  border-color: rgba(79,215,255,.40);
  background: linear-gradient(135deg, rgba(79,215,255,.22), rgba(167,139,250,.18));
}
.btn-primary:hover{
  background: linear-gradient(135deg, rgba(79,215,255,.28), rgba(167,139,250,.22));
}

.btn-secondary{
  border-color: rgba(52,211,153,.35);
  background: rgba(52,211,153,.12);
}
.btn-secondary:hover{ background: rgba(52,211,153,.16); }

.quick-stats{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
.stat{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.04);
}
.stat .label{ color:rgba(232,240,255,.72); font-size:12px; font-weight:700; }
.stat .value{ font-size:16px; font-weight:800; margin-top:3px; }

.hero-side{
  padding:18px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border-radius:18px;
  border:1px solid var(--stroke2);
}
.hero-side h3{
  margin:0 0 8px;
  font-size:14px;
  font-weight:900;
  letter-spacing:.2px;
}
.hero-side p{
  margin:0 0 12px;
  font-size:14px;
  color:rgba(232,240,255,.78);
}
.badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.badge{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.04);
  font-weight:800;
  font-size:12px;
  color: rgba(232,240,255,.88);
}
.badge.cyan{ border-color: rgba(79,215,255,.35); background: rgba(79,215,255,.10); }
.badge.gold{ border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.10); }
.badge.green{ border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.10); }

.section{
  margin:22px 0 0;
  padding: 0 0 26px;
}
.section h2{
  margin: 0 0 12px;
  font-size:18px;
  font-weight:900;
  letter-spacing:.2px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}

.card{
  background: var(--card2);
  border: 1px solid var(--stroke2);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow2);
}
.card:hover{
  border-color: rgba(79,215,255,.30);
}
.card h3{
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 900;
}
.card p{
  margin:0;
  color: rgba(232,240,255,.78);
  font-size: 14px;
}

/* Product list pages */
.product-grid, .products{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}

.product{
  background: var(--card2);
  border: 1px solid var(--stroke2);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow2);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.product:hover{ border-color: rgba(167,139,250,.32); }

.product .title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.product .title h3{
  margin:0;
  font-size:16px;
  font-weight:900;
}
.price{
  font-weight:900;
  color: rgba(251,191,36,.95);
}
.product ul{
  margin:0;
  padding-left:18px;
  color: rgba(232,240,255,.78);
  font-size:14px;
}
.product .actions{
  margin-top:auto;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.input, input, select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size:14px;
}
input.readonly{ opacity:.85; }

.form{
  display:grid;
  gap:12px;
}

.notice{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(79,215,255,.22);
  background: rgba(79,215,255,.08);
  color: rgba(232,240,255,.88);
  font-size:14px;
}

.footer{
  margin: 28px 0 26px;
  color: rgba(232,240,255,.62);
  font-size: 13px;
  text-align:center;
}

/* ===== Responsive ===== */
@media (max-width: 900px){
  .nav-toggle{ display:inline-flex; }
  #navLinks{
    position:absolute;
    right:18px;
    top:62px;
    width:min(320px, calc(100vw - 36px));
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    padding:10px;
    border-radius:16px;
    background: rgba(8, 12, 20, .92);
    border: 1px solid var(--stroke2);
    box-shadow: var(--shadow);
  }
  #navLinks.open{ display:flex; }
  #navLinks a{ font-size:14px; }

  .hero{
    grid-template-columns: 1fr;
    padding: 26px 18px 18px;
  }
  .hero h1{ font-size: 24px; }
  .quick-stats{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: 1fr; }
  .product-grid, .products{ grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; }
}

/* ===== Page titles ===== */
.page-title{
  margin: 18px 0 6px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing:.2px;
}
.page-sub{
  margin: 0 0 16px;
  color: rgba(232,240,255,.72);
  font-size: 14px;
}
.muted{ color: rgba(232,240,255,.65); }

/* ===== Product cards injected by store.js ===== */
.card-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
  margin: 14px 0 18px;
}
.product-card{
  position:relative;
  padding:16px;
}
.product-card .product-icon{
  width:56px;
  height:56px;
  border-radius:14px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.04);
}
.product-card h3{
  margin:10px 0 4px;
  font-size:16px;
  font-weight:900;
}
.product-card p{
  margin:0 0 10px;
  color: rgba(232,240,255,.78);
  font-size:14px;
}
.product-card ul{
  margin:0 0 10px;
  padding-left:18px;
  color: rgba(232,240,255,.78);
  font-size:14px;
}
.product-card .price{
  margin: 6px 0 10px;
}
.tag{
  position:absolute;
  top:12px;
  right:12px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  border:1px solid rgba(251,191,36,.35);
  background: rgba(251,191,36,.12);
}
.product-card.featured{
  border-color: rgba(251,191,36,.35);
  box-shadow: 0 18px 55px rgba(251,191,36,.08), var(--shadow2);
}

/* ===== Checkout layout ===== */
.checkout-layout{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:14px;
  align-items:start;
}
.cart-items{
  display:grid;
  gap:10px;
}
.cart-item{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.03);
}
.cart-item .left{
  display:flex;
  gap:10px;
  align-items:center;
}
.cart-item img{
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid var(--stroke2);
}
.qty{
  display:flex;
  align-items:center;
  gap:8px;
}
.qty button{
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.05);
  color: var(--text);
  font-weight:900;
  cursor:pointer;
}
.cart-total-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--stroke2);
  font-weight:900;
}
.divider{
  height:1px;
  background: var(--stroke2);
  margin: 14px 0;
}
.checkout-form{
  display:grid;
  gap:12px;
}
.btn-pay{
  width:100%;
}
.paypal-box{
  padding:12px;
  border-radius:16px;
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.03);
}
.checkout-message{
  margin-top:10px;
  font-size:14px;
  color: rgba(232,240,255,.78);
}

/* ===== Tables ===== */
.rights-table-wrap{
  margin-top: 18px;
  padding: 16px;
}
.rights-table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}
.rights-table th, .rights-table td{
  padding:10px 10px;
  border-bottom:1px solid var(--stroke2);
}
.rights-table th{
  text-align:left;
  color: rgba(232,240,255,.85);
  font-weight:900;
}
.rights-table td{
  color: rgba(232,240,255,.75);
}

/* Responsive additions */
@media (max-width: 900px){
  .card-grid{ grid-template-columns: 1fr; }
  .checkout-layout{ grid-template-columns: 1fr; }
}
