/* =========================
   VARIABLES
========================= */
:root {
  --usa-blue: #1e3a8a;
  --canada-red: #c1121f;
  --mexico-green: #2e7d32;
  --dark: #0f172a;
  --gray: #64748b;
  --white: #ffffff;
}

/* =========================
   RESET / BASE
========================= */
* {
  box-sizing: border-box;
  font-family: system-ui, Arial, sans-serif;
}

body {
  margin: 0;
  background: linear-gradient(
    135deg,
    #7c3aed,
    #2563eb,
    #16a34a,
    #facc15
  );
  background-attachment: fixed;
}

/* =========================
   HEADER
========================= */
.app-header {
  width: 100%;
  background: var(--dark);
  color: white;
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header .logo {
  font-size: 20px;
  font-weight: 700;
}

.app-header .logo span {
  color: var(--mexico-green);
}

.app-header .user-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-email {
  font-size: 14px;
  color: #cbd5f5;
}

.logout-btn {
  padding: 8px 14px;
  background: var(--canada-red);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

/* =========================
   CONTENEDOR
========================= */
.page-container {
  padding: 30px;
  max-width: 1000px;
  margin: auto;
  animation: fadeSlideIn 0.6s ease-out;
}

.page-container > h1 {
  color: white;
  font-size: 34px;
  margin-bottom: 5px;
}

.page-container > p {
  color: #e5e7eb;
  margin-bottom: 25px;
}

/* =========================
   CARDS
========================= */
.card {
  background: white;
  padding: 25px;
  border-radius: 16px;
  margin-top: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.35);
}

/* =========================
   FIXTURE / PARTIDOS
========================= */
.match-row {
  display: grid;
  grid-template-columns:
    auto 50px
    40px
    50px auto
    140px
    90px;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.match-row:last-child {
  border-bottom: none;
}

.team {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.team img {
  width: 20px;
  border-radius: 2px;
}

.team-local {
  justify-content: flex-end;
  text-align: right;
}

.team-visitante {
  justify-content: flex-start;
  text-align: left;
}

.score-input {
  width: 45px;
  padding: 4px;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #cbd5f5;
}

.vs {
  text-align: center;
  font-weight: 700;
  color: #2563eb;
}

.match-date {
  text-align: right;
  color: #475569;
  font-size: 13px;
}

.save-btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  background: #2563eb;
  color: white;
  font-size: 12px;
  cursor: pointer;
}

.save-btn:hover {
  background: #1e40af;
}

/* =========================
   LOGIN
========================= */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   PELOTAS FLOTANTES
========================= */
.floating-balls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.floating-balls span {
  position: absolute;
  font-size: 32px;
  opacity: 0.15;
  animation: floatBall 18s linear infinite;
}

.floating-balls span:nth-child(1) { left: 10%; animation-delay: 0s; }
.floating-balls span:nth-child(2) { left: 35%; animation-delay: 4s; }
.floating-balls span:nth-child(3) { left: 60%; animation-delay: 8s; }
.floating-balls span:nth-child(4) { left: 85%; animation-delay: 12s; }

@keyframes floatBall {
  from { transform: translateY(110vh) rotate(0deg); }
  to   { transform: translateY(-120px) rotate(360deg); }
}

/* =========================
   ANIMACIONES
========================= */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.match-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 12px;
  color: #475569;
}

.group-tag {
  background: #e0e7ff;
  color: #1e3a8a;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 4px;
}
.group-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.group-card li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
}

.group-card img {
  width: 20px;
  border-radius: 2px;
}
/* =========================
   GRUPOS – GRILLA 4x3
========================= */

.groups-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.group-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.group-card h3 {
  font-size: 14px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
  border-bottom: 2px solid #2563eb;
  padding-bottom: 6px;
}

.group-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.group-card li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 6px;
}

/* Responsive */
@media (max-width: 1024px) {
  .groups-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .groups-grid {
    grid-template-columns: 1fr;
  }
}
``
.locked-msg {
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
}

.match-row input:disabled {
  background: #f1f5f9;
  cursor: not-allowed;
}

.match-row input:disabled ~ .locked-msg {
  display: inline;
}

.match-row input:disabled ~ .save-btn {
  display: none;
}