*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #060f08;
  --surface: #0b1a0e;
  --surface2: #0f2214;
  --surface3: #132a18;
  --border: #1a3320;
  --text: #e8f5ea;
  --muted: rgba(160,210,170,0.6);
  --radius: 12px;
  --radius-sm: 8px;
  
  --c1: #22c55e;
  --c2: #a855f7;
  --c3: #f59e0b;
  --c4: #ec4899;
  --c5: #06b6d4;
  --c6: #ef4444;
  --c7: #3b82f6;
  --c8: #f05a28;
  --cat-color: #22c55e;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', 'Nunito Sans', sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg);
}
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60vh;
  background: url('bg.png') center top / cover no-repeat;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 100%);
  z-index: 0;
  pointer-events: none;
}

#bgCanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.35; }
nav, .hero, .store-layout, .cart-overlay, .cart-sidebar, .login-overlay, .toast-container { position: relative; z-index: 1; }

.stats-bar {
  position: relative; z-index: 1;
  background: #060f08;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  gap: 2.5rem; padding: 10px 1.5rem;
  flex-wrap: wrap;
}
.stat-item { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.stat-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; animation: pulse 2s ease-in-out infinite; }
.stat-dot.offline { background: #ef4444; animation: none; }
.stat-dot.loading { background: var(--border); animation: none; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(0.85)} }
.stat-value { color: var(--text); font-weight: 900; }

.announcement-wrap {
  position: relative; z-index: 1;
  max-width: 1380px; margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}
.announcement-card {
  background: #0b1a0e;
  border: 1px solid var(--border);
  border-left: 4px solid var(--cat-color);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex; align-items: flex-start; gap: 14px;
  animation: fadeUp 0.4s ease both;
}
.announcement-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.announcement-body {}
.announcement-title { font-size: 0.9rem; font-weight: 900; margin-bottom: 3px; }
.announcement-text { font-size: 0.82rem; color: var(--muted); font-weight: 600; line-height: 1.5; }
@keyframes fadeUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

