:root {
  --bg: #0b1220;
  --panel: #111827;
  --border: #2563eb;
  --muted: #9ca3af;
  --text: #f3f4f6;
  --accent: #3b82f6;
  --accent2: #22c55e;
  --danger: #ef4444;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* === BASE === */
* {
  box-sizing: border-box;
  text-decoration: none;
}
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  color: #000000;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body::before {
  content: "";
  display: block;
  height: 65px;
}

/* === HEADER === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(50, 60, 90, 1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  z-index: 50;
}
.header h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav a {
  color: #000000;
  padding: 8px 14px;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover,
.nav a.active {
  background: var(--accent);
  color: #fff;
}

/* === MOBILE MENU === */
.menu-toggle {
  display: none;
  font-size: 22px;
  background: none;
  border: none;
  color: #000000;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}
.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 60;
  }
  .nav {
    position: absolute;
    top: 60px;
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  .nav.show {
    max-height: 500px;
    opacity: 1;
    pointer-events: all;
  }
  .nav a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav a:last-child {
    border-bottom: none;
  }
  .right {
    display: none;
  }
}

/* === LAYOUT === */
.wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 16px;
}
.aside {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  position: sticky;
  top: 80px;
  height: fit-content;
  box-shadow: var(--shadow);
}
.main {
  min-height: 65vh;
}

/* === PRODUCT GRID === */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeInUp 0.4s ease;
}
.item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
.item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #0b1220;
}
.item h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 8px 0 4px;
}
.item .price {
  font-weight: 700;
  color: var(--accent2);
  font-size: 14px;
}


