/* ============================================
   体育赛事预测平台 - 基础样式
   配色方案：藏蓝主背景 + 亮橙强调色
   ============================================ */

/* --- CSS 变量 --- */
:root {
  /* 主色 */
  --navy-dark: #0a1628;
  --navy-main: #0f2044;
  --navy-light: #1a3366;
  --navy-lighter: #243f7a;

  /* 强调色 */
  --orange-primary: #ff7a1a;
  --orange-light: #ff9a4d;
  --orange-dark: #e06500;
  --orange-glow: rgba(255, 122, 26, 0.3);

  /* 辅助色 */
  --green-win: #22c55e;
  --green-light: rgba(34, 197, 94, 0.15);
  --red-loss: #ef4444;
  --red-light: rgba(239, 68, 68, 0.15);
  --yellow-draw: #f59e0b;
  --yellow-light: rgba(245, 158, 11, 0.15);

  /* 文字色 */
  --text-primary: #f0f4ff;
  --text-secondary: #94a3c8;
  --text-muted: #5a6e94;
  --text-accent: #ff9a4d;

  /* 卡片与背景 */
  --card-bg: rgba(15, 32, 68, 0.8);
  --card-bg-hover: rgba(26, 51, 102, 0.9);
  --card-border: rgba(36, 63, 122, 0.5);
  --glass-bg: rgba(10, 22, 40, 0.85);

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--orange-glow);

  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* --- 全局重置 --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--navy-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--orange-primary);
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
}

input, select {
  font-family: inherit;
  outline: none;
}

/* --- 滚动条美化 --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--navy-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--navy-lighter);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange-primary);
}

/* --- 容器 --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: 1400px;
}

/* --- 按钮系统 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--navy-lighter);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: var(--navy-light);
  border-color: var(--orange-primary);
}

.btn-outline {
  background: transparent;
  color: var(--orange-primary);
  border: 1.5px solid var(--orange-primary);
}

.btn-outline:hover {
  background: rgba(255, 122, 26, 0.1);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* --- 卡片系统 --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  background: var(--card-bg-hover);
  border-color: rgba(255, 122, 26, 0.3);
  box-shadow: var(--shadow-md);
}

.card-flat {
  background: transparent;
  border: none;
  padding: 0;
}

.card-flat:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* --- 标签/徽章 --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-orange {
  background: rgba(255, 122, 26, 0.15);
  color: var(--orange-primary);
  border: 1px solid rgba(255, 122, 26, 0.3);
}

.badge-green {
  background: var(--green-light);
  color: var(--green-win);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-red {
  background: var(--red-light);
  color: var(--red-loss);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-yellow {
  background: var(--yellow-light);
  color: var(--yellow-draw);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-live {
  background: rgba(255, 122, 26, 0.2);
  color: var(--orange-primary);
  border: 1px solid var(--orange-primary);
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.badge-vip {
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.2), rgba(255, 154, 77, 0.2));
  color: var(--orange-light);
  border: 1px solid var(--orange-primary);
}

/* --- 锁定/解锁覆盖层 --- */
.lock-overlay {
  position: relative;
}

.lock-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-overlay-content {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  z-index: 2;
}

.lock-icon {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
}

.lock-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

/* --- 模态框 --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--navy-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  width: 90%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-lighter);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--red-loss);
  color: #fff;
}

/* --- 表单元素 --- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--navy-dark);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-row {
  display: flex;
  gap: var(--space-sm);
}

.form-row .form-input {
  flex: 1;
}

.form-btn {
  flex-shrink: 0;
  padding: 12px 20px;
}

/* --- 分割线 --- */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

/* --- 第三方登录按钮 --- */
.social-login {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-normal);
}

.social-btn-wechat {
  background: rgba(7, 193, 96, 0.15);
  color: #07c160;
  border: 1px solid rgba(7, 193, 96, 0.3);
}

.social-btn-wechat:hover {
  background: rgba(7, 193, 96, 0.25);
}

.social-btn-qq {
  background: rgba(18, 183, 245, 0.15);
  color: #12b7f5;
  border: 1px solid rgba(18, 183, 245, 0.3);
}

.social-btn-qq:hover {
  background: rgba(18, 183, 245, 0.25);
}

/* --- Toast 提示 --- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
  min-width: 280px;
}

.toast-success {
  background: var(--green-win);
  color: #fff;
}

.toast-error {
  background: var(--red-loss);
  color: #fff;
}

.toast-info {
  background: var(--orange-primary);
  color: #fff;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- 动画 --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.88rem;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
  }

  .card {
    padding: var(--space-md);
  }

  .modal {
    width: 95%;
    padding: var(--space-lg);
  }

  .social-login {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
}

/* --- 工具类 --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-orange { color: var(--orange-primary); }
.text-green { color: var(--green-win); }
.text-red { color: var(--red-loss); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.hidden { display: none !important; }

/* ============================================
   广告系统样式
   ============================================ */

/* 广告弹窗 */
.ad-modal {
  max-width: 400px;
}

.ad-modal-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.ad-content {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.ad-placeholder {
  padding: var(--space-xl) var(--space-lg);
  background: var(--navy-dark);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--card-border);
  margin-bottom: var(--space-lg);
}

.ad-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-sm);
}

.ad-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.ad-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ad-timer {
  display: flex;
  justify-content: center;
}

.ad-timer-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--orange-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: pulse-live 2s ease-in-out infinite;
}

.ad-timer-count {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--orange-primary);
  line-height: 1;
}

.ad-timer-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.ad-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ad-actions .btn {
  width: 100%;
}

/* 广告提示条 */
.ad-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.1), rgba(255, 122, 26, 0.05));
  border: 1px solid rgba(255, 122, 26, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.ad-banner-content {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ad-banner-icon {
  font-size: 1.5rem;
}

.ad-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ad-banner-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--orange-primary);
}

.ad-banner-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* 广告联盟占位 */
.ad-slot {
  min-height: 90px;
  background: var(--navy-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: var(--space-md) 0;
}

/* 快捷登录扩展 */
.social-login-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.social-btn-alipay {
  background: rgba(22, 119, 255, 0.15);
  color: #1677ff;
  border: 1px solid rgba(22, 119, 255, 0.3);
}

.social-btn-alipay:hover {
  background: rgba(22, 119, 255, 0.25);
}

.social-btn-tg {
  background: rgba(42, 171, 238, 0.15);
  color: #2aabee;
  border: 1px solid rgba(42, 171, 238, 0.3);
}

.social-btn-tg:hover {
  background: rgba(42, 171, 238, 0.25);
}

.social-btn-twitter {
  background: rgba(29, 161, 242, 0.15);
  color: #1da1f2;
  border: 1px solid rgba(29, 161, 242, 0.3);
}

.social-btn-twitter:hover {
  background: rgba(29, 161, 242, 0.25);
}

.social-btn-email {
  background: rgba(234, 67, 53, 0.15);
  color: #ea4335;
  border: 1px solid rgba(234, 67, 53, 0.3);
}

.social-btn-email:hover {
  background: rgba(234, 67, 53, 0.25);
}

.social-btn-coming {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 海外登录区域 */
.overseas-login {
  margin-top: var(--space-md);
}

.overseas-login-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-sm);
}
