/* ===== 三角洲跑刀系统 - 客户端样式 ===== */

:root {
  --bg-darkest: #060a12;
  --bg-dark: #0c1320;
  --bg-card: #131c2e;
  --bg-card-hi: #1a2640;
  --border: #2a3a52;
  --border-soft: #1e2a3e;
  --gold: #e8c468;
  --gold-bright: #ffd966;
  --gold-dim: #8a7a3e;
  --orange: #ff9520;
  --text: #dce4ee;
  --text-dim: #7a8a9e;
  --text-faint: #4a5670;
  --green: #4ade80;
  --red: #f55a5a;
  --blue: #3b9eff;
  --amber: #fbbf24;
  --mono: 'Cascadia Code', 'JetBrains Mono', 'Consolas', monospace;
}

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

html, body {
  background: var(--bg-darkest);
  color: var(--text);
  font-family: -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.mono { font-family: var(--mono); letter-spacing: .5px; }
.hidden { display: none !important; }

/* 背景网格与光晕 */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(42,58,82,.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,58,82,.15) 1px, transparent 1px);
  background-size: 48px 48px;
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 600px 400px at 50% -10%, rgba(232,196,104,.08), transparent 70%),
    radial-gradient(ellipse 800px 500px at 100% 100%, rgba(59,158,255,.05), transparent 70%);
}

/* ===== 顶部导航 ===== */
.top-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 64px;
  background: rgba(12,19,32,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-brand { display: flex; align-items: baseline; gap: 8px; }
.brand-icon { color: var(--gold); font-size: 18px; }
.brand-text { font-weight: 800; letter-spacing: 2px; font-size: 17px; }
.brand-accent { color: var(--gold); }
.brand-sub { color: var(--text-dim); font-size: 12px; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  color: var(--text-dim); text-decoration: none;
  padding: 8px 18px; border-radius: 4px;
  font-size: 14px; font-weight: 500; transition: all .2s;
  border: 1px solid transparent;
}
.nav-link:hover { color: var(--text); background: var(--bg-card); }
.nav-link.active {
  color: var(--gold); border-color: var(--gold-dim);
  background: rgba(232,196,104,.08);
}

/* ===== 主体 ===== */
.container {
  max-width: 960px; margin: 0 auto; padding: 48px 24px;
}

/* ===== 查询区 ===== */
.query-hero { text-align: center; }
.hero-badge {
  display: inline-block; padding: 4px 16px;
  border: 1px solid var(--gold-dim); border-radius: 2px;
  color: var(--gold); font-size: 11px; letter-spacing: 3px;
  font-weight: 600; margin-bottom: 20px;
  background: rgba(232,196,104,.06);
}
.hero-title {
  font-size: 38px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.hero-desc { color: var(--text-dim); font-size: 15px; margin-bottom: 36px; }

.search-box {
  display: flex; gap: 12px; max-width: 600px; margin: 0 auto;
}
.search-input-wrap {
  flex: 1; position: relative;
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg-dark); transition: border-color .2s;
}
.search-input-wrap:focus-within { border-color: var(--gold-dim); box-shadow: 0 0 0 1px rgba(232,196,104,.3); }
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 18px;
}
.search-input {
  width: 100%; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px; font-family: var(--mono);
  padding: 14px 14px 14px 42px; border-radius: 4px;
}
.search-input::placeholder { color: var(--text-faint); font-family: -apple-system, sans-serif; }

/* ===== 按钮 ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
  color: #1a1200; border: none; border-radius: 4px;
  padding: 14px 32px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all .2s; letter-spacing: 1px;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { box-shadow: 0 0 24px rgba(232,196,104,.4); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-loader {
  width: 16px; height: 16px;
  border: 2px solid rgba(26,18,0,.3); border-top-color: #1a1200;
  border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 8px 16px; font-size: 13px; cursor: pointer;
  transition: all .2s;
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold-dim); background: rgba(232,196,104,.05); }
.btn-sm { padding: 6px 14px; font-size: 12px; }

.hero-hint {
  margin-top: 20px; color: var(--text-faint); font-size: 13px;
}
.hero-hint .mono {
  color: var(--gold-dim); cursor: pointer; text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.hero-hint .mono:hover { color: var(--gold); }

/* ===== 购买卡密按钮 ===== */
.buy-card-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 28px; padding: 12px 32px;
  background: linear-gradient(135deg, rgba(255,181,71,0.15), rgba(255,181,71,0.05));
  border: 1px solid var(--gold-dim); border-radius: 8px;
  color: var(--gold); font-size: 16px; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: all 0.25s ease;
}
.buy-card-btn:hover {
  background: linear-gradient(135deg, rgba(255,181,71,0.25), rgba(255,181,71,0.1));
  border-color: var(--gold); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,181,71,0.2);
}
.buy-card-btn .buy-icon { font-size: 18px; }

/* ===== 查询结果 ===== */
.result-area { margin-top: 40px; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.order-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.order-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
}
.order-card-header-left { display: flex; flex-direction: column; gap: 4px; }
.order-id-label { font-size: 12px; color: var(--text-faint); }
.order-card-code { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--gold); letter-spacing: 1px; }

