:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-card: #1a1a3e;
  --bg-nav: #0d0d22;
  --accent: #7c5cfc;
  --accent-hover: #6a4be0;
  --accent-glow: rgba(124, 92, 252, 0.3);
  --danger: #ff4757;
  --success: #2ed573;
  --warning: #ffa502;
  --info: #48dbfb;
  --text: #e8e8f0;
  --text-secondary: #b0b0c8;
  --text-muted: #707090;
  --border: #2a2a4e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  padding: 1rem 2rem;
  transition: background 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
  background: rgba(13, 13, 34, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}
.logo i { color: var(--accent); font-size: 1.5rem; }
.logo .highlight { color: var(--accent); }
.pro-badge {
  font-size: 0.6rem;
  background: linear-gradient(135deg, var(--accent), #ff6b6b);
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.3rem;
  vertical-align: super;
  font-weight: 700;
}
.nav-toggle { display: none; color: var(--text); font-size: 1.3rem; cursor: pointer; background: none; border: none; padding: 0.4rem; line-height: 1; z-index: 1001; position: relative; }
.nav-menu { display: flex; align-items: center; gap: 0.5rem; }
.nav-link {
  color: var(--text-secondary);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(124, 92, 252, 0.1); }
.nav-link.active { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 0.8rem; margin-left: 1rem; }

.balance-display {
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}
.balance-display:hover { background: rgba(124, 92, 252, 0.2); }
.topup-icon { font-size: 0.7rem; color: var(--success); }

.user-dropdown { position: relative; display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #ff6b6b); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; color: #fff; }
.username { font-size: 0.85rem; font-weight: 600; }
.role-badge { font-size: 0.65rem; padding: 0.1rem 0.4rem; border-radius: 4px; font-weight: 600; }
.role-badge.admin { background: var(--warning); color: #000; }
.role-badge.buyer { background: var(--success); color: #000; }
.dropdown-menu {
  position: absolute; top: 100%; right: 0; margin-top: 0.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.5rem; min-width: 200px;
  display: none; box-shadow: var(--shadow);
}
.user-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.8rem; border-radius: 6px; color: var(--text-secondary);
  font-size: 0.85rem;
}
.dropdown-menu a:hover { background: rgba(124, 92, 252, 0.1); color: var(--text); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--border); margin: 0.3rem 0; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.2s; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #6a4be0); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px var(--accent-glow); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #e84141; }
.btn-success { background: var(--success); color: #000; }
.btn-success:hover { background: #26bf65; }
.btn-text { background: none; color: var(--accent); padding: 0.3rem 0.5rem; }
.btn-text:hover { color: var(--accent-hover); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.8rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* MAIN */
.main-content { position: relative; z-index: 1; min-height: 100vh; padding-top: 80px; }

/* HERO */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#blackholeCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center; gap: 0.5rem;
  background: rgba(124, 92, 252, 0.15);
  border: 1px solid rgba(124, 92, 252, 0.3);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), #ff6b6b, var(--info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; margin-bottom: 3rem; }
.hero-stats { display: flex; gap: 3rem; justify-content: center; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* SECTIONS */
.section { max-width: 1280px; margin: 0 auto; padding: 3rem 2rem; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.section-header h2 { font-size: 1.5rem; }
.section-header h2 i { color: var(--accent); margin-right: 0.5rem; }

/* PRODUCT GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(124, 92, 252, 0.15);
}
.product-icon {
  width: 50px; height: 50px;
  background: rgba(124, 92, 252, 0.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--accent);
  margin-bottom: 0.8rem;
}
.product-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.product-seller { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.product-seller i { margin-right: 0.3rem; }
.product-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-meta { display: flex; gap: 0.8rem; margin-bottom: 0.8rem; font-size: 0.75rem; }
.product-stock { padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 600; }
.product-stock.in-stock { background: rgba(46, 213, 115, 0.15); color: var(--success); }
.product-stock.low-stock { background: rgba(255, 165, 2, 0.15); color: var(--warning); }
.product-stock.out-of-stock { background: rgba(255, 71, 87, 0.15); color: var(--danger); }
.product-downloads { color: var(--text-muted); }
.product-footer { display: flex; justify-content: space-between; align-items: center; }
.product-price { font-size: 1.15rem; font-weight: 800; color: var(--accent); }

/* CATEGORY CARDS */
.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}
.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--cat-color, var(--accent));
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.cat-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(124, 92, 252, 0.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.8rem;
  font-size: 1.5rem;
  color: var(--cat-color, var(--accent));
}
.category-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.category-card p { font-size: 0.8rem; color: var(--text-muted); }

/* FEATURES */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.feature-icon {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(124, 92, 252, 0.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.8rem;
  font-size: 1.3rem;
  color: var(--accent);
}
.feature-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.feature-card p { font-size: 0.85rem; color: var(--text-muted); }

/* PAGE HEADER */
.page-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 2rem 1.5rem;
}
.page-header h1 { font-size: 1.8rem; }
.page-header h1 i { color: var(--accent); margin-right: 0.5rem; }
.page-header p { color: var(--text-muted); margin-top: 0.3rem; }

/* AUTH */
.auth-page {
  min-height: calc(100vh - 80px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.auth-container { width: 100%; max-width: 420px; }
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.auth-header { text-align: center; margin-bottom: 1.5rem; }
.auth-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6a4be0);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.4rem; color: #fff;
}
.auth-header h1 { font-size: 1.5rem; }
.auth-header p { color: var(--text-muted); font-size: 0.9rem; }
.auth-form .form-group { margin-bottom: 1rem; }
.auth-form label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.3rem; }
.auth-form label i { margin-right: 0.3rem; }
.auth-form input {
  width: 100%; padding: 0.7rem 0.9rem;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.9rem; font-family: inherit;
}
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-footer { text-align: center; margin-top: 1.2rem; font-size: 0.85rem; color: var(--text-muted); }

/* EXPLORE */
.explore-tools {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem 1.5rem;
}
.search-bar {
  display: flex; align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.5rem 1.2rem;
  margin-bottom: 1rem;
}
.search-bar i { color: var(--text-muted); margin-right: 0.8rem; }
.search-bar input {
  flex: 1; background: none; border: none; color: var(--text);
  font-size: 0.95rem; font-family: inherit;
}
.search-bar input:focus { outline: none; }
.filter-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* CART */
.cart-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
.cart-items { display: flex; flex-direction: column; gap: 0.8rem; }
.cart-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem;
}
.item-info h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.item-price { color: var(--accent); font-weight: 700; }
.item-actions { display: flex; gap: 0.5rem; }
.cart-sidebar { position: sticky; top: 100px; }
.cart-summary-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.cart-summary-card h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.summary-row { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9rem; }
.summary-row.total { border-top: 1px solid var(--border); padding-top: 1rem; font-size: 1.1rem; font-weight: 700; }
.summary-row.total .price { color: var(--accent); }

/* ORDERS */
.orders-list { max-width: 800px; margin: 0 auto; padding: 0 2rem; display: flex; flex-direction: column; gap: 1rem; }
.order-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.order-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.8rem;
}
.order-items { border-top: 1px solid var(--border); }
.order-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 0; border-bottom: 1px solid var(--border);
}
.order-item:last-child { border-bottom: none; }
.item-name { font-size: 0.9rem; }
.order-total { text-align: right; font-weight: 700; color: var(--accent); padding-top: 0.5rem; }

/* TABS */
.tabs {
  max-width: 800px; margin: 0 auto; padding: 0 2rem;
  display: flex; gap: 0.5rem; margin-bottom: 1.5rem;
}
.tab {
  padding: 0.6rem 1.2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary); cursor: pointer;
  font-family: inherit; font-size: 0.85rem;
  transition: all 0.2s;
}
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* SELL */
.sell-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
.sell-form-container { }
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.card-header { padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--border); }
.card-header h2 { font-size: 1.1rem; }
.card-header h2 i { color: var(--accent); margin-right: 0.5rem; }
.card-header p { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }
.sell-form { padding: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.3rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.65rem 0.8rem;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.9rem; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 80px; }

