/* ============================================
   TENNIS STATS APP - ESTILOS PRINCIPALES
   Diseño mobile-first premium con glassmorphism
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

/* ============================================
   VARIABLES Y RESET
   ============================================ */
/* Ranking Interactivity */
.ranking-table tbody tr {
  cursor: pointer;
  transition: background-color 0.2s;
}

.ranking-table tbody tr:hover {
  background-color: rgba(46, 204, 113, 0.1);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--color-bg-card);
  margin: 5% auto;
  padding: 0;
  border: 1px solid var(--color-border);
  width: 90%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: modalScale 0.3s ease-out;
}

@keyframes modalScale {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--color-primary);
}

.close-modal {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: white;
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-stat-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.modal-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.modal-stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.details-section {
  margin-top: 2rem;
}

.details-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.mini-list-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-list-item:last-child {
  border-bottom: none;
}

.mini-list-label {
  font-weight: 600;
}

.mini-list-value {
  color: var(--color-primary);
}

:root {
  /* Colores principales */
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-primary-light: #60A5FA;

  /* Colores de fondo */
  --color-bg-dark: #0F172A;
  --color-bg-card: rgba(30, 41, 59, 0.7);
  --color-bg-card-hover: rgba(30, 41, 59, 0.9);

  /* Colores de texto */
  --color-text-primary: #F8FAFC;
  --color-text-secondary: #CBD5E1;
  --color-text-muted: #94A3B8;

  /* Colores de UI */
  --color-border: rgba(255, 255, 255, 0.1);
  --color-error: #EF4444;
  --color-success: #10B981;
  --color-warning: #F59E0B;

  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #2563EB 0%, #60A5FA 100%);
  --gradient-bg: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(46, 204, 113, 0.3);

  /* Espaciado */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Bordes */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   UTILIDADES GENERALES
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: var(--spacing-xs);
}

.mb-2 {
  margin-bottom: var(--spacing-sm);
}

.mb-3 {
  margin-bottom: var(--spacing-md);
}

.mb-4 {
  margin-bottom: var(--spacing-lg);
}

.mt-1 {
  margin-top: var(--spacing-xs);
}

.mt-2 {
  margin-top: var(--spacing-sm);
}

.mt-3 {
  margin-top: var(--spacing-md);
}

.mt-4 {
  margin-top: var(--spacing-lg);
}

/* ============================================
   HEADER
   ============================================ */
.header {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  font-size: 2rem;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  min-height: 48px;
  /* Touch-friendly */
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-primary);
}

.btn-danger {
  background: var(--color-error);
  color: white;
}

.btn-danger:hover {
  background: #DC2626;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  min-height: 40px;
}

.btn-action {
  padding: 0;
  min-height: 0 !important;
  height: 28px;
  width: 28px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-action-edit {
  background: #145A32;
  /* Dark Green */
  color: #2ECC71;
  border: 1px solid #1E8449;
}

.btn-action-edit:hover {
  background: #117864;
  color: white;
}

.btn-action-danger {
  background: #7B241C;
  /* Dark Red */
  color: #F1948A;
  border: 1px solid #C0392B;
}

.btn-action-danger:hover {
  background: #943126;
  color: white;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--color-border);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.card-body {
  color: var(--color-text-secondary);
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 0.95rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text-primary);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  min-height: 48px;
  /* Touch-friendly */
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
  padding: var(--spacing-lg) 0;
  min-height: calc(100vh - 100px);
}

.section {
  margin-bottom: var(--spacing-xl);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   RANKING TABLE
   ============================================ */
.ranking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 var(--spacing-xs);
}

