/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0e27;
  --bg-card: #111640;
  --bg-card-hover: #181d4a;
  --primary: #00d4aa;
  --primary-dim: #00b894;
  --accent: #ff6b6b;
  --text: #e8e8e8;
  --text-dim: #8890b5;
  --border: #1e2358;
  --live: #ff4757;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { border: none; cursor: pointer; font: inherit; }

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #111640 0%, #0f1330 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-title { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.5px; }
.header-update { font-size: 0.7rem; color: var(--text-dim); }

/* ===== Match List ===== */
.match-list { padding: 8px 12px; }

/* ===== Match Card ===== */
.match-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.match-card:active { border-color: var(--primary-dim); }

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.match-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
}

.match-status.live {
  background: rgba(255, 71, 87, 0.15);
  color: var(--live);
  animation: pulse 2s infinite;
}

.match-status.upcoming { background: rgba(0, 212, 170, 0.12); color: var(--primary); }
.match-status.finished { background: rgba(136, 144, 181, 0.1); color: var(--text-dim); }

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

.match-kickoff { font-size: 0.75rem; color: var(--text-dim); }

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.match-team { flex: 1; text-align: center; }

.match-flag { font-size: 2rem; display: block; margin-bottom: 4px; }
.match-team-name { font-size: 0.85rem; font-weight: 600; }

.match-score {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  min-width: 60px;
  text-align: center;
  color: var(--text);
}

.match-score.upcoming {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0;
}

.match-streams { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-stream {
  flex: 1;
  min-width: 80px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  background: var(--border);
  color: var(--text);
  transition: all 0.15s;
}

.btn-stream:active { transform: scale(0.97); }

.btn-stream.quality-极速 {
  background: linear-gradient(135deg, rgba(0,212,170,0.2), rgba(0,212,170,0.1));
  border: 1px solid rgba(0,212,170,0.3);
  color: var(--primary);
}

.btn-stream.quality-超清 {
  background: linear-gradient(135deg, rgba(72,149,239,0.2), rgba(72,149,239,0.1));
  border: 1px solid rgba(72,149,239,0.3);
  color: #4895ef;
}

.btn-stream.quality-备用 {
  background: linear-gradient(135deg, rgba(136,144,181,0.15), rgba(136,144,181,0.08));
  border: 1px solid rgba(136,144,181,0.25);
  color: var(--text-dim);
}

.btn-stream .quality-badge { display: block; font-size: 0.65rem; opacity: 0.7; margin-top: 1px; }

/* ===== Intercept Modal ===== */
.intercept-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.intercept-modal {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px 20px 28px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  border: 1px solid var(--border);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.intercept-fake-player {
  background: #000;
  border-radius: 10px;
  padding: 28px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.fake-player-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  display: block;
}

.fake-player-text {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.intercept-body {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 20px;
  padding: 0 4px;
}

.btn-intercept {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-intercept:disabled { opacity: 0.45; }
.btn-intercept:not(:disabled):active { transform: scale(0.97); }

/* ===== Ad: Sticky Banner ===== */
.ad-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(10,14,39,0.98) 0%, rgba(10,14,39,0.9) 100%);
  border-bottom: 1px solid var(--border);
  padding: 8px 40px 8px 12px;
  display: flex;
  align-items: center;
}

.ad-banner-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
}

.ad-banner-img {
  width: auto;
  height: 48px;
  border-radius: 6px;
  object-fit: contain;
}

.ad-banner-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
  flex: 1;
}

.ad-banner-close {
  position: absolute;
  right: 12px;
  top: 8px;
  background: rgba(255,255,255,0.1);
  color: var(--text-dim);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Ad: Social Bar ===== */
.social-bar {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  z-index: 150;
  background: rgba(30,35,88,0.95);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  white-space: nowrap;
  max-width: 90vw;
}

.social-bar.show { transform: translateX(-50%) translateY(0); }
.social-bar-content { display: flex; align-items: center; gap: 8px; }
.social-bar-icon { font-size: 1rem; }
.social-bar-msg { font-size: 0.8rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }

/* ===== Ad Click Capture ===== */
.ad-click-capture {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: transparent;
  display: none;
}

.ad-click-capture.active { display: block; }

/* ===== Responsive: Tablet+ ===== */
@media (min-width: 768px) {
  .match-list { max-width: 600px; margin: 0 auto; padding: 16px; }
  .match-card { padding: 20px; }
  .match-flag { font-size: 2.5rem; }
  .match-team-name { font-size: 1rem; }
  .match-score { font-size: 2rem; }
}