nav {
  position: sticky; top: 0; z-index: 100;
  background: #040d06;
  border-bottom: 2px solid #1a3320;
  height: 66px; display: flex; align-items: center; padding: 0 1.5rem; gap: 10px;
}
.nav-logo {
  display: flex; align-items: center;
  text-decoration: none; position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-logo-img {
  height: 86px; max-width: 280px; width: auto; object-fit: contain; display: block; padding: 10px 0;
}
.nav-spacer { flex: 1; }

.nav-discord {
  display: flex; align-items: center; gap: 8px;
  background: #5865f2;
  color: #fff; padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 800; text-decoration: none;
  transition: opacity 0.15s; border: none;
  letter-spacing: 0.2px;
}
.nav-discord:hover { opacity: 0.88; }
.nav-discord svg { width: 16px; height: 16px; flex-shrink: 0; }

.user-pill {
  display: none; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 5px 12px 5px 5px;
}
.user-pill.visible { display: flex; }
.user-avatar { width: 30px; height: 30px; border-radius: 7px; image-rendering: pixelated; background: var(--surface2); }
.user-name { font-size: 0.88rem; font-weight: 800; }
.logout-btn { background: none; border: none; color: var(--muted); font-size: 0.75rem; cursor: pointer; padding: 0 0 0 4px; font-family: inherit; font-weight: 700; transition: color 0.15s; }
.logout-btn:hover { color: #f87171; }

.cart-nav-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border: 2px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 12px 22px; font-family: inherit; font-size: 0.95rem; font-weight: 800;
  cursor: pointer; transition: all 0.15s;
}
.cart-nav-btn:hover { border-color: #22c55e; color: #22c55e; }
.cart-badge {
  background: var(--c1); color: #fff; font-size: 0.68rem; font-weight: 900;
  min-width: 19px; height: 19px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.cart-badge.bump { animation: bump 0.3s ease; }
@keyframes bump { 0%,100%{transform:scale(1)} 50%{transform:scale(1.45)} }

.hero {
  padding: 2.5rem 1.5rem 1.5rem;
  max-width: 1380px; margin: 0 auto;
  position: relative;
}
.hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.8rem);
  font-weight: 900; letter-spacing: -0.5px; margin-bottom: 0.3rem;
}
.hero h1 span { color: #22c55e; }
.hero p { color: var(--muted); font-size: 0.9rem; font-weight: 700; }

.store-layout {
  max-width: 1380px; margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem; align-items: start;
}

.sidebar { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 8px; }
.sidebar-title {
  font-size: 0.68rem; font-weight: 900; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
  padding: 0 4px; margin-bottom: 4px;
}

.cat-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  border: none; border-radius: var(--radius);
  padding: 28px 36px; width: 100%;
  cursor: pointer; transition: filter 0.15s, transform 0.15s;
  text-align: left; position: relative; overflow: hidden;
  background: #0f2214; color: rgba(180,200,255,0.5);
  min-height: 110px;
}
.cat-btn::after {
  content: '→';
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 1rem; font-weight: 900; opacity: 0;
  transition: opacity 0.15s;
}
.cat-btn:hover { filter: brightness(1.08); transform: translateX(2px); }
.cat-btn:hover::after { opacity: 0.6; }

.cat-btn.active {
  color: #fff; filter: none; transform: none;
}
.cat-btn.active::after { opacity: 1; }

.cat-btn-label {
  font-size: 1.7rem; font-weight: 900; letter-spacing: -0.3px;
  line-height: 1; margin-bottom: 8px;
  text-transform: uppercase;
}
.cat-btn-sub {
  font-size: 0.9rem; font-weight: 700; opacity: 0.82;
}

.cat-btn[data-color="0"] { background: var(--surface2); }
.cat-btn[data-color="0"].active { background: var(--c1); }
.cat-btn[data-color="1"] { background: var(--surface2); }
.cat-btn[data-color="1"].active { background: var(--c2); }
.cat-btn[data-color="2"] { background: var(--surface2); }
.cat-btn[data-color="2"].active { background: var(--c3); }
.cat-btn[data-color="3"] { background: var(--surface2); }
.cat-btn[data-color="3"].active { background: var(--c4); }
.cat-btn[data-color="4"] { background: var(--surface2); }
.cat-btn[data-color="4"].active { background: var(--c5); }
.cat-btn[data-color="5"] { background: var(--surface2); }
.cat-btn[data-color="5"].active { background: var(--c6); }
.cat-btn[data-color="6"] { background: var(--surface2); }
.cat-btn[data-color="6"].active { background: var(--c7); }
.cat-btn[data-color="7"] { background: var(--surface2); }
.cat-btn[data-color="7"].active { background: var(--c8); }

.cat-btn:not(.active)[data-color="0"] { border-left: 3px solid #22c55e; }
.cat-btn:not(.active)[data-color="1"] { border-left: 3px solid var(--c2); }
.cat-btn:not(.active)[data-color="2"] { border-left: 3px solid var(--c3); }
.cat-btn:not(.active)[data-color="3"] { border-left: 3px solid var(--c4); }
.cat-btn:not(.active)[data-color="4"] { border-left: 3px solid var(--c5); }
.cat-btn:not(.active)[data-color="5"] { border-left: 3px solid var(--c6); }
.cat-btn:not(.active)[data-color="6"] { border-left: 3px solid var(--c7); }
.cat-btn:not(.active)[data-color="7"] { border-left: 3px solid var(--c8); }

.packages-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.packages-header h2 { font-size: 1.1rem; font-weight: 900; letter-spacing: -0.2px; }
.packages-count { font-size: 0.78rem; color: var(--muted); font-weight: 700; }

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.package-card {
  background: #0b1a0e;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s;
  animation: fadeUp 0.3s ease both;
  display: flex; flex-direction: column;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
.package-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); }

.card-image { aspect-ratio: 1 / 1; position: relative; overflow: hidden; background: var(--surface2); }
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.package-card:hover .card-image img { transform: scale(1.06); }
.card-image::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(to top, #0b1a0e 0%, transparent 100%);
  pointer-events: none;
}
.card-image-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  background: linear-gradient(135deg, #0f2214, #132a18);
}
.featured-badge {
  position: absolute; top: 8px; right: 8px;
  background: #f59e0b; color: #000;
  font-size: 0.6rem; font-weight: 900; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 99px;
}
.sale-badge {
  position: absolute; top: 8px; left: 8px;
  background: #ef4444; color: #fff;
  font-size: 0.6rem; font-weight: 900; text-transform: uppercase;
  padding: 3px 8px; border-radius: 99px;
}

.card-body { padding: 13px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.card-category { font-size: 0.65rem; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); opacity: 0.9; }
.card-name { font-size: 1rem; font-weight: 900; line-height: 1.22; }
.card-desc { font-size: 0.77rem; color: var(--muted); font-weight: 600; line-height: 1.5; flex: 1; }

.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.price-block { display: flex; align-items: baseline; gap: 5px; }
.card-price { font-size: 1.15rem; font-weight: 900; }
.currency { font-size: 0.8rem; color: var(--muted); }
.original-price { font-size: 0.75rem; color: var(--muted); text-decoration: line-through; }

.add-btn {
  background: var(--cat-color); border: none; border-radius: var(--radius-sm);
  color: #fff; padding: 8px 14px;
  font-family: inherit; font-size: 0.8rem; font-weight: 800;
  cursor: pointer; transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}
.add-btn:hover { opacity: 0.88; transform: scale(1.04); }
.add-btn.added { background: #22c55e; }

.skeleton-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.skeleton { background: var(--surface2); border-radius: 6px; animation: shimmer 1.5s ease-in-out infinite; }
@keyframes shimmer { 0%,100%{opacity:0.4} 50%{opacity:0.85} }
.skeleton-img { aspect-ratio: 1 / 1; height: auto; border-radius: 0; }
.skeleton-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 11px; }
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.full { width: 100%; }

.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-sidebar { position: fixed; top: 0; right: -420px; height: 100vh; width: 390px; background: #060f08; border-left: 2px solid var(--border); z-index: 201; transition: right 0.3s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.cart-sidebar.open { right: 0; }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.5rem; border-bottom: 2px solid var(--border); }
.cart-header h3 { font-size: 1.05rem; font-weight: 900; }
.cart-close { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); width: 30px; height: 30px; cursor: pointer; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.cart-close:hover { color: var(--text); }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 8px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 10px; color: var(--muted); }
.cart-empty-icon { font-size: 2.8rem; opacity: 0.3; }
.cart-empty p { font-size: 0.88rem; font-weight: 700; }
.cart-item { background: #0f2214; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.cart-item-icon { font-size: 1.3rem; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.84rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: 0.78rem; color: #22c55e; font-weight: 700; }
.cart-item-qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.qty-btn { background: var(--surface3); border: 1px solid var(--border); border-radius: 6px; color: var(--text); width: 26px; height: 26px; cursor: pointer; font-size: 1rem; font-weight: 900; display: flex; align-items: center; justify-content: center; transition: all 0.15s; line-height: 1; }
.qty-btn:hover { border-color: #22c55e; color: #22c55e; }
.qty-val { font-size: 0.88rem; font-weight: 900; min-width: 16px; text-align: center; }
.cart-item-unit { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.cart-footer { padding: 1.2rem 1.5rem; border-top: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; background: var(--surface2); border: 2px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 9px 12px; font-family: inherit; font-size: 0.82rem; font-weight: 700; outline: none; transition: border-color 0.15s; }
.coupon-info { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.coupon-row input::placeholder { color: var(--muted); }
.coupon-btn { background: var(--surface2); border: 2px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); padding: 9px 14px; font-family: inherit; font-size: 0.82rem; font-weight: 800; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.coupon-btn:hover { border-color: #22c55e; color: #22c55e; }
.cart-total-row { display: flex; align-items: center; justify-content: space-between; }
.cart-total-label { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.cart-total { font-size: 1.4rem; font-weight: 900; }
.checkout-btn { background: var(--cat-color); border: none; border-radius: var(--radius-sm); color: #fff; padding: 14px; font-family: inherit; font-size: 0.95rem; font-weight: 900; cursor: pointer; transition: opacity 0.15s; width: 100%; letter-spacing: 0.2px; }
.checkout-btn:hover:not(:disabled) { opacity: 0.88; }
.checkout-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.login-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 300; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.login-overlay.open { opacity: 1; pointer-events: all; }
.login-modal { background: #0b1a0e; border: 2px solid var(--border); border-top: 4px solid #22c55e; border-radius: var(--radius); padding: 2rem; width: min(420px, 92vw); animation: fadeUp 0.3s ease; }
.login-modal-icon { width: 52px; height: 52px; border-radius: 13px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1rem; }
.login-modal h3 { font-size: 1.25rem; font-weight: 900; margin-bottom: 6px; }
.login-modal p { font-size: 0.84rem; color: var(--muted); font-weight: 600; line-height: 1.55; margin-bottom: 1.2rem; }
.login-input { width: 100%; background: var(--surface2); border: 2px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 12px 14px; font-family: inherit; font-size: 0.95rem; font-weight: 700; outline: none; transition: border-color 0.15s; margin-bottom: 10px; }
.login-input:focus { border-color: #22c55e; }
.login-input::placeholder { color: var(--muted); }
.login-submit { width: 100%; background: #22c55e; border: none; border-radius: var(--radius-sm); color: #fff; padding: 13px; font-family: inherit; font-size: 0.95rem; font-weight: 900; cursor: pointer; transition: opacity 0.15s; }
.login-submit:hover { opacity: 0.88; }

.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 400; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: #0b1a0e; border: 2px solid var(--border); border-left: 4px solid #22c55e; border-radius: var(--radius-sm); padding: 11px 16px; font-size: 0.84rem; font-weight: 700; display: flex; align-items: center; gap: 10px; animation: toastIn 0.3s ease; min-width: 230px; }
.toast.error { border-left-color: #ef4444; }
.toast.info { border-left-color: #22c55e; }
@keyframes toastIn { from{opacity:0;transform:translateX(14px)} to{opacity:1;transform:translateX(0)} }
@keyframes toastOut { to{opacity:0;transform:translateX(14px)} }

@media (max-width: 800px) {
  .store-layout { grid-template-columns: 1fr; padding: 1rem 1rem 3rem; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar-title { display: none; }
  .cat-btn { width: auto; flex-direction: row; align-items: center; padding: 11px 16px; border-left: none !important; min-height: unset; }
  .cat-btn-sub { display: none; }
  nav { padding: 0 1rem; }
  .hero { padding: 1.8rem 1rem 1rem; }
  .cart-sidebar { width: 100%; right: -100%; }
}

footer {
  position: relative; z-index: 1;
  background: #030a04;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 1.8rem 2rem;
}
.footer-inner {
  max-width: 1380px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.footer-left { display: flex; flex-direction: column; gap: 5px; }
.footer-copy { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.footer-copy strong { font-weight: 900; }
.footer-sub { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.footer-payments {
  height: 40px; width: auto;
  object-fit: contain;
  opacity: 0.85;
  filter: brightness(0.95);
}
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}