:root {
  --color-bg-primary: #000000;
  --color-bg-secondary: #111111;
  --color-bg-card: #1A1A1A;
  --color-bg-input: #2A2A2A;
  --color-bg-elevated: #333333;
  --color-brand-primary: #D4A853;
  --color-brand-primary-hover: #E0B96A;
  --color-brand-primary-dark: #B8923F;
  --color-brand-gradient-start: #D4A853;
  --color-brand-gradient-end: #C49340;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #AAAAAA;
  --color-text-tertiary: #888888;
  --color-text-placeholder: #666666;
  --color-border: #333333;
  --color-border-light: #444444;
  --color-border-focus: #D4A853;
  --color-overlay: rgba(0, 0, 0, 0.6);

  --state-success: #4CAF50;
  --state-warning: #FFC107;
  --state-error: #F44336;
  --state-info: #2196F3;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.6);

  /* 移动端容器宽度上限（PC 端时使用的最大宽度） */
  --app-max-width: 428px;
}

/* ===========================================
   基础重置
   =========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  /* 防止 iOS 横屏时字体自动放大 */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: #1a1a1a; /* PC 端时容器外的暗色背景 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* iOS 平滑滚动 */
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

/* ===========================================
   容器（PC 端固定宽度、移动端铺满）
   =========================================== */
#app-container {
  width: 100%;
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background-color: var(--color-bg-primary);
  /* PC 端时给容器一个微妙的阴影，模拟手机外观 */
  box-shadow: none;
}

/* ===========================================
   标题与文本
   =========================================== */
.vp-title-lg {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-primary);
  letter-spacing: 0.5px;
}

.vp-title-md {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-primary);
}

.vp-title-sm {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-primary);
}

.vp-body {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.vp-caption {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-tertiary);
}

.vp-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.vp-placeholder {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-placeholder);
}

/* ===========================================
   工具类
   =========================================== */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.min-h-screen { min-height: 100vh; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.cursor-pointer { cursor: pointer; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.transition { transition: all 0.15s ease; }

/* 间距 */
.m-0 { margin: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mx-4 { margin-left: 16px; margin-right: 16px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.pt-5 { padding-top: 20px; }
.pt-6 { padding-top: 24px; }
.pb-4 { padding-bottom: 16px; }
.pb-5 { padding-bottom: 20px; }
.pb-6 { padding-bottom: 24px; }
.pb-8 { padding-bottom: 32px; }
.h-4 { height: 16px; }
.h-5 { height: 20px; }
.h-6 { height: 24px; }
.h-9 { height: 36px; }
.h-11 { height: 44px; }
.w-4 { width: 16px; }
.w-5 { width: 20px; }
.w-6 { width: 24px; }
.w-7 { width: 28px; }
.w-9 { width: 36px; }
.h-7 { height: 28px; }
.w-10 { width: 40px; }
.h-10 { height: 40px; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-2xl { font-size: 22px; }
.text-3xl { font-size: 28px; }

/* ===========================================
   表单元素
   =========================================== */
input, textarea {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  font-size: 14px;
  background-color: var(--color-bg-input);
  color: var(--color-text-primary);
  border: 1px solid transparent;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

input:focus, textarea:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 2px rgba(212, 168, 83, 0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--color-text-placeholder);
}

textarea {
  resize: none;
}

/* ===========================================
   按钮
   =========================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--color-brand-gradient-start), var(--color-brand-gradient-end));
  color: var(--color-text-primary);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-lg);
  padding: 11px 16px;
  font-size: 14px;
  background-color: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}

.btn-secondary:hover {
  opacity: 0.85;
}

.btn-secondary:active {
  transform: scale(0.98);
}

/* ===========================================
   标签
   =========================================== */
.tag {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: var(--radius-lg);
  padding: 4px 12px;
  font-size: 12px;
  background-color: var(--color-bg-input);
  color: var(--color-text-primary);
}

/* ===========================================
   模态框
   =========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--color-overlay);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  width: 100%;
  max-width: var(--app-max-width);
  background-color: var(--color-bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

/* ===========================================
   适配用户偏好
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
