/* ============================================================
   Design System — Guarita Dortmund x Athletic Molhes
   Cores da marca: navy #030943 | dourado #d4a574
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --navy: #030943;
  --navy-2: #0a1a6b;
  --navy-3: #101f8a;
  --gold: #d4a574;
  --gold-2: #e8c9a0;
  --ink: #0f172a;
  --muted: #64748b;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(212, 165, 116, 0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(3, 9, 67, 0.07), transparent 55%),
    #eef1f6;
  color: var(--ink);
}

/* ---------- Header hero ---------- */
.hero-header {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1000px 340px at 50% -120px, rgba(212, 165, 116, 0.30), transparent 65%),
    linear-gradient(135deg, #01041f 0%, var(--navy) 45%, var(--navy-2) 100%);
  box-shadow: 0 18px 40px -18px rgba(3, 9, 67, 0.55);
}
.hero-header::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: repeating-linear-gradient(115deg, #ffffff 0 2px, transparent 2px 110px);
}
.hero-header::after {
  /* círculo central de campo, decorativo */
  content: '';
  position: absolute;
  left: 50%;
  bottom: -140px;
  width: 280px;
  height: 280px;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.10);
  border-radius: 9999px;
  pointer-events: none;
}

.crest-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.10);
  border: 2px solid rgba(212, 165, 116, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(4px);
}

.vs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border-radius: 9999px;
  box-shadow: 0 6px 18px rgba(212, 165, 116, 0.45);
}

.hero-title {
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-sub {
  color: rgba(232, 201, 160, 0.95);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid #e7ecf4;
  border-radius: 1.25rem;
  box-shadow: 0 12px 32px -14px rgba(2, 6, 23, 0.14);
}

.card-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--navy-3));
  box-shadow: 0 8px 18px -6px rgba(3, 9, 67, 0.5);
  flex: none;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.45);
  flex: none;
}

/* ---------- Navegação por abas (stats) ---------- */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid #e7ecf4;
  border-radius: 9999px;
  box-shadow: 0 12px 30px -14px rgba(2, 6, 23, 0.18);
}