/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn { background: var(--accent); color: #fff; }
.btn.secondary { background: #2563eb; }
.btn.success { background: var(--accent2); }
.btn.danger { background: var(--danger); }

/* === PRICE GLOW EFFECT === */
.price-glow {
  color: var(--accent2);
  font-weight: 700;
  animation: glowPulse 2s infinite ease-in-out;
}
@keyframes glowPulse {
  0%,100% { text-shadow: 0 0 8px rgba(34,197,94,0.4); }
  50% { text-shadow: 0 0 18px rgba(34,197,94,0.8); }
}

/* === DETAIL PAGE === */
.detail-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.detail-img {
  flex: 1 1 320px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.detail-img img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
.detail-info {
  flex: 2 1 400px;
}
.detail-info h2 {
  font-size: 22px;
  margin-top: 0;
}
.detail-info .badge {
  background: rgba(59,130,246,0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  margin-left: 4px;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  justify-content: center;
}

/* === FOOTER === */
.footer {
  max-width: 1200px;
  margin: 40px auto 60px;
  padding: 0 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
/* --- FIXED HEADER POLISH --- */
.header {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

/* --- PRODUCT GRID REBALANCE --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
  justify-items: center;
}

/* --- PRODUCT ITEM POLISH --- */
.item {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #111827, #0b1220);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}
.item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.item img {
  width: 100%;
  height: 150px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  object-fit: cover;
  background: #0b1220;
}
.item h4 {
  font-size: 14px;
  color: #000000;
  margin: 10px 0 4px;
  font-weight: 600;
}
.item .small {
  color: var(--muted);
  font-size: 12px;
}

/* --- VIEW DETAILS BUTTON --- */
.item .btn {
  margin-top: 10px;
  width: 100%;
  border-radius: 0 0 14px 14px;
  padding: 10px 0;
  font-weight: 600;
  font-size: 13px;
  background: linear-gradient(90deg, var(--accent), #2563eb);
  transition: background 0.25s ease;
}
.item .btn:hover {
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
}

/* --- CATEGORY SIDEBAR IMPROVE --- */
.aside {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.aside h3, .aside .label {
  color: #2563eb;
  font-weight: 600;
}
.aside button, .aside a.btn {
  width: 100%;
  margin: 6px 0;
  border-radius: 10px;
}



/* === ORDER FORM LAYOUT (Centered & Clean) === */
.order-card {
  background: rgba(17,24,39,0.9);
  border-radius: 18px;
  padding: 24px;
  max-width: 600px;
  margin: 50px auto;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}
.order-card h3 {
  text-align: center;
  font-weight: 600;
  margin-bottom: 20px;
}



/* === MOBILE REFINEMENT === */
@media (max-width: 480px) {
  .btn-primary {
    font-size: 14px;
    padding: 10px 0;
  }
  .form-group .input {
    font-size: 13px;
    padding: 10px 12px;
  }
}
:root {
  --bg: #0b1220;
  --panel: #111827;
  --border: #2563eb;
  --muted: #9ca3af;
  --text: #f3f4f6;
  --accent: #3b82f6;
  --accent2: #22c55e;
  --danger: #ef4444;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* === BASE === */
* {
  box-sizing: border-box;
  text-decoration: none;
}
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  
  line-height: 1.6;
  scroll-behavior: smooth;
}

body::before {
  content: "";
  display: block;
  height: 65px;
}

/* === HEADER === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  z-index: 50;
}
.header h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav a {
  color: #000000;
  padding: 8px 14px;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover,
.nav a.active {
  background: var(--accent);
  color: #fff;
}

/* === MOBILE MENU === */
.menu-toggle {
  display: none;
  font-size: 22px;
  background: none;
  border: none;
  color: #000000;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}
.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 60;
  }
  .nav {
    position: absolute;
    top: 60px;
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  .nav.show {
    max-height: 500px;
    opacity: 1;
    pointer-events: all;
  }
  .nav a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav a:last-child {
    border-bottom: none;
  }
  .right {
    display: none;
  }
}

/* === LAYOUT === */
.wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 16px;
}
.aside {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 16px;
  position: sticky;
  top: 80px;
  height: fit-content;
  box-shadow: var(--shadow);
}
.main {
  min-height: 65vh;
}

/* === PRODUCT GRID === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
  justify-items: center;
}
.item {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #111827, #0b1220);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}
.item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.item img {
  width: 100%;
  height: 150px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  object-fit: cover;
  background: #0b1220;
}

/* === CARDS === */
.topup-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  padding: 18px 22px;
  transition: all 0.3s ease;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; /* equal height for all cards */
}

.topup-card img {
  width: 100%;
  border-radius: 12px;
}

.topup-btn {
  margin-top: auto; /* push button to bottom */
}

.card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  padding: 18px 22px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.product-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  padding: 18px 22px;
  transition: all 0.3s ease;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.product-card img {
  width: 100%;
  border-radius: 12px;
}

.product-btn {
  margin-top: auto; /* pushes button to bottom */
}

.product-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  padding: 18px 22px;
  transition: all 0.3s ease;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.product-card img {
  width: 100%;
  border-radius: 12px;
}

.product-btn {
  margin-top: auto; /* pushes button to bottom */
}
/* === FORMS (Login, Register, Order) === */
.form-card,
.order-card {
  background: #f9fafb;
    color: #111827;
    border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  padding: 30px 28px;
  max-width: 520px;
  margin: 60px auto;
  animation: fadeInUp 0.4s ease;
}
.form-card h2,
.order-card h3 {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  color: #ffffff;
  margin-bottom: 25px;
  letter-spacing: 0.4px;
}

/* === INPUTS === */
.form-card input,
.form-card textarea,
.order-card input,
.order-card textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db; /* subtle gray border */
  background: #ffffff; /* white background */
  color: #111827; /* dark text for readability */
  font-size: 14px;
  outline: none;
  margin-top: 6px;
  transition: all 0.25s ease;
  box-shadow: inset 0 0 0 transparent;
}

.form-card input:focus,
.form-card textarea:focus,
.order-card input:focus,
.order-card textarea:focus {
  border-color: #2563eb; /* blue border on focus */
  box-shadow: 0 0 8px rgba(37,99,235,0.25);
  background: #ffffff; /* keep white on focus */
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 4px;
  font-weight: 500;
}

/* === BUTTONS === */
.btn-primary,
.order-card .btn.success {
  display: inline-block;
  width: 100%;
  background: linear-gradient(90deg, var(--accent2), #16a34a);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 12px;
  padding: 12px 0;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 12px rgba(34,197,94,0.25);
}
.btn-primary:hover,
.order-card .btn.success:hover {
  background: linear-gradient(90deg, #16a34a, var(--accent2));
  box-shadow: 0 0 18px rgba(34,197,94,0.45);
  transform: translateY(-1px);
}

/* === BUTTON LAYOUT === */
.order-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  justify-content: center;
}
.order-card .btn.secondary {
  background: #2563eb;
  border: 1px solid rgba(255,255,255,0.1);
  color: #ffffff;
}
.page-card {
  background: rgba(17,24,39,0.9);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
  padding: 28px 26px;
  max-width: 900px;
  margin: 40px auto;
  animation: fadeInUp 0.4s ease;
}

.page-card h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #000000;
  text-align: center;
}

.page-content {
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
  white-space: pre-wrap;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .order-card,
  .form-card {
    padding: 22px 16px;
    margin: 40px 14px;
  }
  .order-actions {
    flex-direction: column;
  }
  .order-card .btn {
    width: 100%;
  }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === GLOBAL RESPONSIVE === */
@media (max-width: 900px) {
  .aside { display: none !important; }
  .wrap { grid-template-columns: 1fr !important; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .detail-wrap { flex-direction: column; }
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .item img {
    height: 130px;
  }
  .card {
    padding: 14px;
  }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .aside { display: none !important; }
  .wrap { grid-template-columns: 1fr !important; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .detail-wrap { flex-direction: column; }
}
