:root {
  color-scheme: dark;
  --bg: #090b10;
  --bg-soft: #111620;
  --panel: #151b27;
  --panel-strong: #1d2533;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fbff;
  --muted: #a7b0c0;
  --red: #ff4655;
  --cyan: #22d3ee;
  --yellow: #facc15;
  --green: #65d46e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 70, 85, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.16), transparent 24rem),
    linear-gradient(180deg, #0a0d14 0%, var(--bg) 42%, #0b0f15 100%);
  color: var(--text);
  font-family:
    Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 6vw;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 16, 0.84);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.product-topline,
.price-row,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--red);
  color: #fff;
  clip-path: polygon(50% 0, 100% 18%, 82% 100%, 18% 100%, 0 18%);
}

.nav-links {
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.header-action:hover {
  color: var(--text);
}

.header-action {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 70, 85, 0.55);
  background: rgba(255, 70, 85, 0.12);
  color: #ffd2d6;
  font-weight: 800;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 68px 6vw 36px;
  overflow: hidden;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 96px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(9, 11, 16, 0.92));
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(3rem, 8vw, 6.9rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.28rem;
  line-height: 1.2;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.filter-button,
.price-row a,
.contact-form button,
.inventory-form button,
.admin-login-form button,
.inventory-actions button,
.nav-button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.hero-art {
  position: relative;
  min-height: 520px;
}

.radar-grid {
  position: absolute;
  inset: 7% 2% 0 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 70, 85, 0.26), rgba(34, 211, 238, 0.08) 48%, rgba(255, 255, 255, 0.04));
  background-size: 42px 42px, 42px 42px, auto;
  clip-path: polygon(14% 0, 100% 8%, 86% 100%, 0 88%);
  box-shadow: var(--shadow);
}

.radar-grid::before,
.radar-grid::after {
  position: absolute;
  content: "";
}

.radar-grid::before {
  inset: 9%;
  border: 2px solid rgba(34, 211, 238, 0.42);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.radar-grid::after {
  width: 52%;
  height: 52%;
  right: 7%;
  bottom: 12%;
  border: 1px solid rgba(255, 70, 85, 0.65);
  background: linear-gradient(145deg, rgba(255, 70, 85, 0.32), rgba(255, 255, 255, 0.04));
  clip-path: polygon(50% 0, 90% 22%, 100% 68%, 50% 100%, 0 68%, 10% 22%);
}

.agent-card {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 8px;
  width: min(270px, 52vw);
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(13, 18, 28, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.agent-card strong {
  font-size: 2rem;
  line-height: 1;
}

.agent-card small {
  color: var(--muted);
}

.agent-card-primary {
  top: 10%;
  right: 3%;
}

.agent-card-secondary {
  left: 0;
  bottom: 16%;
}

.tag,
.badge,
.stock {
  width: max-content;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 900;
}

.tag,
.badge {
  background: rgba(255, 70, 85, 0.16);
  color: #ffc7cc;
}

.meter {
  display: block;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--green) 0 70%, rgba(255, 255, 255, 0.12) 70%);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 6vw;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.stats-band div {
  display: grid;
  gap: 4px;
  min-height: 104px;
  padding: 20px;
  background: rgba(17, 22, 32, 0.88);
}

.stats-band strong {
  font-size: 1.45rem;
}

.stats-band span,
.product-card li,
.account-meta,
.process-item p,
.faq-list p,
.contact-copy p,
.form-note {
  color: var(--muted);
}

.section {
  padding: 88px 6vw;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.filter-button.is-active {
  border-color: rgba(255, 70, 85, 0.65);
  background: var(--red);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.28);
}

.product-card.is-hidden {
  display: none;
}

.product-visual {
  position: relative;
  display: grid;
  min-height: 180px;
  padding: 18px;
  overflow: hidden;
  align-content: space-between;
}

.product-visual::before,
.product-visual::after {
  position: absolute;
  content: "";
}

.product-visual::before {
  inset: 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  clip-path: polygon(50% 0, 100% 26%, 82% 100%, 18% 100%, 0 26%);
}

.product-visual::after {
  right: -30px;
  bottom: -46px;
  width: 170px;
  height: 170px;
  background: rgba(255, 255, 255, 0.16);
  transform: rotate(18deg);
}

.product-visual span,
.product-visual strong {
  position: relative;
  z-index: 1;
}

.product-visual span {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.product-visual strong {
  justify-self: end;
  color: rgba(255, 255, 255, 0.9);
  font-size: 4rem;
  line-height: 0.9;
}

.visual-red {
  background: linear-gradient(135deg, #8f1d29, #ff4655);
}

.visual-cyan {
  background: linear-gradient(135deg, #0f5965, #22d3ee);
}

.visual-yellow {
  background: linear-gradient(135deg, #745b12, #facc15);
  color: #111;
}

.visual-violet {
  background: linear-gradient(135deg, #3d2b75, #9867ff);
}

.product-body {
  padding: 18px;
}

.product-topline {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.stock {
  background: rgba(101, 212, 110, 0.14);
  color: #c6ffd0;
}

.product-card ul {
  display: grid;
  gap: 8px;
  min-height: 112px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.product-card li {
  position: relative;
  padding-left: 16px;
  font-size: 0.95rem;
}

.product-card li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--red);
}

.price-row {
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.account-meta {
  display: grid;
  gap: 4px;
  min-height: 54px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}

.price-row strong {
  font-size: 1.24rem;
}

.price-row a {
  padding: 8px 14px;
  background: #fff;
  color: #0b0f15;
}

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

.process-item {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), rgba(21, 27, 39, 0.58));
}

.process-item span {
  display: block;
  margin-bottom: 34px;
  color: var(--red);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
}

details {
  border: 1px solid var(--line);
  background: var(--panel);
}

summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 900;
}

details p {
  margin: 0;
  padding: 0 20px 20px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.68fr);
  gap: 42px;
  align-items: start;
  background: linear-gradient(135deg, rgba(255, 70, 85, 0.11), rgba(34, 211, 238, 0.08));
  border-block: 1px solid var(--line);
}

.contact-copy {
  max-width: 620px;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(9, 11, 16, 0.72);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
  padding: 12px 13px;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--cyan);
}

.contact-form select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.discord-panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 10px;
  padding: 11px 18px;
  border: 1px solid rgba(34, 211, 238, 0.48);
  background: rgba(34, 211, 238, 0.12);
  color: #d7fbff;
  font-weight: 900;
}

.contact-form button {
  min-height: 48px;
  background: var(--red);
  color: #fff;
}

.form-note {
  min-height: 24px;
  margin: 0;
}

.empty-state {
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.nav-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.nav-button:hover {
  color: var(--text);
}

.admin-page {
  min-height: 100vh;
}

.admin-page h1 {
  font-size: clamp(2.35rem, 6vw, 5.1rem);
}

.admin-login,
.admin-shell {
  padding: 70px 6vw;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.58fr);
  gap: 42px;
  align-items: start;
  min-height: calc(100vh - 72px);
}

.admin-login p,
.admin-heading p {
  max-width: 680px;
  color: var(--muted);
}

.admin-login-form,
.inventory-form,
.admin-editor,
.inventory-item {
  border: 1px solid var(--line);
  background: rgba(17, 22, 32, 0.88);
}

.admin-login-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.admin-login-form label,
.inventory-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.admin-login-form input,
.inventory-form input,
.inventory-form textarea,
.inventory-form select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
  padding: 12px 13px;
}

.admin-login-form input:focus,
.inventory-form input:focus,
.inventory-form textarea:focus,
.inventory-form select:focus {
  border-color: var(--cyan);
}

.admin-login-form button,
.inventory-form button {
  min-height: 48px;
  background: var(--red);
  color: #fff;
}

.admin-heading,
.admin-section-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.admin-heading .btn {
  flex: 0 0 auto;
  margin-bottom: 8px;
}

.admin-editor {
  padding: 22px;
  margin-bottom: 34px;
}

.admin-editor h2,
.admin-section-title h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.inventory-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  background: rgba(9, 11, 16, 0.42);
}