.ranking-table thead {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ranking-table th {
  padding: var(--spacing-sm);
  text-align: left;
  background: transparent;
}

.ranking-table tbody tr {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.ranking-table tbody tr:hover {
  transform: translateX(4px);
  background: var(--color-bg-card-hover);
  box-shadow: var(--shadow-md);
}

.ranking-table td {
  padding: var(--spacing-md);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.ranking-table td:first-child {
  border-left: 1px solid var(--color-border);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.ranking-table td:last-child {
  border-right: 1px solid var(--color-border);
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1.125rem;
}

.player-name {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 1.05rem;
}

.effectiveness {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-primary);
}

/* ============================================
   MATCH CARD
   ============================================ */
.match-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.match-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.match-date {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xs);
}

.match-teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.team {
  flex: 1;
}

.team.winner {
  font-weight: 700;
  color: var(--color-primary);
}

.team-players {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.vs-separator {
  margin: 0 var(--spacing-sm);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.match-score {
  display: flex;
  gap: var(--spacing-xs);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.score-set {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--spacing-md);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.login-title {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-xs);
}

.login-subtitle {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

/* ============================================
   ADMIN SECTIONS
   ============================================ */
.admin-nav {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  overflow-x: auto;
  padding-bottom: var(--spacing-xs);
}

.admin-nav .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   PLAYER LIST
   ============================================ */
.player-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.player-item {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.player-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.player-info {
  font-weight: 600;
  color: var(--color-text-primary);
}

.club-item {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  margin-bottom: var(--spacing-xs);
}

.club-item:hover {
  border-color: var(--color-primary);
  background: var(--color-bg-card-hover);
}

.club-list {
  margin-top: var(--spacing-md);
}

/* ============================================
   STATS DISPLAY
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.stat-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  font-weight: 500;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--color-error);
  color: #FCA5A5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--color-success);
  color: #6EE7B7;
}

/* Ranking Info Banner */
.ranking-info-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.5s ease;
}

.ranking-info-banner p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin: 0;
  font-weight: 500;
}

.info-icon {
  font-size: 1.25rem;
  filter: drop-shadow(0 0 5px rgba(46, 204, 113, 0.5));
}

/* Panel Admin Navigation */
.admin-nav {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  white-space: nowrap;
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Match Form Specific Styles */
.match-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.team-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  border-width: 1px;
  border-style: solid;
}

.team-card.team-1 {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.3);
}

.team-card.team-2 {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.results-grid-container {
  background: var(--color-bg-card);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.sets-flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.set-column {
  flex: 1;
  min-width: 140px;
}

.set-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.set-label.primary {
  color: var(--color-primary);
}

.score-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.score-input {
  width: 65px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.6rem;
}

.team1-score {
  border-color: rgba(46, 204, 113, 0.5) !important;
  color: #2ECC71 !important;
}

.team2-score {
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #EF4444 !important;
}

.score-dash {
  color: var(--color-text-muted);
  font-weight: 700;
}

@media (max-width: 600px) {
  .match-form-grid {
    grid-template-columns: 1fr;
  }

  .sets-flex-container {
    flex-direction: column;
  }

  .set-column {
    width: 100%;
  }
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  color: var(--color-text-muted);
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.3;
}

.empty-state-text {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-sm);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.5rem;
  }

  .ranking-table {
    font-size: 0.875rem;
  }

  .ranking-table th,
  .ranking-table td {
    padding: var(--spacing-xs);
  }

  .rank-number {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .header {
    padding: var(--spacing-sm) 0;
  }

  .logo {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1.375rem;
  }

  .btn {
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
  }

  .card {
    padding: var(--spacing-sm);
  }

  .player-list {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* Ocultar columnas menos importantes en móvil */
  .ranking-table .hide-mobile {
    display: none;
  }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .login-container {
    padding: var(--spacing-sm);
  }

  .login-card {
    padding: var(--spacing-md);
  }
}

/* Historial de Partidos en Modal */
.match-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
  margin-top: 1rem;
}

.history-card {
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s ease;
}

.history-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.history-card.win {
  border-left-color: var(--color-success);
  background: linear-gradient(90deg, rgba(46, 204, 113, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.history-card.loss {
  border-left-color: var(--color-error);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.history-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.history-result {
  font-weight: 800;
}

.history-result.win {
  color: var(--color-success);
}

.history-result.loss {
  color: #F87171;
}

.history-players {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text-primary);
}

.history-score {
  font-family: 'Monaco', 'Consolas', monospace;
  font-weight: 700;
  color: var(--color-text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  align-self: flex-start;
  font-size: 0.9rem;
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}

/* Scrollbar para la lista */
.match-history-list::-webkit-scrollbar {
  width: 6px;
}

.match-history-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.match-history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}