@keyframes slideDown {
  from { transform: translateY(-16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeUp {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

:root {
  --bg: #070a12;
  --panel: rgba(13, 18, 34, 0.85);
  --panel2: rgba(7, 10, 18, 0.75);
  --border: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --blue: #2f7bff;
  --blue2: #66b0ff;
  --red: #ff2a5f;
  --green: #30e68a;
  --grad: linear-gradient(90deg, #1e5bff 0%, #49a6ff 100%);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: radial-gradient(1000px 700px at 15% 0%, rgba(47, 123, 255, 0.22), transparent 55%), var(--bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text);
}

a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(4, 6, 12, 0.75);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--grad);
  box-shadow: 0 0 0 5px rgba(47, 123, 255, 0.12);
}

.banner {
  animation: slideDown 650ms ease forwards;
  padding: 8px 12px;
  border: 1px solid rgba(47, 123, 255, 0.25);
  background: linear-gradient(90deg, rgba(47, 123, 255, 0.22), rgba(102, 176, 255, 0.12));
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  white-space: nowrap;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 70px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}

.hero-panel {
  border: 1px solid var(--border);
  background: rgba(10, 14, 28, 0.55);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero-title {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0.4px;
}

.hero-sub {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.stat {
  border: 1px solid var(--border);
  background: rgba(7, 10, 18, 0.55);
  border-radius: 14px;
  padding: 12px;
}

.stat-k { font-size: 12px; color: var(--muted); }
.stat-v { margin-top: 6px; font-weight: 800; }

.filters {
  border: 1px solid var(--border);
  background: rgba(10, 14, 28, 0.55);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.filters h3 { margin: 0 0 10px; font-size: 16px; }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border: 1px solid rgba(47, 123, 255, 0.28);
  background: rgba(47, 123, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.pill[data-active="1"] {
  border-color: rgba(255, 42, 95, 0.45);
  background: rgba(255, 42, 95, 0.14);
}

.grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.products-panel {
  margin-top: 22px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 28, 0.55);
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .banner { display: none; }
  .hero-title { font-size: 28px; }
}

.card {
  animation: fadeUp 650ms ease both;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(12, 16, 30, 0.85), rgba(7, 10, 18, 0.85));
  overflow: hidden;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.6);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 250px at 50% 0%, rgba(47, 123, 255, 0.18), transparent 60%);
  pointer-events: none;
}

.card-inner {
  position: relative;
  padding: 16px;
}

.card-img {
  width: 100%;
  height: 190px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.02);
  transition: transform 260ms ease;
}
.card:hover .card-img img { transform: scale(1.06); }

.card-title {
  margin: 14px 0 0;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.3px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.code {
  font-size: 12px;
  color: var(--muted);
}

.code b {
  color: #ffb200;
  letter-spacing: 0.6px;
}

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 42, 95, 0.35);
  background: rgba(255, 42, 95, 0.12);
}

.price {
  margin-top: 14px;
  font-size: 28px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
}

.subline {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.linklike {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 80, 120, 0.95);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 0;
  background: var(--grad);
  color: rgba(0, 0, 0, 0.85);
  font-weight: 900;
  letter-spacing: 0.25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn:active { transform: translateY(1px); }

.btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.88);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
}

.modal[data-open="1"] { display: flex; }

.modal-box {
  width: min(820px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(10, 14, 28, 0.92), rgba(6, 8, 14, 0.92));
  box-shadow: var(--shadow);
  overflow: hidden;
}

#ageModal .modal-box {
  width: min(520px, 100%);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 18px 18px 10px;
}

.modal-title { margin: 0; font-size: 18px; font-weight: 900; }
.modal-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

.xbtn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 12px;
}
.xbtn:hover { background: rgba(255, 255, 255, 0.06); }

.modal-body {
  padding: 0 18px 18px;
}

.flavor-list {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  max-height: 260px;
  overflow: auto;
}

.flavor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.00);
}
.flavor-item:first-child { border-top: 0; }
.flavor-item:hover { background: rgba(255, 255, 255, 0.04); }

.flavor-item[data-selected="1"] {
  background: linear-gradient(90deg, rgba(47, 123, 255, 0.35), rgba(102, 176, 255, 0.18));
}

.flavor-name { font-weight: 800; }
.flavor-status {
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
}
.flavor-status[data-available="0"] { color: rgba(255, 255, 255, 0.55); }

.selected-bar {
  margin-top: 12px;
  border: 1px solid rgba(47, 123, 255, 0.22);
  background: rgba(47, 123, 255, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.85);
}

.modal-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 16px 70px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}

.panel {
  border: 1px solid var(--border);
  background: rgba(10, 14, 28, 0.55);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.panel h2, .panel h3 { margin: 0 0 12px; }

.field { display: grid; gap: 6px; margin-top: 10px; }
.field label { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.field textarea { resize: vertical; min-height: 84px; }

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: hidden;
  border-radius: 14px;
}
.table th, .table td {
  padding: 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 13px;
}
.table th { background: rgba(255, 255, 255, 0.05); }

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.notice {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.82);
}

.widget {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(47, 123, 255, 0.28);
  background: rgba(47, 123, 255, 0.06);
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  font-size: 12px;
}

.chip button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.70);
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
}
