﻿/* Pong Neo 赛博街机机台样式 */

:root {
  --bg-main: #060813;
  --bg-panel: rgba(14, 20, 42, 0.75);
  --border-cyan: rgba(0, 240, 255, 0.35);
  --border-pink: rgba(255, 0, 127, 0.35);
  --cyan: #00f0ff;
  --pink: #ff007f;
  --text-main: #e2e8f0;
  --text-dim: #94a3b8;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 50% 80%, rgba(255, 0, 127, 0.06) 0%, transparent 60%);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* 顶部一体化街机机顶状态栏 */
.arcade-topbar {
  width: 100%;
  max-width: 1120px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(10, 15, 30, 0.85);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.topbar-title h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.topbar-title .tagline {
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 1px;
}

/* 按钮通用质感（实体微浮雕、按下位移） */
.btn-nav, .arcade-btn, .chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 28, 58, 0.9);
  color: var(--text-main);
  border: 1px solid var(--border-cyan);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.1s ease;
  user-select: none;
}

.btn-nav:hover, .arcade-btn:hover, .chip-btn:hover {
  background: rgba(30, 42, 85, 0.95);
  color: #fff;
  border-color: var(--cyan);
}

.btn-nav:active, .arcade-btn:active, .chip-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.chip-btn.active {
  background: var(--cyan);
  color: #050814;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

/* 主容器：桌面端对称双翼机台 */
.arcade-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  max-width: 1120px;
  padding: 20px 16px 80px 16px; /* 预留底部安全距离防广告遮挡 */
  flex: 1;
}

/* 左右翼信息牌匾 */
.arcade-wing {
  flex: 1;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wing-card {
  background: var(--bg-panel);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.wing-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cyan);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  padding-bottom: 6px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip-btn {
  flex: 1;
  min-width: 64px;
  font-size: 0.78rem;
  padding: 6px 8px;
}

/* 右侧战况看板 */
.score-display {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #03050c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 8px;
  margin-bottom: 14px;
}

.score-box {
  text-align: center;
}

.score-player {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.score-player.pink { color: var(--pink); }
.score-player.cyan { color: var(--cyan); }

.score-num {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.score-divider {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.2);
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-dim);
}

.stat-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cyan);
}

/* 中央街机球台 */
.arcade-court-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.court-frame {
  position: relative;
  width: 420px;
  height: 560px;
  border-radius: 16px;
  padding: 6px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.3), rgba(255, 0, 127, 0.3));
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.15), inset 0 0 20px rgba(0, 0, 0, 0.8);
}

#court-canvas {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: block;
  background: #080b18;
  cursor: ew-resize;
}

/* 状态横幅 */
.status-banner {
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
  min-height: 24px;
}

/* 模态弹窗 */
.arcade-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 15, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.arcade-modal.hidden {
  display: none;
}

.modal-content {
  background: #0e152e;
  border: 1px solid var(--border-cyan);
  border-radius: 16px;
  width: 90%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.modal-content h2 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 16px;
  text-shadow: 0 0 12px var(--cyan);
}

.modal-body {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-dim);
  text-align: left;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.arcade-btn.primary {
  background: var(--cyan);
  color: #060914;
  font-weight: 700;
  border-color: #fff;
}

.arcade-btn.primary:hover {
  background: #38bdf8;
}

/* 动效降级 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 响应式调整（移动端与小屏） */
@media (max-width: 899px) {
  .arcade-container {
    flex-direction: column;
    align-items: center;
    padding-bottom: 90px;
  }

  .court-frame {
    width: 92vw;
    max-width: 380px;
    height: 506px;
  }

  .arcade-wing {
    width: 100%;
    max-width: 380px;
  }

  .wing-left { order: 2; }
  .arcade-court-wrapper { order: 1; }
  .wing-right { order: 3; }
}