/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === CUSTOM PROPERTIES === */
:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --surface-light: #222222;
  --border: #333333;
  --text-primary: #e8e0d0;
  --text-secondary: #888880;
  --accent-gold: #c8a96e;
  --accent-gold-dim: #9a7d4e;
  --danger: #c0392b;
  --success: #5a8a5a;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
}

/* === BASE === */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: normal;
  color: var(--text-primary);
}

h1 {
  font-size: 2.8rem;
  letter-spacing: 0.05em;
}

h2 {
  font-size: 1.9rem;
  letter-spacing: 0.04em;
}

h3 {
  font-size: 1.4rem;
  letter-spacing: 0.03em;
}

.label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold-dim);
}

/* === BUTTONS === */
.btn {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 28px;
  border: 1px solid var(--accent-gold);
  background: transparent;
  color: var(--accent-gold);
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Bright light-sweep that slides across the button on hover. Sits above
   the button background but below the text via z-index in the isolated
   stacking context. The peak is near-white so it remains visible whether
   the hover background is transparent or gold. */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 248, 220, 0.20) 35%,
    rgba(255, 252, 240, 0.85) 50%,
    rgba(255, 248, 220, 0.20) 65%,
    transparent 100%);
  transform: skewX(-22deg);
  pointer-events: none;
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.btn:hover::before {
  left: 115%;
}

.btn:hover {
  background: var(--accent-gold);
  color: var(--bg);
}

.btn:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .btn::before {
    display: none !important;
  }
}

.btn:disabled {
  border-color: var(--border);
  color: var(--border);
  cursor: not-allowed;
  background: transparent;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: var(--text-primary);
}

/* === CARDS === */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-gold);
  padding: 20px;
}

/* === UTILITIES === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.text-center { text-align: center; }
.text-gold { color: var(--accent-gold); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-secondary { color: var(--text-secondary); }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.hidden { display: none !important; }