.file-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.file-dropzone:hover { border-color: var(--accent); }
.file-dropzone.has-file { border-color: var(--success); background: rgba(46, 213, 115, 0.05); }
.dropzone-content i { font-size: 2rem; color: var(--accent); margin-bottom: 0.5rem; }
.dropzone-content p { font-size: 0.9rem; color: var(--text-secondary); }
.dropzone-content .link { color: var(--accent); cursor: pointer; }
.file-hint { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }
.file-selected { display: none; align-items: center; gap: 0.8rem; justify-content: center; }
.file-selected i { font-size: 1.5rem; color: var(--success); }
.file-name { font-size: 0.9rem; }

.sell-sidebar { position: sticky; top: 100px; }
#myProductsList { padding: 0.5rem 0; }

/* ADMIN */
.admin-dashboard {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.admin-stat-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.stat-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
}
.stat-info { }
.stat-value { display: block; font-size: 1.3rem; font-weight: 800; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }

.admin-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.admin-tab {
  padding: 0.6rem 1.2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary); cursor: pointer;
  font-family: inherit; font-size: 0.85rem;
  transition: all 0.2s;
}
.admin-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

.pending-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 0.5rem;
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  align-items: center; justify-content: center;
  backdrop-filter: blur(5px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 1.1rem; }
