* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 20px;
  padding-top: 50px;
}

.search-card,
.results-card {
  background: var(--dark-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  transition: background 0.3s;
}

.search-card:hover,
.results-card:hover {
  background: var(--dark-card-hover);
}

h1 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  color: var(--white);
}

h2.section-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--white);
}

.detail-meta {
  margin: 0;
  line-height: 1.55;
  color: var(--light-gray);
}

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--lime);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

table a {
  color: var(--lime);
  text-decoration: none;
}

table a:hover {
  text-decoration: underline;
}

input[type="search"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  background: var(--dark-card);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  transition: border-color 0.2s;
}

input[type="search"]:focus {
  outline: none;
  border-color: var(--lime);
}

table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap {
  overflow-x: auto;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
  color: var(--white);
}

td:first-child,
th:first-child {
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

.num-col {
  text-align: right;
  white-space: nowrap;
  width: 64px;
}

.col-group-header {
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--light-gray);
}

.result-cell {
  font-weight: 700;
  text-align: center;
  width: 52px;
}

.result-win {
  background: rgba(202, 255, 4, 0.15);
  color: var(--lime);
  font-weight: 700;
}

.result-win a {
  color: inherit;
}

.result-loss {
  background: rgba(255, 59, 92, 0.15);
  color: var(--red);
  font-weight: 700;
}

.result-loss a {
  color: inherit;
}

.score-line {
  white-space: nowrap;
}

tbody tr:target {
  background: rgba(202, 255, 4, 0.08);
}

th {
  font-size: 0.9rem;
  color: var(--light-gray);
  font-weight: 600;
}

.empty {
  color: var(--gray);
}

.match-list {
  margin: 0;
  padding-left: 18px;
}

.match-list li {
  margin-bottom: 10px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .page {
    padding: 20px 12px;
  }

  th,
  td {
    padding: 8px;
    font-size: 0.92rem;
  }
}
