/* ============================================================
   CCDLensBid — Design System v1.0
   复古相机拍卖平台 · 深色奢华风
   ============================================================ */

:root {
  /* Background */
  --bg: #0F0F0F;
  --surface: #1A1A1A;
  --card: #1E1E1E;
  --card-hover: #242424;

  /* Borders */
  --border: #2A2A2A;
  --border-light: #333333;

  /* Gold Accent */
  --gold: #C9A96E;
  --gold-hover: #B8934F;
  --gold-dim: rgba(201,169,110,0.12);
  --gold-border: rgba(201,169,110,0.25);

  /* Text */
  --text: #EBE7E0;
  --text-secondary: #9E968A;
  --text-muted: #6B6560;

  /* Semantic */
  --danger: #D1524A;
  --success: #5A9E6F;
  --info: #6BA3BE;
  --up: #4CAF50;
  --down: #E53935;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

  /* Spacing */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Animation */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.22s var(--ease);
}

/* ========== Light Theme ========== */
.light {
  --bg: #F8F6F1;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --card-hover: #FAF8F3;
  --border: #E5E0D5;
  --border-light: #D5CFC0;
  --gold: #A6843C;
  --gold-hover: #8E6F2E;
  --gold-dim: rgba(166,132,60,0.08);
  --gold-border: rgba(166,132,60,0.20);
  --text: #1A1814;
  --text-secondary: #5C5548;
  --text-muted: #8E8878;
  --danger: #C03A32;
  --success: #3D7A4F;
  --info: #4A7F96;
  --up: #388E3C;
  --down: #C62828;
}

/* ========== Reset ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ========== Typography ========== */
h1,h2,h3,h4 { font-weight: 600; line-height: 1.3; }
h1 { font-family: var(--font-display); font-size: 42px; }
h2 { font-family: var(--font-display); font-size: 28px; }
h3 { font-size: 18px; }
a { color: inherit; text-decoration: none; }

/* ========== Cards ========== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}
.card:hover {
  background: var(--card-hover);
  border-color: var(--gold-border);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius); font-size: 14px;
  font-weight: 600; font-family: var(--font); cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1); border: none; outline: none; line-height: 1.4;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--gold); color: #111; }
.btn-primary:hover:not(:disabled) { background: var(--gold-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,169,110,0.25); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--gold-border); color: var(--gold); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1.5px solid transparent; }
.btn-ghost:hover:not(:disabled) { color: var(--gold); border-color: var(--gold-border); background: rgba(201,169,110,0.04); }
.btn-sm { padding: 7px 15px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 15px; border-radius: var(--radius); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; }

/* ========== Inputs ========== */
.input {
  width: 100%; padding: 11px 15px; background: var(--surface);
  color: var(--text); border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 14px; font-family: var(--font);
  outline: none; transition: all 0.2s ease;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.input::placeholder { color: var(--text-muted); }
.input-sm { padding: 8px 12px; font-size: 13px; }

/* ========== Modal / Overlay ========== */
.overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.78); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--surface); border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl); padding: 36px 32px;
  width: 440px; max-width: 92vw; max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px var(--gold-border);
}
.modal h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 20px; font-weight: 600; }
.modal label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.modal .btn-row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ========== Toast ========== */
.toast-container {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 14px 20px;
  min-width: 260px; max-width: 420px;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  pointer-events: auto;
  animation: toastIn 0.25s ease-out, toastOut 0.25s ease-out 2.8s forwards;
}
.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error { border-left: 3px solid var(--danger); }
.toast.toast-warning { border-left: 3px solid var(--gold); }

/* ========== Badges ========== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
}
.badge-gold { background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold-border); }
.badge-danger { background: rgba(209,82,74,0.1); color: var(--danger); }
.badge-success { background: rgba(90,158,111,0.1); color: var(--success); }
.badge-info { background: rgba(107,163,190,0.1); color: var(--info); }

/* ========== Skeleton Loading ========== */
@keyframes shimmer { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.skeleton { animation: shimmer 1.5s ease-in-out infinite; background: var(--border); border-radius: var(--radius); }
.skeleton-text { height: 16px; width: 70%; margin-bottom: 10px; }
.skeleton-img { height: 200px; width: 100%; }

/* ========== Animations ========== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.92) translateY(16px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-12px); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ========== Utility ========== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); }
.text-sm { font-size: 13px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }

/* ========== Mobile Responsive ========== */
@media (max-width: 768px) {
  .modal { padding: 28px 24px; }
  .container { padding: 0 16px; }
}
@media (max-width: 480px) {
  .modal { padding: 24px 20px; width: auto; max-width: 95vw; border-radius: var(--radius); }
  .modal h3 { font-size: 17px; margin-bottom: 14px; }
  .modal .btn-row { flex-direction: column; gap: 8px; }
  .modal .btn-row .btn { width: 100%; justify-content: center; }
  .toast { min-width: auto; max-width: 90vw; padding: 12px 16px; font-size: 13px; }
}
