﻿:root {
  --bg: #070513;
  --bg-soft: #0c0a22;
  --line: rgba(255, 255, 255, 0.11);
  --text: #f6f1ff;
  --muted: #b9afd9;
  --violet: #7c4dff;
  --cyan: #00d8ff;
  --pink: #ff4f8d;
  --green: #69f0ae;
  --gold: #ffca55;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
  background:
    radial-gradient(1000px 500px at -10% -10%, rgba(124, 77, 255, 0.2), transparent 60%),
    radial-gradient(1000px 520px at 110% 0%, rgba(0, 216, 255, 0.13), transparent 60%),
    linear-gradient(140deg, #05030f 0%, #08051a 46%, #07091b 100%);
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 48px;
  height: 68px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 6, 24, 0.82);
  backdrop-filter: blur(12px);
}

.brand {
  color: #fff;
  text-decoration: none;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  position: relative;
  z-index: 2;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
  font-size: 14px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.nav-links li { list-style: none; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  padding: 7px 14px;
  transition: 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
  background: rgba(0, 216, 255, 0.08);
}

#nav-user-area a {
  border: 1px solid rgba(124, 77, 255, 0.4);
  background: rgba(124, 77, 255, 0.15);
  color: #d7c6ff;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
#nav-user-area {
  margin-left: auto;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 96px 22px 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: linear-gradient(130deg, rgba(124, 77, 255, 0.17), rgba(0, 216, 255, 0.08));
}

.hero h1 {
  font-size: 44px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.hero p {
  color: var(--muted);
  line-height: 1.75;
  max-width: 900px;
}

.hero-badges {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  font-size: 12px;
  padding: 6px 10px;
  color: #e8e0ff;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.45fr);
  gap: 16px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(19, 16, 54, 0.95), rgba(11, 10, 32, 0.95));
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-head .panel-sub {
  margin-bottom: 0;
}

.panel h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.panel-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.ring-shell {
  margin: 8px auto 0;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px dashed rgba(124, 77, 255, 0.45);
  background:
    radial-gradient(circle at center, rgba(124, 77, 255, 0.1) 0%, rgba(124, 77, 255, 0.03) 47%, transparent 66%),
    rgba(7, 7, 25, 0.5);
  position: relative;
  overflow: visible;
}

.bracelet-ring {
  position: absolute;
  inset: 0;
}

.slot {
  position: absolute;
  min-width: 18px;
  min-height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.18s ease;
  box-shadow:
    inset -2px -3px 7px rgba(0, 0, 0, 0.15),
    inset 2px 3px 8px rgba(255, 255, 255, 0.28),
    0 3px 8px rgba(0, 0, 0, 0.22);
}

.slot:hover {
  border-color: rgba(0, 216, 255, 0.65);
  box-shadow:
    inset -2px -3px 7px rgba(0, 0, 0, 0.15),
    inset 2px 3px 8px rgba(255, 255, 255, 0.28),
    0 0 0 2px rgba(0, 216, 255, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.26);
  transform: translate(-50%, -50%) scale(1.05);
}

.slot.selected {
  border-color: rgba(255, 202, 85, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 202, 85, 0.22);
}

.slot.filled {
  color: #fff;
  background: rgba(10, 10, 24, 0.42);
  border-color: rgba(255, 255, 255, 0.32);
}

.slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
}

.slot-dot {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.75);
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.ring-center {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 158px;
  height: 158px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 7, 24, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}

.ring-empty-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.4px;
  text-align: center;
  pointer-events: none;
  width: min(70%, 180px);
  line-height: 1.5;
}

.ring-count {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.ring-total {
  font-size: 26px;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
}

.ring-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wrist-zone {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wrist-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wrist-line label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

#wrist-cm-input {
  width: 120px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 8, 24, 0.65);
  color: #fff;
  padding: 7px 10px;
  font-size: 13px;
}

.wrist-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mode-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #d7cdf8;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.mode-btn.active {
  color: #03111a;
  border-color: rgba(0, 216, 255, 0.6);
  background: linear-gradient(135deg, #5ec7ff, #3ff5db);
}

.wrist-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.wrist-meta strong {
  color: #f3eeff;
  font-size: 12px;
}

.wrist-meta .dot {
  color: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}

.fit-hint {
  font-size: 12px;
  color: #ffb1bf;
  line-height: 1.5;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  transition: 0.18s;
}

