:root {
  --bg-dark: #0b0f19;
  --bg-card: rgba(18, 26, 44, 0.75);
  --bg-card-hover: rgba(28, 40, 66, 0.85);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);
  
  --primary-cyan: #00f2fe;
  --primary-blue: #4facfe;
  --accent-gold: #ffb199;
  --accent-green: #00f5a0;
  --accent-purple: #c084fc;
  --accent-red: #ff0844;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-glow: 0 8px 32px 0 rgba(0, 242, 254, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 10% 10%, rgba(79, 172, 254, 0.12) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(127, 0, 255, 0.12) 0px, transparent 50%);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  padding-bottom: 40px;
  -webkit-text-size-adjust: 100%;
}

.container { max-width: 1240px; margin: 0 auto; padding: 16px; }

header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--border-card); margin-bottom: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-cyan));
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3); flex-shrink: 0;
}

.brand-title h1 {
  font-size: 1.2rem; font-weight: 700; letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff, #a5f3fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-title p { font-size: 0.75rem; color: var(--text-muted); }

.header-status {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0, 245, 160, 0.1); border: 1px solid rgba(0, 245, 160, 0.3);
  color: var(--accent-green); padding: 4px 10px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 500; white-space: nowrap;
}

.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background-color: var(--accent-green); box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite; flex-shrink: 0;
}

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

.metrics-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px;
}
.metric-card {
  background: var(--bg-card); backdrop-filter: blur(16px);
  border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  padding: 16px; transition: all 0.3s ease;
}
.metric-card:hover { border-color: var(--border-glow); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.metric-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }
.metric-value {
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(90deg, #fff, #c084fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.metric-sub { font-size: 0.7rem; color: var(--accent-green); margin-top: 4px; }

.parlay-section {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(255, 177, 153, 0.3); border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 24px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.parlay-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.parlay-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; color: var(--accent-gold); }
.parlay-odds-badge {
  background: linear-gradient(135deg, #ffb199, #ff0844); color: #fff;
  padding: 4px 10px; border-radius: 10px; font-weight: 800; font-size: 0.88rem; white-space: nowrap;
}
.parlay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.parlay-item { background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius-md); padding: 14px; }
.parlay-item-code { font-size: 0.72rem; color: var(--primary-cyan); font-weight: 600; }
.parlay-item-match { font-size: 0.95rem; font-weight: 700; margin: 4px 0; }
.parlay-item-pick { color: var(--accent-green); font-weight: 700; font-size: 0.88rem; }

.section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

.matches-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 16px; }

.match-card {
  background: var(--bg-card); backdrop-filter: blur(16px);
  border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  padding: 16px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column; justify-content: space-between;
}
.match-card:hover { border-color: var(--primary-cyan); box-shadow: 0 10px 30px rgba(0, 242, 254, 0.15); transform: translateY(-2px); }

.match-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 0.78rem; color: var(--text-muted); }
.match-code { background: rgba(79, 172, 254, 0.15); color: var(--primary-cyan); padding: 2px 6px; border-radius: 4px; font-weight: 700; }

.teams-container { display: flex; justify-content: space-between; align-items: center; margin: 12px 0; }
.team { text-align: center; flex: 1; min-width: 0; }
.team-name { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-elo { font-size: 0.72rem; color: var(--text-sub); }
.vs-badge { font-size: 0.75rem; color: var(--text-sub); font-weight: 800; padding: 0 8px; flex-shrink: 0; }

/* Movement Box */
.movement-box {
  background: rgba(15, 23, 42, 0.7); border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md); padding: 8px 12px; margin: 10px 0; font-size: 0.78rem;
}
.movement-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.movement-signal { font-weight: 700; color: var(--primary-cyan); }
.movement-desc { color: var(--text-muted); font-size: 0.72rem; line-height: 1.35; }

