:root { --primary: #BC002D; --bg: #f8fafc; --card: #fff; --border: #e2e8f0; --text: #0f172a; --muted: #64748b; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
.header { background: var(--card); padding: 1.5rem; border-radius: 8px; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.header h1 { font-size: 1.5rem; color: var(--primary); margin-bottom: 0.5rem; }
.meta { display: flex; gap: 1rem; color: var(--muted); font-size: 0.9rem; flex-wrap: wrap; }
.controls { background: var(--card); padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); flex-wrap: wrap; }
.controls label { font-weight: 600; color: var(--text); }
.controls select { padding: 0.5rem; border: 1px solid var(--border); border-radius: 4px; min-width: 200px; }
.btn-back { color: var(--muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 1rem; display: inline-block; }
.btn-back:hover { color: var(--primary); }
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab-btn { padding: 0.75rem 1.5rem; background: none; border: none; cursor: pointer; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.card { background: var(--card); border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); margin-bottom: 1.5rem; overflow: hidden; }
.event-header { background: #BC002D; padding: 1rem; border-bottom: 1px solid var(--border); font-weight: 700; color: #ffffff; display: flex; justify-content: space-between; align-items: center; }
.event-badge { background: #000000; color: white; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; }
table { width: 100%; border-collapse: collapse; }
th { background: #f8fafc; text-align: left; padding: 0.75rem; font-size: 0.85rem; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); }
td { padding: 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }
.rank { font-weight: 700; text-align: center; width: 40px; }
.score { font-weight: 700; text-align: right; font-family: monospace; font-size: 1.1rem; }
.bib { background: #e2e8f0; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-weight: 600; font-size: 0.85rem; }
.flag { width: 20px; height: 14px; vertical-align: middle; margin-right: 6px; border: 1px solid #ccc; border-radius: 2px; }
.cut-line td { border-top: 3px solid var(--primary); height: 3px; padding: 0 !important; background: transparent !important; }
.cut-tie { background-color: #fef3c7 !important; transition: background-color 0.2s; }
.cut-tie:hover { background-color: #fde68a !important; }
.eliminated { background-color: #f1f5f9 !important; color: var(--text) !important; }
.eliminated .bib { background-color: #cbd5e1 !important; color: var(--text) !important; }
.eliminated .score { color: var(--muted) !important; }
.eliminated td { border-bottom-color: #e2e8f0 !important; }
.bracket-row { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--border); background: #fff; }
.bracket-row:last-child { border-bottom: none; }
.player { flex: 1; }
.player.right { text-align: right; }
.player b { display: flex; align-items: center; justify-content: flex-start; gap: 6px; font-size: 1rem; }
.player.right b { justify-content: flex-end; }
.player span { font-size: 0.85rem; color: var(--muted); margin-top: 2px; display: block; }
.vs-box { padding: 0 1rem; font-weight: 800; color: var(--text); font-size: 1.2rem; }
.winner { color: #BC002D; }
.medal { font-size: 1.3em; line-height: 1; }
.empty { text-align: center; padding: 2rem; color: var(--muted); }
.target-badge { display: inline-flex; align-items: center; justify-content: center; background-color: #fef08a; color: #111827; font-weight: 700; font-size: 0.75rem; padding: 3px 8px; border-radius: 6px; margin-left: 6px; min-width: 24px; vertical-align: middle; border: 1px solid #eab308; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.target-badge::before { content: "🎯"; margin-right: 4px; font-size: 0.9em; }
@media (max-width: 600px) {
	.cut-line td { border-top-width: 2px; }
	.cut-tie { background-color: #fde68a !important; }
	.bracket-row { flex-direction: column; gap: 0.5rem; text-align: center; }
	.player.right { text-align: center; }
	.player b { justify-content: center !important; }
	.vs-box { transform: rotate(90deg); margin: 5px 0; }
	.target-badge { margin: 4px auto 0; }
}