.wide-field,
.form-actions,
.inventory-form .form-note {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: flex !important;
  grid-column: 1 / -1;
  align-items: center;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
}

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

.form-actions button {
  padding: 0 18px;
}

.ghost-button {
  border: 1px solid var(--line) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text) !important;
}

.inventory-list {
  display: grid;
  gap: 12px;
}

.inventory-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.inventory-main h3 {
  margin: 10px 0 6px;
}

.inventory-main p {
  margin-bottom: 8px;
  color: var(--muted);
}

.inventory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.inventory-actions button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.inventory-actions button[data-action="delete"] {
  border-color: rgba(255, 70, 85, 0.42);
  color: #ffc7cc;
}

.site-footer {
  justify-content: space-between;
  gap: 24px;
  padding: 26px 6vw;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 1080px) {
  .hero,
  .contact-section,
  .admin-login {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 54px;
  }

  .hero-art {
    min-height: 410px;
    order: -1;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
    padding: 16px 5vw;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .header-action {
    margin-left: auto;
  }

  .hero,
  .section {
    padding-right: 5vw;
    padding-left: 5vw;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .hero-art {
    min-height: 330px;
  }

  .agent-card {
    width: min(230px, 72vw);
  }

  .agent-card strong {
    font-size: 1.6rem;
  }

  .stats-band,
  .product-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .stats-band {
    margin-right: 5vw;
    margin-left: 5vw;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .filters {
    justify-content: start;
  }

  .product-card ul {
    min-height: 0;
  }

  .site-footer {
    display: grid;
  }

  .admin-login,
  .admin-shell {
    padding-right: 5vw;
    padding-left: 5vw;
  }

  .admin-heading,
  .admin-section-title,
  .inventory-item {
    display: grid;
    align-items: start;
  }

  .admin-heading .btn {
    width: 100%;
  }

  .inventory-actions {
    justify-content: start;
  }
}

@media (max-width: 460px) {
  .brand {
    width: 100%;
  }

  .header-action {
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    gap: 12px;
    font-size: 0.88rem;
  }

  h1 {
    font-size: 3rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .agent-card-primary {
    right: 0;
  }

  .agent-card-secondary {
    bottom: 8%;
  }

  .inventory-form {
    grid-template-columns: 1fr;
  }

  .form-actions button,
  .inventory-actions button {
    width: 100%;
  }
}