.modal-header h2 i { color: var(--accent); margin-right: 0.5rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.modal-footer {
  display: flex; gap: 0.5rem; justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.qr-wrapper {
  position: relative;
  display: inline-block;
  background: #fff;
  padding: 1rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.qr-wrapper img {
  width: 220px;
  height: 220px;
  display: block;
  border-radius: 8px;
}
.qr-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.qr-amount { font-size: 1.8rem; font-weight: 800; color: var(--accent); margin-bottom: 0.2rem; }
.qr-orderid { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 1rem; }
.qr-apps { margin-bottom: 1rem; }
.qr-apps span { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 0.4rem; }
.qr-apps-icons { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; }
.qr-apps-icons span {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 600;
}
.qr-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(255,165,2,0.08);
  border: 1px solid rgba(255,165,2,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--warning);
}
.qr-status-dot {
  width: 8px; height: 8px;
  background: var(--warning);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
.qr-timer { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.topup-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}
.topup-main { display: flex; flex-direction: column; gap: 1.5rem; }
.topup-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.topup-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.topup-preset {
  padding: 0.8rem 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
  position: relative;
}
.topup-preset:hover { border-color: var(--accent); background: rgba(124, 92, 252, 0.1); }
.topup-preset.active { border-color: var(--accent); background: rgba(124,92,252,0.15); box-shadow: 0 0 0 2px var(--accent-glow); }
.topup-preset .amount { display: block; font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.topup-preset .bonus { display: inline-block; font-size: 0.6rem; background: var(--success); color: #fff; padding: 0.05rem 0.4rem; border-radius: 8px; margin-top: 0.15rem; font-weight: 600; }
.topup-preset .bonus:empty { display: none; }
.topup-custom { margin-top: 1rem; }
.topup-custom label { font-size: 0.85rem; color: var(--text-secondary); display: block; margin-bottom: 0.3rem; }
.topup-input-group { display: flex; align-items: center; }
.topup-input-group .prefix {
  padding: 0.65rem 0.8rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.topup-input-group input {
  flex: 1;
  padding: 0.65rem 0.8rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
  font-family: inherit;
}
.topup-input-group input:focus { outline: none; border-color: var(--accent); }

/* PRODUCT DETAIL */
.product-detail {
  max-width: 700px;
  margin: 2rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.detail-icon {
  width: 80px; height: 80px;
  background: rgba(124, 92, 252, 0.1);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  color: var(--accent);
}
.product-detail h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.detail-meta { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.detail-meta i { margin-right: 0.3rem; }
.detail-price { font-size: 2rem; font-weight: 800; color: var(--accent); margin-bottom: 1rem; }
.detail-desc { color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.7; }
.detail-actions { display: flex; gap: 1rem; justify-content: center; }

/* ERROR PAGE */
.error-page { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; }
.error-container { text-align: center; }
.error-icon { font-size: 4rem; color: var(--warning); margin-bottom: 1rem; }
.error-container h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.error-container p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 3rem; }
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; display: block; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* LOADING */
.loading-state { text-align: center; padding: 3rem; color: var(--text-muted); font-size: 1rem; }
.loading-state i { margin-right: 0.5rem; }

/* ALERT */
.alert { padding: 0.7rem 1rem; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 1rem; }
.alert.error { background: rgba(255, 71, 87, 0.1); border: 1px solid rgba(255, 71, 87, 0.3); color: var(--danger); }
.alert.success { background: rgba(46, 213, 115, 0.1); border: 1px solid rgba(46, 213, 115, 0.3); color: var(--success); }
.alert.warning { background: rgba(255, 165, 2, 0.1); border: 1px solid rgba(255, 165, 2, 0.3); color: var(--warning); }
.alert.info { background: rgba(72, 219, 251, 0.1); border: 1px solid rgba(72, 219, 251, 0.3); color: var(--info); }

/* TOAST */
#toastContainer {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 360px;
}
.toast.show { transform: translateX(0); }
.toast i.fa-check-circle { color: var(--success); }
.toast i.fa-times-circle { color: var(--danger); }
.toast i.fa-info-circle { color: var(--info); }
.toast i.fa-exclamation-circle { color: var(--warning); }

/* FOOTER */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 3rem;
}
.footer-brand .logo { margin-bottom: 0.8rem; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-col h4 { font-size: 0.9rem; margin-bottom: 0.8rem; color: var(--text); }
.footer-col a {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* PRODUCT TABS (Vorlex Products / Panel Pterodactyl switcher) */
.product-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}
.product-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.product-tab i { font-size: 1rem; }
.product-tab:hover { color: var(--text); border-color: var(--accent); }
.product-tab.active {
  background: linear-gradient(135deg, var(--accent), #6a4be0);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* NOTICE BANNER */
.notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: rgba(255, 165, 2, 0.1);
  border: 1px solid rgba(255, 165, 2, 0.3);
  color: var(--warning);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
}
.notice-banner i { font-size: 1.1rem; margin-top: 0.1rem; }
.notice-banner strong { color: var(--text); display: block; margin-bottom: 0.2rem; }

/* PLAN GRID / PLAN CARDS (pricing-tier picker) */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.plan-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.plan-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.plan-card.selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(124,92,252,0.12), var(--bg-card));
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.plan-card.disabled { cursor: not-allowed; opacity: 0.55; }
.plan-card.disabled:hover { transform: none; border-color: var(--border); }
.plan-badge {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), #ff6b6b);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  white-space: nowrap;
}
.plan-icon { font-size: 1.6rem; color: var(--accent); margin-bottom: 0.5rem; }
.plan-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.6rem; }
.plan-specs { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.plan-price { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.plan-price small { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }
.plan-check {
  position: absolute; top: 0.7rem; right: 0.7rem;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  color: transparent;
  transition: all 0.2s;
}
.plan-card.selected .plan-check { background: var(--accent); border-color: var(--accent); color: #fff; }

/* CREDENTIALS RESULT BOX */
.credentials-box {
  background: var(--bg-card);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-top: 1rem;
}
.credentials-box .cred-title { display: flex; align-items: center; gap: 0.5rem; color: var(--success); font-weight: 700; margin-bottom: 1rem; }
.cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}
.cred-row .cred-label { color: var(--text-muted); flex-shrink: 0; }
.cred-row .cred-value { color: var(--text); font-family: monospace; word-break: break-all; text-align: right; }
.cred-row button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.9rem; flex-shrink: 0; }
.cred-row button:hover { color: var(--accent-hover); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .cart-wrapper, .sell-layout, .topup-layout { grid-template-columns: 1fr; }
  .cart-sidebar, .sell-sidebar { position: static; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-nav);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu.open { display: flex; }
  .nav-right { margin-left: 0; flex-wrap: wrap; }
  .hero-title { font-size: 2rem; }
  .hero-stats { gap: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .topup-amounts { grid-template-columns: repeat(2, 1fr); }
  .detail-meta { flex-direction: column; align-items: center; gap: 0.3rem; }
  .detail-actions { flex-direction: column; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .cred-row { flex-direction: column; align-items: flex-start; }
  .cred-row .cred-value { text-align: left; }
  .product-tabs { flex-direction: column; }
  .product-tab { justify-content: center; }
}