/* 状态标签 */
.status-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 3px; font-size: 12px; font-weight: 600;
  letter-spacing: 1px; border: 1px solid;
}
.status-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-pending { color: var(--amber); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.status-pending::before { background: var(--amber); }
.status-in_progress { color: var(--blue); border-color: rgba(59,158,255,.4); background: rgba(59,158,255,.08); }
.status-in_progress::before { background: var(--blue); animation: pulse 1.5s infinite; }
.status-completed { color: var(--green); border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.status-completed::before { background: var(--green); }
.status-cancelled { color: var(--red); border-color: rgba(245,90,90,.4); background: rgba(245,90,90,.08); }
.status-cancelled::before { background: var(--red); }
.status-expired { color: var(--text-faint); border-color: var(--border); background: var(--bg-dark); }
.status-expired::before { background: var(--text-faint); }
.status-inactive { color: var(--orange); border-color: rgba(255,149,32,.4); background: rgba(255,149,32,.08); }
.status-inactive::before { background: var(--orange); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.order-card-body { padding: 24px; }

/* 信息网格 */
.info-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  margin-bottom: 28px;
}
.info-item { display: flex; flex-direction: column; gap: 6px; }
.info-label { font-size: 12px; color: var(--text-faint); }
.info-value { font-size: 14px; color: var(--text); }
.info-value.mono { font-family: var(--mono); }

/* 进度条 */
.progress-section { margin-bottom: 28px; }

/* 激活横幅 */
.activate-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(255,149,32,.1), rgba(232,196,104,.05));
  border: 1px solid rgba(255,149,32,.3); border-left: 4px solid var(--orange);
  border-radius: 6px;
}
.activate-icon { font-size: 32px; color: var(--orange); flex-shrink: 0; }
.activate-text { flex: 1; }
.activate-title { font-size: 16px; font-weight: 700; color: var(--orange); margin-bottom: 4px; }
.activate-desc { font-size: 13px; color: var(--text-dim); }
.activate-banner .btn-primary { flex-shrink: 0; padding: 10px 24px; }
.progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.progress-label { font-size: 13px; color: var(--text-dim); }
.progress-num { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--gold); }
.progress-num .total { color: var(--text-faint); font-size: 15px; font-weight: 400; }
.progress-pct {
  font-family: var(--mono); font-size: 24px; font-weight: 800;
  color: var(--gold-bright);
}
.progress-track {
  height: 14px; background: var(--bg-darkest);
  border: 1px solid var(--border); border-radius: 7px;
  overflow: hidden; position: relative;
}
.progress-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--green) 0%, var(--gold) 50%, var(--orange) 100%);
  transition: width .8s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.progress-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* 备注 */
.remark-box {
  padding: 14px 16px; background: var(--bg-darkest);
  border: 1px solid var(--border-soft); border-left: 3px solid var(--gold-dim);
  border-radius: 4px; margin-bottom: 24px;
}
.remark-label { font-size: 12px; color: var(--text-faint); margin-bottom: 6px; }
.remark-text { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* 进度日志时间线 */
.timeline-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.timeline-title::before { content: ''; width: 3px; height: 16px; background: var(--gold); border-radius: 2px; }
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 18px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; left: -24px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
}
.timeline-dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.timeline-content {
  background: var(--bg-darkest); border: 1px solid var(--border-soft);
  border-radius: 4px; padding: 12px 16px;
}
.timeline-time { font-size: 12px; color: var(--text-faint); margin-bottom: 6px; font-family: var(--mono); }
.timeline-progress {
  font-size: 14px; font-weight: 600; color: var(--gold); font-family: var(--mono);
  margin-bottom: 4px;
}
.timeline-progress .before { color: var(--text-faint); }
.timeline-note { font-size: 13px; color: var(--text-dim); }

/* 刷新按钮区 */
.result-actions { display: flex; gap: 12px; margin-top: 20px; }

/* ===== 错误提示 ===== */
.error-area { margin-top: 40px; animation: fadeUp .4s ease; }
.error-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; background: var(--bg-card);
  border: 1px solid rgba(245,90,90,.3); border-left: 4px solid var(--red);
  border-radius: 4px;
}
.error-icon { font-size: 28px; color: var(--red); }
.error-msg { font-size: 15px; color: var(--text); }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  padding: 12px 28px; border-radius: 4px; font-size: 14px; font-weight: 500;
  z-index: 9999; animation: toastIn .3s ease;
  border: 1px solid; backdrop-filter: blur(8px);
}
.toast.success { background: rgba(74,222,128,.15); border-color: var(--green); color: var(--green); }
.toast.error { background: rgba(245,90,90,.15); border-color: var(--red); color: var(--red); }
.toast.info { background: rgba(59,158,255,.15); border-color: var(--blue); color: var(--blue); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .top-nav { padding: 0 16px; }
  .brand-sub { display: none; }
  .nav-link { padding: 6px 12px; font-size: 13px; }
  .container { padding: 32px 16px; }
  .hero-title { font-size: 28px; }
  .search-box { flex-direction: column; }
  .info-grid { grid-template-columns: 1fr; }
  .progress-pct { font-size: 20px; }
  .progress-num { font-size: 16px; }
  .order-card-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 480px) {
  .nav-brand .brand-text { font-size: 14px; }
  .hero-title { font-size: 24px; }
  .hero-desc { font-size: 13px; }
  .order-card-body { padding: 16px; }
}
