/* =============================================================== */
/* Palpite Premiado Copa 2026 — Stylesheet                          */
/* =============================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
	font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
	background: #0a0e1a;
	color: #e8eaf0;
	line-height: 1.5;
	min-height: 100vh;
}

a { color: #ffd86b; text-decoration: none; }
a:hover { color: #fff2b3; }

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

/* =============================================================== */
/* Hero                                                              */
/* =============================================================== */

.copa-hero {
	position: relative;
	padding: 60px 20px 80px;
	color: #fff;
	overflow: hidden;
	border-bottom: 3px solid #ffb31a;
}

.copa-hero.compact { padding: 40px 20px 30px; }

.hero-bg {
	position: absolute;
	inset: 0;
	background: url('../images/hero-bg.webp') center / cover no-repeat;
	z-index: 0;
}

.hero-content {
	position: relative;
	z-index: 1;
	max-width: 1100px;
	margin: 0 auto;
	text-align: center;
}

.hero-edition {
	display: inline-block;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.2);
	padding: 5px 14px;
	border-radius: 999px;
	font-size: 13px;
	letter-spacing: 0.5px;
	margin-bottom: 18px;
	backdrop-filter: blur(4px);
}

.copa-hero h1 {
	font-size: clamp(32px, 6vw, 56px);
	font-weight: 900;
	line-height: 1.1;
	margin: 0 0 14px;
	text-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.copa-hero h1 span {
	display: inline-block;
	background: linear-gradient(90deg, #ffd86b, #ffb31a);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero-tagline {
	font-size: clamp(15px, 2vw, 19px);
	margin: 0 auto 28px;
	max-width: 600px;
	opacity: 0.9;
}

.hero-tiers {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.tier-pill {
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 999px;
	padding: 10px 20px;
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.tier-pill.tier-brazil { border-color: #ffd86b; box-shadow: 0 0 20px rgba(255, 216, 107, 0.3); }
.tier-pill strong { color: #ffd86b; }

.tier-flag { font-size: 18px; }

/* Bandeira do Brasil em SVG inline — o emoji 🇧🇷 não renderiza no Chrome/Edge
   no Windows (Segoe UI Emoji não traz glifos de bandeira). */
.flag-br {
    display: inline-block;
    width: 1.35em;
    height: 0.95em;
    vertical-align: -0.12em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 20'%3E%3Crect width='28' height='20' rx='2' fill='%23009c3b'/%3E%3Cpath d='M14 3 L25 10 L14 17 L3 10 Z' fill='%23ffdf00'/%3E%3Ccircle cx='14' cy='10' r='4' fill='%23002776'/%3E%3C/svg%3E") center/contain no-repeat;
}

.hero-bonus {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: -8px auto 24px;
	padding: 8px 18px;
	border-radius: 999px;
	background: rgba(255, 216, 107, 0.06);
	border: 1px dashed rgba(255, 216, 107, 0.35);
	color: rgba(255, 255, 255, 0.78);
	font-size: 13px;
	line-height: 1.35;
	text-decoration: none;
	transition: background .2s, border-color .2s, color .2s;
}
.hero-bonus i { color: #ffd86b; }
.hero-bonus strong { color: #ffd86b; }
.hero-bonus-go { transition: transform .2s; }
.hero-bonus:hover {
	background: rgba(255, 216, 107, 0.12);
	border-color: rgba(255, 216, 107, 0.6);
	color: #fff;
}
.hero-bonus:hover .hero-bonus-go { transform: translateX(4px); }

.hero-cta {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.btn-primary, .btn-secondary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 22px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	border: none;
	transition: transform 0.15s, box-shadow 0.15s;
	text-decoration: none;
}

.btn-primary {
	background: linear-gradient(90deg, #ffd86b, #ffb31a);
	color: #1a1a1a;
}

.btn-primary:hover {
	color: #1a1a1a;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(255, 179, 26, 0.4);
}

.btn-secondary {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
}

.countdown {
	display: inline-flex;
	flex-direction: column;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 216, 107, 0.4);
	border-radius: 12px;
	padding: 14px 28px;
	font-size: 14px;
	margin-top: 8px;
}

.countdown-label {
	opacity: 0.7;
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.countdown-value {
	font-family: 'Courier New', monospace;
	font-size: 28px;
	font-weight: 900;
	color: #ffd86b;
	margin: 4px 0;
}

.countdown-game {
	font-size: 13px;
	opacity: 0.85;
}

/* =============================================================== */
/* Main                                                              */
/* =============================================================== */

.copa-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 16px 60px;
}

.block {
	margin-bottom: 48px;
}

.block h2 {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid rgba(255, 255, 255, 0.08);
	display: flex;
	align-items: center;
	gap: 10px;
}

.live-dot {
	color: #ff3838;
	animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(0.9); }
}

.empty-state {
	background: rgba(255, 255, 255, 0.04);
	border-radius: 8px;
	padding: 30px;
	text-align: center;
	opacity: 0.7;
}

.block-cta {
	text-align: center;
	margin-top: 16px;
}

/* =============================================================== */
/* Game cards                                                        */
/* =============================================================== */

.games-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.game-card {
	position: relative;
	background: linear-gradient(160deg, #1a1f2e, #0f1320);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 14px;
	padding: 16px;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
	font-family: inherit;
	color: inherit;
	text-align: left;
	width: 100%;
}

button.game-card { font-size: inherit; }

.game-card:hover:not(.finished):not(.live) {
	transform: translateY(-3px);
	border-color: rgba(255, 216, 107, 0.4);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.game-card.tier-brazil {
	border-color: rgba(0, 156, 76, 0.5);
	background: linear-gradient(160deg, #0e2e1a, #0a1a14);
}

.game-card.tier-brazil:hover { border-color: #ffd86b; }

.game-card.finished { opacity: 0.85; cursor: default; }
.game-card.live { border-color: #ff3838; box-shadow: 0 0 20px rgba(255, 56, 56, 0.2); cursor: default; }

.game-banner {
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 4px;
	letter-spacing: 0.5px;
}

.game-banner.upcoming { background: rgba(255, 255, 255, 0.1); color: #cdd3dc; }
.game-banner.live { background: #ff3838; color: #fff; animation: pulse 1.4s infinite; }
.game-banner.finished { background: rgba(76, 175, 80, 0.2); color: #81c784; }

.tier-badge {
	display: inline-block;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 4px;
	margin-bottom: 8px;
	letter-spacing: 0.3px;
	background: rgba(255, 255, 255, 0.08);
}

.tier-brazil .tier-badge {
	background: linear-gradient(90deg, #009c4c 0%, #ffd700 100%);
	color: #002776;
	font-weight: 700;
}

.stage {
	font-size: 12px;
	opacity: 0.6;
	margin-bottom: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.teams {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.team {
	flex: 1;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.team .flag {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	overflow: hidden;
}

.team .flag img {
	width: 36px;
	height: 36px;
	object-fit: contain;
}

.flag-placeholder {
	font-size: 11px;
	font-weight: 700;
	color: #cdd3dc;
}

.team .name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	min-height: 2.4em;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vs {
	font-size: 18px;
	font-weight: 900;
	opacity: 0.5;
	min-width: 40px;
	text-align: center;
}

.score-final {
	font-size: 22px;
	color: #ffd86b;
	letter-spacing: 2px;
}

.my-bet {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed rgba(255, 255, 255, 0.1);
	font-size: 13px;
	text-align: center;
}

.my-bet-label {
	display: block;
	font-size: 11px;
	opacity: 0.6;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	margin-bottom: 2px;
}

.needs-login {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px dashed rgba(255, 255, 255, 0.1);
	font-size: 12px;
	text-align: center;
	opacity: 0.6;
}

/* =============================================================== */
/* My bets list                                                      */
/* =============================================================== */

.my-bets-list { display: grid; gap: 8px; }

.my-bet-row {
	display: grid;
	grid-template-columns: 2fr 2fr 1fr;
	align-items: center;
	gap: 12px;
	background: rgba(255, 255, 255, 0.04);
	border-left: 3px solid rgba(255, 255, 255, 0.1);
	padding: 12px 16px;
	border-radius: 6px;
}

.my-bet-row.status-win { border-left-color: #4caf50; }
.my-bet-row.status-loss { border-left-color: #757575; opacity: 0.65; }
.my-bet-row.status-pending { border-left-color: #ffb31a; }

.my-bet-teams { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.tier-mini {
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 4px;
	background: rgba(255, 216, 107, 0.2);
}

.my-bet-scores .palpite, .my-bet-scores .final {
	display: inline-block;
	margin-right: 12px;
	font-size: 13px;
}

.my-bet-status { text-align: right; font-size: 13px; }

/* =============================================================== */
/* Modal                                                             */
/* =============================================================== */

.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 20px;
	overflow-y: auto;
}

.modal-overlay[hidden] { display: none; }

.modal-card {
	background: #151a26;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	max-width: 500px;
	width: 100%;
	padding: 28px;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	background: none;
	border: none;
	color: #cdd3dc;
	font-size: 28px;
	cursor: pointer;
	width: 32px;
	height: 32px;
	line-height: 1;
	z-index: 2;
}

/* Reserva o canto superior direito para o botão de fechar (×), evitando que o
   tier/título encavalem o clique do .modal-close. */
.modal-card header { padding-right: 28px; }
.modal-card h3 { margin: 0 0 6px; font-size: 22px; }
.modal-tier { font-size: 13px; opacity: 0.7; margin-bottom: 4px; }
.modal-kickoff { font-size: 13px; opacity: 0.6; margin: 0 0 18px; }

.modal-card label {
	display: block;
	font-size: 13px;
	margin-bottom: 6px;
	margin-top: 14px;
	opacity: 0.85;
}

.modal-card select,
.modal-card input[type="number"] {
	width: 100%;
	padding: 10px 12px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	border-radius: 6px;
	font-size: 15px;
	font-family: inherit;
}

.modal-card select:focus, .modal-card input:focus {
	outline: none;
	border-color: #ffd86b;
	background: rgba(255, 255, 255, 0.1);
}

.modal-card select option {
	background: #131a2b;
	color: #fff;
}

/* =============================================================== */
/* Estatística agregada de palpites                                 */
/* =============================================================== */

.modal-stats {
	margin: 6px 0 0;
	font-size: 13px;
	color: #cdd3dc;
}
.modal-stats strong { color: #ffd86b; }

.card-stats-hint {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 12px;
	text-align: center;
	color: #9aa3b2;
	transition: color 0.15s;
}

.game-card.finished, .game-card.live { cursor: pointer; }
.game-card.finished:hover, .game-card.live:hover { border-color: rgba(255, 216, 107, 0.4); }
.game-card.finished:hover .card-stats-hint,
.game-card.live:hover .card-stats-hint { color: #ffd86b; }

.stats-total {
	text-align: center;
	font-size: 15px;
	margin: 0 0 20px;
	color: #e8eaf0;
}
.stats-total strong { color: #ffd86b; font-size: 18px; }

.stats-block { margin-bottom: 20px; }
.stats-block:last-child { margin-bottom: 0; }
.stats-block h4 {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #9aa3b2;
	margin: 0 0 12px;
}

.stat-row {
	display: grid;
	grid-template-columns: 1fr auto;
	column-gap: 12px;
	margin-bottom: 10px;
}
.stat-label {
	grid-column: 1;
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
}
.stat-label span { color: #ffd86b; }
.stat-bar {
	grid-column: 1;
	height: 8px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 4px;
	overflow: hidden;
}
.stat-fill {
	height: 100%;
	background: linear-gradient(90deg, #009c4c, #ffd700);
	border-radius: 4px;
}
.stat-count {
	grid-column: 2;
	grid-row: 1 / 3;
	align-self: center;
	min-width: 32px;
	text-align: right;
	font-size: 12px;
	color: #9aa3b2;
}

.score-input {
	display: flex;
	align-items: center;
	gap: 10px;
}

.score-input span { font-weight: 700; }
.score-input input { width: 70px; text-align: center; }
.score-input .x { color: #ffd86b; }

.hint { font-size: 12px; opacity: 0.65; margin: 6px 0 0; }
.hint.center { text-align: center; }

.form-feedback { margin-top: 14px; }
.form-feedback .ok { color: #81c784; background: rgba(76,175,80,0.15); padding: 10px; border-radius: 6px; }
.form-feedback .err { color: #ef9a9a; background: rgba(244,67,54,0.15); padding: 10px; border-radius: 6px; }

.modal-card .btn-primary {
	width: 100%;
	justify-content: center;
	margin-top: 18px;
}

/* =============================================================== */
/* Page: history / rules                                             */
/* =============================================================== */

.result-block {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 20px;
}

.result-block.tier-brazil {
	border-color: rgba(255, 216, 107, 0.4);
	background: linear-gradient(135deg, rgba(0, 156, 76, 0.08), rgba(255, 216, 107, 0.05));
}

.result-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.result-meta { display: flex; gap: 10px; font-size: 13px; opacity: 0.8; flex-wrap: wrap; }
.result-meta .stage { text-transform: uppercase; letter-spacing: 0.5px; }

.result-score { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.result-score strong { font-size: 24px; color: #ffd86b; }
.result-score .x { color: #ffd86b; }
.result-score .team-name { font-weight: 600; }

.winners-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.winners-table th, .winners-table td {
	padding: 8px 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	text-align: left;
}

.winners-table th {
	font-size: 12px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	opacity: 0.7;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-warning { color: #ffd86b; }
.muted { opacity: 0.5; }

.row-jackpot { background: rgba(255, 216, 107, 0.08); }

.no-winners { padding: 14px; opacity: 0.6; text-align: center; }

/* Pódio por fase (topo da página de campeões) */
.podium-block {
	border: 1px solid rgba(255, 216, 107, 0.4);
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(0, 156, 76, 0.08), rgba(255, 216, 107, 0.06));
	padding: 22px;
}
.podium-title {
	margin: 0 0 4px;
	font-size: 20px;
	color: #ffd86b;
}
.podium-title i { margin-right: 6px; }
.podium-sub {
	margin: 0 0 18px;
	font-size: 13px;
	opacity: 0.75;
}
.podium-sub a { color: #ffd86b; text-decoration: none; }
.podium-sub a:hover { text-decoration: underline; }
.podium-phase { margin-bottom: 18px; }
.podium-phase:last-child { margin-bottom: 0; }
.podium-phase-name {
	margin: 0 0 6px;
	font-size: 15px;
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 6px;
}
.podium-table .podium-medal { white-space: nowrap; }
.podium-table .podium-pos-1 { background: rgba(255, 216, 107, 0.1); }
.podium-table .podium-pos-2 { background: rgba(255, 255, 255, 0.05); }
.podium-table .podium-pos-3 { background: rgba(205, 127, 50, 0.08); }

/* Rules page */
.prose h2 {
	font-size: 18px;
	margin: 28px 0 8px;
	color: #ffd86b;
	padding: 0;
	border: none;
}

.prose p { margin: 6px 0 12px; }

.tier-table {
	display: grid;
	gap: 12px;
	margin: 12px 0 24px;
}

.tier-row {
	background: rgba(255, 255, 255, 0.04);
	border-radius: 10px;
	padding: 16px;
	border-left: 4px solid rgba(255, 255, 255, 0.1);
}

.tier-row.tier-brazil { border-left-color: #ffd86b; background: linear-gradient(90deg, rgba(0, 156, 76, 0.1), transparent); }
.tier-row.tier-normal { border-left-color: #9aa5b3; }

.tier-name { font-size: 16px; margin-bottom: 8px; }

.tier-details { display: grid; gap: 4px; font-size: 14px; }
.tier-details > div { display: flex; justify-content: space-between; }
.tier-details > div.total { padding-top: 8px; border-top: 1px dashed rgba(255,255,255,0.1); margin-top: 4px; }

/* =============================================================== */
/* Footer                                                            */
/* =============================================================== */

.copa-footer {
	text-align: center;
	padding: 30px 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	margin-top: 40px;
	opacity: 0.7;
	font-size: 13px;
}

.copa-footer p { margin: 4px 0; }

/* =============================================================== */
/* Responsive                                                        */
/* =============================================================== */

@media (max-width: 640px) {
	.copa-hero { padding: 40px 16px 50px; }
	.hero-tiers .tier-pill { font-size: 12px; padding: 8px 14px; }
	.hero-bonus { font-size: 12px; padding: 8px 14px; }
	.games-grid { grid-template-columns: 1fr; }
	.my-bet-row { grid-template-columns: 1fr; gap: 6px; }
	.my-bet-status { text-align: left; }
	.result-score { font-size: 14px; }
	.result-score strong { font-size: 18px; }
	.modal-card { padding: 20px; }
}
