/* ============================================
   开球OS - 暗黑简约风格全局样式
   主色调：深蓝黑 #0a0e1a / #1a2332 / 青绿 #00d4aa
   ============================================ */

/* 全局基础样式 */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

html {
  font-size: 16px;
}

body {
  background: linear-gradient(180deg, #0a0e1a 0%, #0f1524 100%);
  color: #e4e8f0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 毛玻璃卡片 */
.glass-card {
  background: rgba(26, 35, 50, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(42, 58, 82, 0.6);
  border-radius: 1rem;
}

/* 主按钮 */
.btn-primary {
  background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
  color: #0a0e1a;
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
  cursor: pointer;
  border: none;
  width: 100%;
}
.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(0, 212, 170, 0.2);
}
.btn-primary:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* 次要按钮 */
.btn-secondary {
  background: rgba(42, 58, 82, 0.6);
  color: #e4e8f0;
  border: 1px solid #3a4a62;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-secondary:active {
  background: rgba(58, 74, 98, 0.8);
}

/* 输入框 */
.input-field {
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid #2a3a52;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #e4e8f0;
  width: 100%;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}
.input-field:focus {
  outline: none;
  border-color: #00d4aa;
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}
.input-field::placeholder {
  color: #5a6a82;
}

/* 标签页 */
.tab-active {
  color: #00d4aa;
  border-bottom: 2px solid #00d4aa;
}

/* Toast 提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #2a3a52;
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  color: #e4e8f0;
  z-index: 9999;
  animation: toast-in 0.3s ease;
  max-width: 80%;
  text-align: center;
  pointer-events: none;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* 底部 Tab 栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid #2a3a52;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #2a3a52;
  border-radius: 2px;
}

/* 页面容器 */
.page-container {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 80px;
  min-height: 100vh;
}

/* 徽章/标签 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-green { background: rgba(0, 212, 170, 0.15); color: #00d4aa; }
.badge-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.badge-gold { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

/* 向导步骤指示器 */
.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: #2a3a52;
  transition: all 0.3s ease;
}
.step-dot.active {
  background: #00d4aa;
  width: 28px;
}
.step-dot.done {
  background: rgba(0, 212, 170, 0.5);
}

/* 选项卡片 */
.option-card {
  background: rgba(26, 35, 50, 0.6);
  border: 1.5px solid #2a3a52;
  border-radius: 1rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.option-card.selected {
  border-color: #00d4aa;
  background: rgba(0, 212, 170, 0.08);
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.15);
}
.option-card:active {
  transform: scale(0.98);
}

/* 对阵图样式 */
.bracket-line {
  stroke: #2a3a52;
  stroke-width: 2;
}
.bracket-win {
  stroke: #00d4aa;
  stroke-width: 2;
}

/* 电视看板样式 */
.tv-board {
  background: linear-gradient(135deg, #0a0e1a 0%, #1a2332 50%, #0f1524 100%);
  min-height: 100vh;
}

/* 动画 */
.fade-in {
  animation: fade-in 0.3s ease;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slide-up 0.3s ease;
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 比赛状态 */
.match-live {
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 二维码容器 */
.qr-container {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  display: inline-block;
}

/* 海报画布 */
.poster-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}