/* Rationale Box (AI 预测依据与决策链) */
.rationale-box {
  background: rgba(30, 41, 59, 0.5); border-left: 3px solid var(--primary-cyan);
  border-radius: 6px; padding: 8px 10px; margin: 10px 0; font-size: 0.75rem;
}
.rationale-title { font-weight: 700; color: var(--primary-cyan); margin-bottom: 4px; font-size: 0.78rem; }
.rationale-item { color: var(--text-muted); margin-bottom: 4px; line-height: 1.4; word-break: break-word; }
.rationale-item:last-child { margin-bottom: 0; }

/* Portfolio Box (💰 最佳收益与对冲资金分配组合) */
.portfolio-box {
  background: linear-gradient(135deg, rgba(255, 177, 153, 0.08), rgba(255, 8, 68, 0.05));
  border: 1px solid rgba(255, 177, 153, 0.25); border-radius: var(--radius-md);
  padding: 10px; margin: 10px 0; font-size: 0.75rem;
}
.portfolio-header { font-weight: 700; color: var(--accent-gold); margin-bottom: 6px; font-size: 0.78rem; display: flex; justify-content: space-between; }
.portfolio-pills { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.portfolio-pill {
  background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px; border-radius: 4px; color: #fff; font-weight: 600; font-size: 0.72rem;
}
.portfolio-pill .ratio { color: var(--accent-gold); font-weight: 800; }
.portfolio-desc { color: var(--accent-green); font-size: 0.72rem; line-height: 1.35; }

.multi-rec-box { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rec-badge-safe {
  background: rgba(0, 245, 160, 0.1); border: 1px solid rgba(0, 245, 160, 0.3);
  padding: 8px 10px; border-radius: var(--radius-md); display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem;
}
.rec-badge-safe .title { color: var(--accent-green); font-weight: 700; }
.rec-badge-safe .prob { color: #fff; font-weight: 800; white-space: nowrap; }

.rec-badge-ou {
  background: rgba(192, 132, 252, 0.1); border: 1px solid rgba(192, 132, 252, 0.35);
  padding: 8px 10px; border-radius: var(--radius-md); display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem;
}
.rec-badge-ou .title { color: var(--accent-purple); font-weight: 700; }
.rec-badge-ou .prob { color: #fff; font-weight: 800; white-space: nowrap; }

.rec-badge-agg {
  background: rgba(255, 8, 68, 0.08); border: 1px solid rgba(255, 8, 68, 0.3);
  padding: 8px 10px; border-radius: var(--radius-md); display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem;
}
.rec-badge-agg .title { color: var(--accent-gold); font-weight: 700; }
.rec-badge-agg .ev { color: var(--accent-gold); font-weight: 800; white-space: nowrap; }

.probs-bar-container { margin: 12px 0; }
.probs-label { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.probs-bar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.05); }
.bar-win { background: var(--primary-cyan); }
.bar-draw { background: var(--accent-gold); }
.bar-loss { background: var(--accent-red); }

.scores-row { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.score-pill {
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px; padding: 4px 6px; font-size: 0.72rem; text-align: center; flex: 1; min-width: 55px;
}
.score-num { font-weight: 700; color: var(--text-main); }
.score-prob { color: var(--text-sub); font-size: 0.68rem; }

footer { text-align: center; margin-top: 30px; font-size: 0.75rem; color: var(--text-sub); }

@media (max-width: 768px) {
  .container { padding: 12px; }
  header { flex-direction: row; padding: 12px 0; }
  .brand-title h1 { font-size: 1.05rem; }
  .brand-title p { font-size: 0.7rem; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .metric-card { padding: 12px; }
  .metric-value { font-size: 1.35rem; }
  .metric-label { font-size: 0.72rem; }
  .parlay-section { padding: 14px; }
  .parlay-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .parlay-grid { grid-template-columns: 1fr; }
  .matches-grid { grid-template-columns: 1fr; gap: 14px; }
  .team-name { font-size: 0.98rem; }
  .rec-badge-safe, .rec-badge-ou, .rec-badge-agg { font-size: 0.75rem; padding: 6px 8px; }
}

@media (max-width: 480px) {
  .brand-title p { display: none; }
  .metric-value { font-size: 1.25rem; }
  .metric-sub { font-size: 0.65rem; }
}