.tab-btn {
  padding: 0.6rem 1.15rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #475569;
  background: transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.tab-btn:hover { background: #e9edf5; color: var(--navy); }
.tab-btn-active {
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  box-shadow: 0 8px 20px -6px rgba(3, 9, 67, 0.55);
}
.tab-btn-active:hover { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }

.tab-refresh {
  padding: 0.6rem 1.15rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 8px 20px -8px rgba(5, 150, 105, 0.6);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.tab-refresh:hover { filter: brightness(1.08); }
.tab-refresh:disabled { opacity: 0.7; cursor: wait; }

/* ---------- Placar geral (head-to-head) ---------- */
.h2h-panel {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  color: #fff;
  background:
    radial-gradient(700px 260px at 50% -80px, rgba(212, 165, 116, 0.28), transparent 60%),
    linear-gradient(135deg, #01041f 0%, var(--navy) 50%, var(--navy-2) 100%);
  border: 1px solid rgba(212, 165, 116, 0.25);
  box-shadow: 0 20px 45px -18px rgba(3, 9, 67, 0.6);
}
.h2h-num {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 900;
  line-height: 1;
}
.h2h-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.75);
  font-weight: 600;
}

.form-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 9999px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.form-dot-guarita { background: linear-gradient(135deg, var(--gold), #b98a5a); color: #1d1103; }
.form-dot-athletic { background: linear-gradient(135deg, #2e3fd4, var(--navy-3)); }
.form-dot-draw { background: #64748b; }

/* ---------- Pódio ---------- */
.podium-wrap { display: flex; align-items: flex-end; justify-content: center; gap: 0.75rem; }

.podium-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  max-width: 12rem;
  text-align: center;
  border-radius: 1.25rem 1.25rem 0.75rem 0.75rem;
  padding: 1.25rem 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e7ecf4;
  box-shadow: 0 14px 34px -16px rgba(2, 6, 23, 0.22);
}
.podium-1 {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
  background: linear-gradient(180deg, #fffdf7 0%, #fdf3e3 100%);
  border-color: rgba(212, 165, 116, 0.6);
  box-shadow: 0 22px 44px -18px rgba(212, 165, 116, 0.55);
  z-index: 1;
}
.podium-2 { background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%); }
.podium-3 { background: linear-gradient(180deg, #ffffff 0%, #fbeee2 100%); }

.podium-medal {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
.podium-medal-1 { background: linear-gradient(135deg, #f6c453, #d99a1f); }
.podium-medal-2 { background: linear-gradient(135deg, #b6c2d1, #8494a7); }
.podium-medal-3 { background: linear-gradient(135deg, #d99a6c, #a9642f); }

.podium-photo {
  border-radius: 9999px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.25);
}

.podium-name {
  overflow-wrap: break-word;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ---------- Cards de jogador ---------- */
.p-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7ecf4;
  border-radius: 1.15rem;
  padding: 1rem;
  box-shadow: 0 10px 26px -14px rgba(2, 6, 23, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.p-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px -14px rgba(3, 9, 67, 0.28);
}
.p-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
}
.p-card-unranked::before { background: #cbd5e1; }

.pos-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  box-shadow: 0 5px 12px rgba(3, 9, 67, 0.35);
}
.pos-badge-1 { background: linear-gradient(135deg, #f6c453, #d99a1f); color: #3b2503; }
.pos-badge-2 { background: linear-gradient(135deg, #c2cede, #8494a7); color: #1e293b; }
.pos-badge-3 { background: linear-gradient(135deg, #d99a6c, #a9642f); }
.pos-badge-gray { background: #94a3b8; }

.p-photo {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 3px solid #fff;
  outline: 2px solid rgba(212, 165, 116, 0.55);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.2);
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.4rem 0.2rem;
  border-radius: 0.7rem;
  line-height: 1.1;
}
.stat-chip .v { font-weight: 800; font-size: 0.95rem; }
.stat-chip .k { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Nota do jogador (estrelas, área admin) ---------- */
.star-rating { display: flex; gap: 0.3rem; }
.star-rating-icon {
  color: #d1d5db;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}
.star-rating-icon:hover { transform: scale(1.15); }
.star-rating-icon.is-filled { color: var(--gold); }

.rate-bar {
  height: 0.5rem;
  border-radius: 9999px;
  background: #edf1f7;
  overflow: hidden;
}
.rate-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--navy), var(--navy-3) 45%, var(--gold));
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Histórico de jogos ---------- */
.game-card {
  background: #fff;
  border: 1px solid #e7ecf4;
  border-radius: 1.15rem;
  padding: 1.25rem;
  margin: 0.85rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 26px -14px rgba(2, 6, 23, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--navy), var(--gold));
}
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -16px rgba(3, 9, 67, 0.28);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.4); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  box-shadow: 0 10px 24px -8px rgba(3, 9, 67, 0.55);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.18); transform: translateY(-1px); }

.btn-gold {
  color: #2a1a05;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 24px -8px rgba(212, 165, 116, 0.6);
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }

.btn-green {
  color: #fff;
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 10px 24px -8px rgba(5, 150, 105, 0.55);
}
.btn-green:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }

.btn-blue {
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  box-shadow: 0 10px 24px -8px rgba(29, 78, 216, 0.55);
}
.btn-blue:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }

.btn-purple {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 10px 24px -8px rgba(124, 58, 237, 0.55);
}
.btn-purple:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  box-shadow: 0 10px 24px -8px rgba(185, 28, 28, 0.5);
}
.btn-danger:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }

.btn-soft {
  color: #475569;
  background: #eef2f7;
  border: 1px solid #e2e8f0;
}
.btn-soft:hover:not(:disabled) { background: #e2e8f0; color: var(--navy); }

/* ---------- Inputs ---------- */
.input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 0.85rem;
  border: 1.5px solid #dbe2ec;
  background: #fbfcfe;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.18);
  background: #fff;
}

/* ---------- Animações ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.12s; }
.fade-up-3 { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up, .fade-up-1, .fade-up-2, .fade-up-3 { animation: none; }
  .p-card, .game-card, .btn { transition: none; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #eef1f6; }
::-webkit-scrollbar-thumb {
  background: #c6cfdd;
  border-radius: 9999px;
  border: 2px solid #eef1f6;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ---------- Ajustes mobile ---------- */
@media (max-width: 640px) {
  .game-card { padding: 0.9rem; }
  .podium-wrap { gap: 0.4rem; }
  .podium-card { padding: 1rem 0.4rem 0.75rem; }
  .podium-1 { padding-top: 1.4rem; padding-bottom: 1.2rem; }
}