.btn.primary { background: linear-gradient(135deg, var(--violet), var(--pink)); }
.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ece4ff;
}
.btn.cyan {
  background: linear-gradient(135deg, #00c8e8, #31e0ff);
  color: #03111a;
}

.selection-note {
  margin-top: 10px;
  font-size: 13px;
  color: #dcd4ff;
  min-height: 20px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  color: #fff;
  border-color: rgba(124, 77, 255, 0.6);
  background: rgba(124, 77, 255, 0.2);
}

.bead-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  max-height: 610px;
  overflow: auto;
  padding-right: 2px;
}

.bead-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: 0.18s;
  cursor: pointer;
}

.bead-card:hover {
  border-color: rgba(0, 216, 255, 0.45);
  transform: translateY(-1px);
}

.bead-card.selected {
  border-color: rgba(255, 202, 85, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 202, 85, 0.2);
}

.bead-cover {
  width: 78%;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bead-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bead-fallback {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.75);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.bead-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 26px;
}

.bead-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.bead-price {
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
}

.stock-low {
  color: #ff8fa7;
  font-weight: 600;
}

.bead-card .add-btn {
  margin-top: auto;
  width: 100%;
  border: 1px solid rgba(0, 216, 255, 0.4);
  background: rgba(0, 216, 255, 0.1);
  color: #d9f8ff;
  border-radius: 8px;
  padding: 5px 7px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.hot-panel {
  margin-top: 2px;
}

.bead-card .add-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
}

.empty-box {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
  font-size: 13px;
  line-height: 1.7;
  grid-column: 1 / -1;
}

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

.template-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.template-card.hot {
  border-color: rgba(0, 216, 255, 0.28);
  background: linear-gradient(160deg, rgba(0, 216, 255, 0.08), rgba(124, 77, 255, 0.06));
}

.template-card h3 {
  font-size: 16px;
  line-height: 1.35;
}

.template-card p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  min-height: 40px;
}

.template-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #d8cefb;
}

.template-preview {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  min-height: 20px;
}

.template-preview i {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  display: inline-block;
}

.template-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 20px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

.summary-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: 16px;
  align-items: start;
}

.summary-title {
  font-size: 22px;
  margin-bottom: 8px;
}

.summary-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.bead-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bead-chip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: #e9e1ff;
}

.price-box {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  margin-bottom: 12px;
}

.line-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #ddd4ff;
  font-size: 13px;
  margin-bottom: 7px;
}

.line-item strong {
  color: var(--gold);
  font-size: 16px;
}

.checkout-btn,
.checkout-submit {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.checkout-btn:disabled,
.checkout-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.note-muted {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.6;
}

.note-small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.56);
}

.required { color: #ffca55; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
  z-index: 99;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.open { display: flex; }

.modal-card {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(124, 77, 255, 0.45);
  background: linear-gradient(155deg, #16123d, #090821);
  padding: 18px;
}

.share-modal-card {
  width: min(620px, 100%);
}

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

.modal-top h2 {
  font-size: 27px;
  line-height: 1.25;
}

.close-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.field { margin-bottom: 10px; }
.field.full { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

#order-phone-code {
  color: #f5f6ff;
  font-weight: 600;
  background: #221b46;
  -webkit-text-fill-color: #f5f6ff;
  appearance: auto;
}

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

.field select option,
.field select optgroup {
  color: #11131f;
  background: #ffffff;
}

.phone-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 8px;
}

.wallet-box,
.coupon-box,
.checkout-total {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 13px;
}

.wallet-box .top,
.checkout-total .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.wallet-amount { font-weight: 700; font-size: 16px; }

.wallet-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
  font-size: 13px;
  color: #d8ccff;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  z-index: 120;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 8px 28px rgba(124, 77, 255, 0.35);
  pointer-events: none;
}

@media (max-width: 1120px) {
  .layout { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bead-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-nav { height: 64px; padding: 0 16px; }
  .brand { font-size: 30px; }
  .nav-links { display: none; }
  .page { padding: 88px 12px 28px; }
  .hero h1 { font-size: 34px; }
  .panel-head { flex-direction: column; align-items: stretch; }
  .bead-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-grid { grid-template-columns: 1fr; }
  .summary-panel { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .phone-grid { grid-template-columns: 1fr; }
  .wrist-line { flex-direction: column; align-items: stretch; }
  #wrist-cm-input { width: 100%; }
}
