/* ===== 火线密牌消防站 — 全局样式 ===== */
:root {
  --hero-red: #FF3B30;
  --hero-red-dark: #d62d20;
  --rescue-yellow: #FFCC00;
  --rescue-yellow-dark: #e6b800;
  --water-blue: #4A90D9;
  --water-blue-dark: #357abd;
  --flame-orange: #FF9500;
  --flame-orange-dark: #e68600;
  --bg-dark: #1a1a2e;
  --bg-card: #16213e;
  --text-light: #f0f0f0;
  --text-dark: #222;
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-strong: 0 8px 32px rgba(0,0,0,0.5);
  --radius-card: 16px;
  --radius-btn: 12px;
  --font-stack: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

body {
  font-family: var(--font-stack);
  background: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(74,144,217,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(255,59,48,0.1) 0%, transparent 60%);
}

/* ===== 顶部导航 ===== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(22,33,62,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--hero-red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar .logo {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--hero-red), var(--rescue-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.top-bar .stats {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
  font-weight: 700;
}

.top-bar .stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-icon { font-size: 1.1rem; }

/* ===== 通用按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-btn);
  border: 3px solid var(--rescue-yellow);
  background: var(--hero-red);
  color: #fff;
  font-family: var(--font-stack);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--hero-red-dark);
  user-select: none;
  -webkit-user-select: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--hero-red-dark);
  border-color: #fff;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--hero-red-dark);
  border-color: var(--rescue-yellow);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-width: 2px;
  box-shadow: 0 3px 0 var(--hero-red-dark);
}

.btn-blue {
  background: var(--water-blue);
  border-color: var(--water-blue-dark);
  box-shadow: 0 4px 0 var(--water-blue-dark);
}
.btn-blue:hover { box-shadow: 0 6px 0 var(--water-blue-dark); }
.btn-blue:active { box-shadow: 0 1px 0 var(--water-blue-dark); }

.btn-green {
  background: #34c759;
  border-color: #28a745;
  box-shadow: 0 4px 0 #28a745;
}
.btn-green:hover { box-shadow: 0 6px 0 #28a745; }
.btn-green:active { box-shadow: 0 1px 0 #28a745; }

.btn-orange {
  background: var(--flame-orange);
  border-color: var(--flame-orange-dark);
  box-shadow: 0 4px 0 var(--flame-orange-dark);
}
.btn-orange:hover { box-shadow: 0 6px 0 var(--flame-orange-dark); }
.btn-orange:active { box-shadow: 0 1px 0 var(--flame-orange-dark); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 20px;
  border: 2px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

/* ===== 返回链接 ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--rescue-yellow);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}
.back-link:hover {
  background: rgba(255,204,0,0.15);
}

/* ===== 页面容器 ===== */
.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

/* ===== 标题 ===== */
.page-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--hero-red), var(--rescue-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  text-align: center;
}

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.25s ease;
}

.modal-box {
  background: var(--bg-card);
  border: 3px solid var(--rescue-yellow);
  border-radius: var(--radius-card);
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-strong);
  animation: popIn 0.3s ease;
}

.modal-box h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--rescue-yellow);
}

.modal-box p {
  margin-bottom: 16px;
  line-height: 1.6;
  font-size: 1rem;
}

/* ===== 全屏封面 ===== */
.splash-cover {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 40%, #16213e 70%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashFadeIn 0.8s ease;
  cursor: pointer;
}

.splash-cover.hidden {
  animation: splashFadeOut 0.5s ease forwards;
}

.splash-inner {
  text-align: center;
  padding: 20px;
}

.splash-icon {
  font-size: 6rem;
  animation: splashBounce 1.5s ease-in-out infinite;
  margin-bottom: 16px;
}

.splash-title {
  font-size: 2.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, #FF3B30, #FFCC00, #FF9500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.splash-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 30px;
  letter-spacing: 4px;
}

.splash-loader {
  width: 60px;
  height: 60px;
  margin: 0 auto 24px;
  border: 4px solid rgba(255,204,0,0.15);
  border-top-color: var(--rescue-yellow);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.splash-tap {
  font-size: 1.1rem;
  color: var(--rescue-yellow);
  font-weight: 700;
  animation: splashPulse 1.2s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes splashFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes splashFadeOut {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

@keyframes splashBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.1); }
}

@keyframes splashPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--rescue-yellow); }
  50% { box-shadow: 0 0 20px var(--rescue-yellow), 0 0 40px rgba(255,204,0,0.3); }
}

@keyframes coinDrop {
  0% { transform: translateY(-40px) scale(0.5); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes squish {
  0% { transform: scale(1); }
  40% { transform: scale(1.3, 0.7); }
  60% { transform: scale(0.9, 1.1); }
  100% { transform: scale(1); }
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
  .top-bar { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .top-bar .stats { font-size: 0.8rem; gap: 10px; }
  .page-title { font-size: 1.5rem; }
  .btn { padding: 8px 16px; font-size: 0.9rem; }
  .modal-box { padding: 20px; }
}
