:root {
  --primary-color: #4e79ff;
  --secondary-color: #ff5c5c;
  --bg-color: #f5f6fa;
  --text-color: #333;
  --card-bg: #fff;
  --card-border: #e2e8f0;
  --table-header-bg: #f0f2f6;
}

body.dark-mode {
  --primary-color: #8ea2ff;
  --secondary-color: #ff8484;
  --bg-color: #1a1b1f;
  --text-color: #f1f1f1;
  --card-bg: #282a30;
  --card-border: #41444d;
  --table-header-bg: #35373c;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding-bottom: 40px;
}

.navbar {
  background-color: var(--primary-color) !important;
}

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

.btn-primary:hover {
  background-color: #385cd9;
  border-color: #385cd9;
}

.card {
  background-color: var(--card-bg);
  border-color: var(--card-border);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.table {
  background-color: var(--card-bg);
  color: var(--text-color);
}

/* smooth transition for table rows */
.table tbody tr {
  transition: background-color 0.3s ease;
}

.table thead {
  background-color: var(--table-header-bg);
}

/* Dark mode adjustments for Bootstrap components */
body.dark-mode .navbar {
  background-color: var(--primary-color) !important;
}

body.dark-mode .table thead {
  background-color: var(--table-header-bg);
}

.player-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.hero {
  background-image: url("placeholder.svg");
  background-size: cover;
  background-position: center;
  min-height: 40vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero > .text-center {
  position: relative;
  z-index: 1;
}

@media (max-width: 575.98px) {
  .hero {
    min-height: 200px;
  }
}

.results-table tbody tr:nth-child(even) {
  background-color: var(--table-header-bg);
}

.results-table .vs-col {
  color: var(--secondary-color);
  font-weight: 600;
}

/* color coding for match results */
.table-success {
  background-color: #d4edda;
}

.table-danger {
  background-color: #f8d7da;
}

.table-secondary {
  background-color: #e2e3e5;
}

/* hover effect for tables */
.table-hover tbody tr:hover {
  background-color: rgba(0,0,0,0.1);
}

body.dark-mode .table-hover tbody tr:hover {
  background-color: rgba(255,255,255,0.1);
}

/* fila clickeable */
.clickable-row {
  cursor: pointer;
}

/* active state feedback */
.clickable-row.active {
  background-color: rgba(0,0,0,0.1);
}

body.dark-mode .clickable-row.active {
  background-color: rgba(255,255,255,0.1);
}

/* marcador de partidos */
.scoreboard {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.scoreboard .team-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.scoreboard .team-score {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0 0.25rem;
}

/* resumen de partido */
.match-summary {
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* timeline for match events */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--card-border);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.timeline-item.home {
  text-align: left;
}

.timeline-item.away {
  text-align: right;
  margin-left: 50%;
}

.timeline-item::before {
  content: "\26BD"; /* soccer ball */
  position: absolute;
  top: 0.6rem;
  font-size: 1rem;
}

.timeline-item.home::before {
  right: -0.8rem;
}

.timeline-item.away::before {
  left: -0.8rem;
}

/* placeholder for future event types */

.timeline-item.booking::before {
  content: "";
  width: 0.6rem;
  height: 0.8rem;
  display: inline-block;
  border-radius: 2px;
}

.timeline-item.booking-yellow::before {
  background: #ffeb3b;
}

.timeline-item.booking-red::before {
  background: #ff5252;
}

.timeline-item.substitution::before {
  content: "\21C6"; /* horizontal arrows */
}

.highlight-team {
  color: #1a73e8;
  font-weight: 800;
  padding: 2px 6px;
  background-color: #e8f0fe;
  border-radius: 4px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* game day planner */
.soccer-field {
  background: url('img/Soccer_Field_Transparant.svg') center/contain no-repeat;
  width: 100%;
  height: 600px;
  border: 2px solid var(--card-border);
  border-radius: 8px;
}

.player-badge {
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background-color: var(--primary-color);
  color: #fff;
  cursor: move;
}

@media (max-width: 767.98px) {
  .soccer-field {
    height: 400px;
  }
}
