/* ============================================
   开球OS - 绿色主题全局样式
   主色调：#1b5b27 深绿底 / 荧光绿 #00e676
   ============================================ */

/* 全局基础样式 */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

html {
  font-size: 16px;
}

body {
  background: #1b5b27;
  color: #f0fff4;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 毛玻璃卡片 */
.glass-card {
  background: rgba(27, 91, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
}

/* 主按钮 - 荧光绿渐变 */
.btn-primary {
  background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
  color: #0a3015;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.875rem 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.3);
  cursor: pointer;
  border: none;
  width: 100%;
}
.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(0, 230, 118, 0.2);
}
.btn-primary:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* 次要按钮 - 半透明深绿 */
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f0fff4;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-secondary:active {
  background: rgba(255, 255, 255, 0.18);
}

/* 输入框 - 半透明深绿 */
.input-field {
  background: rgba(20, 69, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: #f0fff4;
  width: 100%;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}
.input-field:focus {
  outline: none;
  border-color: #00e676;
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.15);
}
.input-field::placeholder {
  color: rgba(240, 255, 244, 0.4);
}

/* 小型输入框 */
.input-field-sm {
  background: rgba(20, 69, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 7px 10px;
  color: #f0fff4;
  width: 100%;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  font-size: 13px;
}
.input-field-sm:focus {
  outline: none;
  border-color: #00e676;
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.15);
}
.input-field-sm::placeholder {
  color: rgba(240, 255, 244, 0.4);
  font-size: 13px;
}

/* 标签页 */
.tab-active {
  color: #00e676;
  border-bottom: 2px solid #00e676;
}

/* Toast 提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 69, 32, 0.97);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  color: #f0fff4;
  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(20, 69, 32, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  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: rgba(255, 255, 255, 0.2);
  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, 230, 118, 0.15); color: #00e676; }
.badge-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.badge-gold { background: rgba(255, 213, 79, 0.15); color: #ffd54f; }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.badge-orange { background: rgba(249, 115, 22, 0.15); color: #f97316; }

/* 向导步骤指示器 */
.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}
.step-dot.active {
  background: #00e676;
  width: 28px;
}
.step-dot.done {
  background: rgba(0, 230, 118, 0.5);
}

/* 选项卡片 */
.option-card {
  background: rgba(27, 91, 39, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.option-card.selected {
  border-color: #00e676;
  background: rgba(0, 230, 118, 0.08);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.15);
}
.option-card:active {
  transform: scale(0.98);
}

/* 对阵图样式 */
.bracket-line {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 2;
}
.bracket-win {
  stroke: #00e676;
  stroke-width: 2;
}

/* 电视看板样式 */
.tv-board {
  background: #1b5b27;
  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;
}

/* 8号球光效（首页用） */
.ball-glow {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}
.ball-glow::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow-pulse 2s ease-in-out infinite;
}
.ball-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 35%, rgba(31, 109, 46, 0.9) 0%, rgba(20, 69, 32, 0.95) 70%);
  border-radius: 50%;
  border: 2px solid rgba(0, 230, 118, 0.3);
}
.ball-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: #0a3015;
  z-index: 1;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Logo 底部水印 */
.os-logo-footer {
  text-align: center;
  padding: 1.5rem 0;
}
.os-logo-footer .logo-text {
  font-size: 0.75rem;
  color: rgba(240, 255, 244, 0.5);
  letter-spacing: 2px;
}
.os-logo-footer .logo-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.os-logo-footer .logo-icon span:first-child {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00e676, #00c853);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #0a3015;
}

/* ============================================
   APP底部Tab导航栏（纯管理员APP专用）
   ============================================ */
.app-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(10, 30, 15, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(0, 230, 118, 0.15);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: transform 0.3s ease;
}

.app-tab-inner {
  display: flex;
  align-items: stretch;
  height: 56px;
  max-width: 480px;
  margin: 0 auto;
}

.app-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: rgba(240, 255, 244, 0.45);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.app-tab-item:active {
  background: rgba(255, 255, 255, 0.05);
}

.app-tab-item.active {
  color: #00e676;
}

.app-tab-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00e676, transparent);
  border-radius: 0 0 4px 4px;
}

.app-tab-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.app-tab-item.active .app-tab-icon {
  transform: scale(1.15) translateY(-1px);
}

.app-tab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* body有app-tab时增加底部间距 */
body.has-app-tab .page-container {
  padding-bottom: 70px;
}
