@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;600;700&family=Permanent+Marker&display=swap');

:root {
  --color-bg: #f3efe0;
  --color-text: #1a1a1a;
  --color-dark: #0f172a;
  --color-accent: #d4af37;
  --color-white: #ffffff;
  --color-gray: #64748b;
  --color-red: #c2410c;
  --color-green: #16a34a;

  --font-main: 'Inter', sans-serif;
  --font-header: 'Bebas Neue', cursive;
  --font-brush: 'Permanent Marker', cursive;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main), 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  background-color: var(--color-white);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
}

#app {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--color-white);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

/* Pts Badges */
.pts-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  color: white;
  margin-left: 0.5rem;
}

.pts-badge.exact {
  background-color: var(--color-green);
}

.pts-badge.winner {
  background-color: var(--color-accent);
  color: #422006;
}

.pts-badge.wrong {
  background-color: var(--color-gray);
}

.pts-badge.pts-potential {
  background-color: #eab308;
  color: #422006;
  animation: pulse-potential 1.2s ease-in-out infinite;
}

@keyframes pulse-potential {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.04); }
}

/* Tab buttons refinement */
.tabs-container {
  display: flex;
  background: #eef2f6;
  padding: 5px;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  gap: 5px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.tab-btn {
  flex: 1;
  padding: 0.8rem 0.4rem;
  border: none;
  background: none;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  letter-spacing: 0.02em;
}

.tab-btn.active {
  background: var(--color-dark);
  color: white !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transform: translateY(-1px);
}

/* Animations */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
  background: var(--color-dark);
  border-radius: 10px;
}

/* Components: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-dark);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-header);
  font-size: 1.25rem;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-brush {
  position: relative;
  background: none;
  color: var(--color-white);
  padding: 0.5rem 2rem;
  z-index: 1;
}

.btn-brush::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-dark);
  clip-path: polygon(2% 10%, 98% 5%, 95% 90%, 5% 95%);
  z-index: -1;
  transform: rotate(-1deg);
}

/* Layout */
.app-header {
  padding: 0.75rem 0;
  background: var(--color-white);
}

.header-logo {
  max-width: 154px;
  height: auto;
  margin-bottom: 0.5rem;
}

.header-title-img {
  width: auto;
  max-height: 120px;
  max-width: 100%;
  margin: 0 auto;
}

.login-hero-logo {
  width: auto;
  max-height: 220px;
  max-width: 100%;
  margin: 1rem auto;
  display: block;
}

/* Login Screen */
.login-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.login-card {
  width: 100%;
  max-width: 350px;
}

.welcome-text {
  font-family: var(--font-brush);
  font-size: 2rem;
  margin: 1.5rem 0 0.5rem;
}

.login-desc {
  color: #444;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-label {
  display: block;
  font-family: var(--font-header);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--color-gray);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
}

.login-footer {
  display: none;
}

/* Tab Navigation (Bottom) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  background: var(--color-bg);
  display: flex;
  justify-content: space-around;
  padding: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  color: var(--color-gray);
  font-size: 0.7rem;
  gap: 0.25rem;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
}

.nav-item.active {
  color: var(--color-text);
}

.nav-icon {
  font-size: 1.5rem;
}

/* Match Views */
.view-container {
  padding: 1rem 1rem 5rem;
}

/* Admin Action Buttons */
.admin-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  color: white;
}

.admin-action-btn svg {
  width: 20px;
  height: 20px;
}

.admin-action-btn:hover {
  transform: translateY(-2px);
}

.admin-action-btn:active {
  transform: scale(0.92);
}

