/* RESET */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #202124;
}

/* CENTER LAYOUT */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding-top: 15vh;
}

/* LOGO STYLE TITLE */
h1 {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -1px;
  margin-bottom: 30px;
}

/* SEARCH AREA */
.search-box {
  width: 100%;
  max-width: 580px;
  position: relative;
}

/* INPUT */
input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid #dfe1e5;
  font-size: 16px;
  outline: none;
  transition: all 0.2s ease;
}

/* HOVER LIKE GOOGLE */
input:hover {
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.2);
}

/* FOCUS STATE */
input:focus {
  border-color: transparent;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.3);
}

/* DROPDOWN */
.dropdown {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: none;
  text-align: left;
}

/* ITEMS */
.dropdown-item {
  padding: 12px 16px;
  font-size: 15px;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #f1f3f4;
}

/* MATCH CARD */
.result-card {
  margin-top: 40px;
  padding: 24px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.2);
  width: 100%;
  max-width: 580px;
  text-align: left;
}

/* TEXT */
.result-card h2 {
  margin-top: 0;
  font-size: 20px;
}

.result-card p {
  margin: 8px 0;
  font-size: 14px;
}

/* SUBTEXT */
small {
  color: #5f6368;
  margin-left: 6px;
}

#match {
  margin-top: 20px;
  padding: 10px 20px;
  border-radius: 8px;
}

/* only apply when needed */
.match-error {
  background-color: rgb(255, 188, 188);
  border: 1px solid red;
}

.dropdown-item span {
  display: flex;
  align-items: center;
  gap: 6px;
}








/* Returned Matches Card Styles */
/* =========================
   MAIN CONTAINER
========================= */
.match-row {
  background: white;
  border-radius: 16px;

  width: 50vw;
  min-width: 800px;
  max-width: 1200px;

  margin: 40px auto;
  padding: 30px 40px;

  box-shadow: 0 6px 30px rgba(0,0,0,0.08);
}

/* =========================
   TOP SECTION
========================= */
.match-top {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.map-thumb {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.match-text {
  display: flex;
  flex-direction: column;
}

.map-name {
  font-size: 20px;
  font-weight: 600;
}

.match-mode {
  font-size: 14px;
  color: #666;
}

/* =========================
   PLAYERS ROW
========================= */
.players-row {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  position: relative;
}

/* OPTIONAL divider */
.players-row::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #eee;
}

/* =========================
   PLAYER COLUMN
========================= */
.player-col {
  flex: 1;
}

.player-col.right {
  text-align: right;
}

/* =========================
   NAME + FLAG
========================= */
.player-name {
  font-weight: 600;
  margin-bottom: 12px;
}

.name-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap; /* 🔥 fixes flag issue */
}

/* =========================
   STATS GRID (KEY PART)
========================= */
.player-stats {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 20px;
  row-gap: 6px;
  font-size: 15px;
}

/* LEFT */
.player-col.left .player-stats {
  justify-content: start;
}

/* RIGHT (mirrored perfectly) */
.player-col.right .player-stats {
  justify-content: end;
  text-align: right;
}

/* LABEL */
.player-stats span {
  color: #666;
}

/* VALUE */
.player-stats strong {
  color: #1a73e8;
  font-weight: 600;
}

.player-block {
  margin-bottom: 14px;
}

/* BASE STYLE */
/* container must be relative */
.players-row {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  position: relative;
}

/* wrapper sits dead center */
.avg-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  display: flex;
  gap: 40px;
}

/* 🔥 SHIFT UP FOR 1v1 */
.avg-wrapper.is-1v1 {
  top: 0%;
}

/* avg boxes */
.team-avg {
  padding: 10px 16px;
  border-radius: 12px;

  background: #f8f9fb;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);

  font-size: 14px;
  font-weight: 500;
}

/* value styling */
.team-avg strong {
  font-size: 18px;
  font-weight: 700;
  color: #1a73e8;
}

/* POSITIONING */
.player-col.left .team-avg {
  float: right;          /* 🔥 pushes it toward center */
  text-align: right;
}

.player-col.right .team-avg {
  float: left;           /* 🔥 pushes it toward center */
  text-align: left;
}

.player-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.player-content {
  flex: 1;
}

.civ-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}




.last-matches-table {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.match-row-head,
.match-row-body {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  text-align: center;
}

.match-row-head span {
  color: #888;
  font-size: 11px;
}

.match-row-body span {
  font-size: 16px;
  font-weight: bold;
}

/* colors */
.match-row-body .win {
  color: #22c55e;
}

.match-row-body .loss {
  color: #ef4444;
}

.match-row-body .unknown {
  color: #aaa;
}
