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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e4e4e4;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  padding: 40px 0;
  border-bottom: 2px solid #2d3748;
  margin-bottom: 40px;
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.subtitle {
  color: #a0aec0;
  font-size: 1rem;
}

.search-section {
  background: #1e293b;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

input[type="text"] {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #2d3748;
  border-radius: 8px;
  background: #0f172a;
  color: #e4e4e4;
  font-size: 1rem;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
}

button {
  padding: 12px 30px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button:active {
  transform: translateY(0);
}

.info-text {
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #1e293b;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border-left: 4px solid #667eea;
}

.stat-label {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #e4e4e4;
}

.recent-matches {
  background: #1e293b;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.recent-matches h2 {
  margin-bottom: 20px;
  color: #e4e4e4;
}

.match-wrapper {
  position: relative;
  margin-bottom: 15px;
}

.match-card {
  background: #0f172a;
  padding: 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.5s, transform 0.5s;
}

.match-card.active {
  background-color: #090620;
}

.match-card:hover {
  background-color: #090620;
}

.match-result {
  display: flex;
  align-items: center;
  gap: 4px;
}

.result-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 4px;
}

.win {
  background: #10b981;
  color: white;
}

.loss {
  background: #ef4444;
  color: white;
}

.hero-image {
  width: 50px;
  height: auto;       
  object-fit: contain;
  display: block;     
}

.info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.hero-name {
  font-weight: 200;
  color: #A9CF54;
  font-size: 15px;
}

.match-time {
  font-size: 12px;
}

.match-result-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.match-stats {
  display: flex;
  gap: 20px;
  color: #94a3b8;
}

.recent-matches-title-container {
  display: flex;
  gap: 10px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.loading-spinner {
  width: 40px;
  height: 40px;
}

.profile-picture-small {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
}

.collapsible {
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 15px;
}

.error {
  background: #7f1d1d;
  color: #fecaca;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}


@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .search-box {
    flex-direction: column;
  }

  .match-card {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
}

.match-recap-table {
    background-color: #090620;
    color: paleturquoise;

    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);

    transition:
        max-height 1s ease,
        opacity 1s ease,
        transform 1s ease;

    border-radius: 0px 0px 8px 8px;
    padding: 0 20px;
}

.match-recap-table.active {
    max-height: fit-content;
    opacity: 1;
    transform: translateY(-8px);
}

.match-recap-table h2 {
  color: #fff;
  margin-bottom: 20px;
}

.match-recap-table table {
  width: 100%;
  border-collapse: collapse;
}

.match-recap-table th,
.match-recap-table td {
  padding: 10px 15px;
  text-align: left;
  font-size: 14px;
}

.match-recap-table th {
  background-color: #2a2a40;
  color: #fff;
}

.match-recap-table tr {
  background-color: #0f172a;
}

.match-recap-table tr:nth-child(even) {
  background-color: #1a1a2e;
}

.match-recap-table tr:hover {
  background-color: #27274d;
}

.match-recap-team-header {
  background-color: #764ba2;
  font-weight: bold;
  text-align: center;
  color: #fff;
}

.match-recap-hero-image {
  width: 40px;
  height: 40px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
}

.match-recap-win {
  color: #10b981;
  font-weight: bold;
}

.match-recap-loss {
  color: #ef4444;
  font-weight: bold;
}

.match-recap-items {
  font-size: 13px;
  color: #c0c0c0;
}

.recap-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.team-separator td {
    background-color: #090620;
    height: 10px;
}