.admin-action-btn-save {
  background: #3b82f6;
  /* Blue 500 */
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.admin-action-btn-save:hover {
  background: #2563eb;
  /* Blue 600 */
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.admin-action-btn-finish {
  background: #10b981;
  /* Emerald 500 */
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.admin-action-btn-finish:hover {
  background: #059669;
  /* Emerald 600 */
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.admin-action-btn-delete {
  background: #f43f5e;
  /* Rose 500 */
  box-shadow: 0 2px 4px rgba(244, 63, 94, 0.2);
}

.admin-action-btn-delete:hover {
  background: #e11d48;
  /* Rose 600 */
  box-shadow: 0 4px 8px rgba(225, 29, 72, 0.3);
}

.section-banner {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 1rem 1.5rem;
  margin: 0.5rem 0 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  clip-path: polygon(0% 0%, 100% 0%, 98% 100%, 2% 100%);
}

.banner-icon {
  font-size: 2rem;
  opacity: 0.9;
}

.banner-title {
  font-family: var(--font-header);
  font-size: 1.5rem;
  line-height: 1.2;
}

.banner-subtitle {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Card Styles */
.card {
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-sm);
}

/* Match Rows */
.match-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.match-time-badge {
  font-family: var(--font-header);
  font-size: 0.95rem;
  color: var(--color-dark);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(15, 23, 42, 0.05);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
}

.match-time {
  font-size: 0.8rem;
  color: var(--color-gray);
  width: 45px;
}

.team-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.team-info.home {
  justify-content: flex-end;
  text-align: right;
}

.team-info.away {
  justify-content: flex-start;
  text-align: left;
}

.team-flag {
  font-size: 1.25rem;
  vertical-align: middle;
}

.team-flag img,
img.team-flag {
  width: 24px;
  height: 18px;
  vertical-align: middle;
  border-radius: 2px;
}

.team-name {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  z-index: 1000;
  cursor: pointer;
  animation: slideDown 0.3s ease;
}

.toast-success {
  background: var(--color-green);
  color: white;
}

.toast-error {
  background: var(--color-red);
  color: white;
}

.toast-close {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-left: auto;
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-100%);
  }

  to {
    transform: translateX(-50%) translateY(0);
  }
}

/* Field Errors */
.field-error {
  display: block;
  font-size: 0.7rem;
  color: var(--color-red);
  margin-top: 0.25rem;
}

.input-error {
  border-color: var(--color-red) !important;
  background: #fff5f5 !important;
}

/* Disabled Button */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary:disabled {
  background: #94a3b8;
  opacity: 1;
}

.w-full {
  width: 100%;
  display: flex;
}

.btn-google {
  background: #fff;
  color: #444;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-main);
  text-transform: none;
  letter-spacing: normal;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s;
}

.btn-google:hover {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.btn-google:active {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
}

.score-box {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.input-score {
  width: 38px;
  height: 38px;
  text-align: center;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  background: white;
  appearance: textfield;
  -moz-appearance: textfield;
  transition: all 0.2s;
  min-width: 0;
}

.input-score:focus {
  outline: none;
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.input-score::-webkit-outer-spin-button,
.input-score::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Stats PREMIUM (Based on image) */
.stats-container {
  background: #f8f6f2;
  /* Light cream background from image */
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stats-row-premium {
  display: flex;
  align-items: stretch;
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-item:last-child {
  border-right: none;
}

.stat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.stat-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-dark);
}

.stat-icon svg {
  width: 100%;
  height: 100%;
}

.stat-label-premium {
  font-family: var(--font-header);
  font-size: 0.75rem;
  color: var(--color-text);
  line-height: 1.1;
  text-transform: uppercase;
  max-width: 80px;
}

.stat-value-premium {
  font-family: var(--font-header);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-dark);
}

.stat-sublabel {
  font-size: 0.6rem;
  color: var(--color-gray);
  margin-top: -0.25rem;
}

/* Round Badges */
.round-badge {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  white-space: nowrap;
}

.round-group {
  background: #dbeafe;
  color: #1e40af;
}

.round-round_32 {
  background: #fef3c7;
  color: #92400e;
}

.round-round_16 {
  background: #e0e7ff;
  color: #3730a3;
}

.round-quarter {
  background: #fce7f3;
  color: #9d174d;
}

.round-semi {
  background: #ede9fe;
  color: #5b21b6;
}

.round-final {
  background: #fef9c3;
  color: #854d0e;
}

/* Match Card States */
.card-open {
  background: #f0fdf4;
  border-color: #86efac !important;
}

.card-closed {
  background: #f5f5f5;
  border-color: #d4d4d4 !important;
  opacity: 0.75;
}

.card-closed .input-score {
  background: #ececec;
  cursor: not-allowed;
}

.card-submitted {
  border-color: #86efac !important;
}

.card-finished {
  background: #fafafa;
  border-color: #d4d4d4 !important;
}

/* Date Group Header */
.date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-dark);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-family: var(--font-header);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.date-header .pts-total {
  font-size: 0.7rem;
  font-family: var(--font-main);
  background: rgba(255,255,255,0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
}

/* Install Button */
.install-btn {
  background: var(--color-green);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: pulse-install 2s infinite;
}

@keyframes pulse-install {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.install-btn:hover {
  background: #15803d;
}

/* Comodin Button */
.comodin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid #d1d5db;
  background: #f9fafb;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.comodin-btn:hover:not(:disabled) {
  border-color: var(--color-green);
  color: var(--color-green);
  background: #f0fdf4;
}

.comodin-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.comodin-btn.comodin-active {
  background: var(--color-green);
  color: white;
  border-color: var(--color-green);
}

/* Admin table-like match rows */
.admin-match-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  min-width: 0;
}

.admin-match-row:last-child {
  border-bottom: none;
}

.admin-match-finished {
  background: #f0fdf4;
  border-radius: 4px;
  padding: 0.5rem 0.25rem;
}

.admin-col-time {
  width: 42px;
  flex: 0 0 42px;
  text-align: center;
  line-height: 1.2;
  min-width: 0;
}

.admin-col-team {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-col-team.home {
  justify-content: flex-end;
}

.admin-col-team.away {
  justify-content: flex-start;
}

.admin-col-score {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0 2px;
}

.admin-col-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.admin-team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  min-width: 0;
}

.admin-team-flag {
  font-size: 1.1rem;
  flex: none;
  width: 22px;
  text-align: center;
}

.admin-team-flag img,
img.admin-team-flag {
  width: 20px;
  height: 15px;
  vertical-align: middle;
  border-radius: 2px;
}

/* Ranking Stats PREMIUM (Unified) */
.ranking-stats-grid {
  display: flex;
  flex-wrap: nowrap;
  /* Force single line */
  gap: 0.35rem;
  /* Reduced gap for compression */
  margin-bottom: 1.25rem;
  overflow-x: auto;
  /* Allow scroll if extreme */
}

.ranking-stat-card {
  flex: 1;
  min-width: 0;
  background: white;
  border: 1.5px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.2s;
}

.ranking-stat-icon-box {
  width: 34px;
  height: 34px;
  flex: none;
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-dark);
}

.ranking-stat-icon-box svg {
  width: 20px;
  height: 20px;
}

.ranking-stat-icon-box.dark {
  background: #111;
  color: white;
}

.ranking-stat-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ranking-stat-label {
  font-family: var(--font-main);
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--color-gray);
  line-height: 1.1;
  margin-bottom: 0.1rem;
  text-transform: uppercase;
  white-space: normal;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.ranking-stat-value {
  font-family: var(--font-header);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1;
}

.ranking-info-msg {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text);
  margin: -0.5rem 0 1.5rem;
  padding: 0 0.25rem;
}

.ranking-info-icon-svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--color-dark);
}

/* Base Stats (Restored for Admin) */
.stats-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.stat-box {
  flex: 1;
  background: white;
  padding: 0.85rem 0.5rem;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
  min-height: 85px;
  gap: 0.35rem;
}

.stat-box:active {
  transform: scale(0.96);
}

.stat-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 100%;
  height: 100%;
}

.stat-label {
  font-family: var(--font-main);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-gray);
  line-height: 1;
  letter-spacing: 0.02em;
}

.stat-value {
  font-family: var(--font-header);
  font-size: 2.2rem;
  color: var(--color-dark);
  font-weight: 700;
  line-height: 0.8;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pts-potential-rank {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  background: #eab308;
  color: #422006;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.3rem;
  animation: pulse-potential 1.2s ease-in-out infinite;
  vertical-align: middle;
  line-height: 1.2;
}

/* =========================================
   RESPONSIVE: Desktop & Tablet
   Mantiene el look mobile-first, expande a panel en pantallas grandes.
   ========================================= */
@media (min-width: 768px) {
  body {
    background:
      radial-gradient(1200px 600px at 10% -10%, rgba(22, 163, 74, 0.08), transparent 60%),
      radial-gradient(900px 500px at 110% 10%, rgba(15, 23, 42, 0.06), transparent 60%),
      #f5f3ec;
    min-height: 100vh;
  }

  #app {
    max-width: 1280px;
    margin: 1.5rem auto;
    min-height: calc(100vh - 3rem);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    background: var(--color-white);
  }

  .app-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: auto 1fr;
    min-height: calc(100vh - 3rem);
    align-items: start;
  }

  .app-header {
    grid-column: 1 / -1;
    padding: 0.9rem 1.5rem;
    background: var(--color-white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .app-main {
    padding: 0 2.5rem 2.5rem;
    overflow-x: hidden;
  }

  /* Sidebar nav en desktop */
  .bottom-nav {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    width: auto;
    max-width: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 1.25rem 0.85rem;
    background: var(--color-white);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    border-top: none;
    box-shadow: none;
    gap: 0.35rem;
    grid-column: 1;
    grid-row: 2;
  }

  .app-main {
    grid-column: 2;
    grid-row: 2;
  }

  .app-main .view-container {
    padding: 0 0 1rem !important;
  }

  .app-main .view-container .section-banner {
    margin: 0 0 1.5rem !important;
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
    font-size: 0.78rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    transition: all 0.2s;
    color: var(--color-gray);
  }

  .nav-item:hover {
    background: rgba(15, 23, 42, 0.04);
    color: var(--color-text);
  }

  .nav-item.active {
    background: var(--color-dark);
    color: var(--color-white);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  }

  .nav-item.active .nav-icon {
    filter: brightness(1.2);
  }

  .nav-icon {
    font-size: 1.15rem;
  }

  /* Contenido: cards en grid suave */
  .view-container {
    padding: 0;
    max-width: 100%;
  }

  .view-container > *:first-child {
    margin-top: 0 !important;
  }

  .section-banner {
    margin: 0 0 1.5rem !important;
  }

  .card {
    padding: 1.1rem 1.25rem;
  }

  .section-banner {
    margin: 0 0 1.5rem;
    padding: 1.1rem 1.5rem;
  }

  .banner-title {
    font-size: 1.75rem;
  }

  /* Stats: 3 columnas ya, pero más holgadas */
  .stats-row,
  .ranking-stats-grid {
    gap: 0.85rem;
  }

  .stat-box,
  .ranking-stat-card {
    padding: 1rem 0.85rem;
  }

  /* Lista de partidos: 1 columna amplia en desktop para que los nombres respiren */
  .date-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
  }

  .date-header {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  /* Cards de partido: nombre completo visible, sin truncamiento */
  .date-section .card {
    margin-bottom: 0;
    overflow: hidden;
    padding: 1rem 1.25rem;
  }

  .team-info {
    min-width: 0;
    gap: 0.6rem;
  }

  .team-info.home {
    text-align: right;
    justify-content: flex-end;
  }

  .team-info.away {
    text-align: left;
    justify-content: flex-start;
  }

  .team-name {
    font-size: 0.95rem;
    white-space: nowrap;
    min-width: 0;
  }

  .match-row {
    gap: 0.75rem;
    padding: 0.5rem 0;
  }

  .score-box {
    flex: 0 0 auto;
  }

  .input-score {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  /* Botón enviar: centrado y con ancho máximo, no estirado al 100% */
  .view-container > .btn-primary.w-full {
    max-width: 520px;
    margin: 1.25rem auto 0;
    width: 100%;
  }

  .view-container > p {
    text-align: center;
  }

  /* Admin: fila más espaciosa */
  .admin-match-row {
    padding: 0.65rem 0.5rem;
    gap: 0.65rem;
  }

  .admin-col-time {
    flex: 0 0 56px;
    width: 56px;
  }

  .admin-team-name {
    font-size: 0.8rem;
  }

  .input-score {
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
  }

  /* Login más elegante en desktop */
  .login-screen {
    padding: 3rem 2rem;
  }

  .login-card {
    max-width: 420px;
  }

  /* Form grid del nuevo partido: 2 columnas reales */
  .admin-add-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .admin-add-grid .full-row {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1200px) {
  #app {
    max-width: 1280px;
  }
}

/* Group standings table responsive */
@media (max-width: 767px) {
  .date-header {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.65rem;
  }
  .date-header .pts-total {
    font-size: 0.6rem;
  }
  .group-standings-table th,
  .group-standings-table td {
    font-size: 0.6rem;
    padding: 0.2rem 0.2rem;
  }
  .group-standings-table td:nth-child(2) {
    font-size: 0.6rem;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* =========================================
   NUEVOS ESTILOS PREMIUM Y RESPONSIVOS
   ========================================= */

/* Tarjetas Premium Mejoradas */
.card {
  background: white;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 768px) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
  }
}

/* Inputs de Marcadores Premium */
.input-score {
  width: 42px;
  height: 42px;
  text-align: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  background: #f8fafc;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-score:focus {
  outline: none;
  border-color: var(--color-green);
  background: white;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.input-score:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

/* Grilla Adaptable de Estadísticas (2x2 en móvil, 1x4 en desktop) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
}

.stat-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  border: 1px solid #eef2f6;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  position: relative;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 8px 8px 0 0;
}

.stat-card.primary::before { background: #f59e0b; }
.stat-card.predicted::before { background: #64748b; }
.stat-card.exact::before { background: var(--color-green); }
.stat-card.result::before { background: #ca8a04; }
.stat-card.wrong::before { background: #ef4444; }
.stat-card.none::before { background: #94a3b8; }

.stat-card-value {
  font-family: var(--font-header);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-dark);
  margin-top: 0.15rem;
}

.stat-card-footer {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.stat-card-label {
  font-size: 0.55rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card-pct {
  font-size: 0.55rem;
  font-weight: 700;
}

.stat-card-pct.exact { color: var(--color-green); }
.stat-card-pct.result { color: #ca8a04; }
.stat-card-pct.wrong { color: #ef4444; }
.stat-card-pct.none { color: #94a3b8; }

/* Fade transition for stats collapse */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s ease;
}
.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.toast-notification {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  border: 1px solid #166534;
}

.toast-enter-active {
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast-leave-active {
  transition: all 0.25s ease;
}
.toast-enter-from {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}
.toast-leave-to {
  opacity: 0;
  transform: translateX(20px);
}

@keyframes comodinPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.9);
    transform: scale(1.03);
  }
}

@keyframes comodinSpin {
  0%   { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}
