* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  min-height: 100vh;
  color: #333333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
  padding: 10px;
  background: linear-gradient(135deg, #4a9b8e 0%, #2d5a56 100%);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(74, 155, 142, 0.3);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  .logo-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    img {
      width: 150px;
    }
  }
}

.header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.category-selector {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 12px 24px;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  color: #495057;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-btn:hover {
  background: #e9ecef;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.category-btn.active {
  background: #ff6b35;
  border-color: #ff6b35;
  color: white;
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.category-content {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

.category-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 20px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 15px;
  color: #495057;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: #e9ecef;
  color: #333;
}

.tab-btn.active {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
  box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: #ffffff;
  border-radius: 15px;
  padding: 25px;
  border: 1px solid #e9ecef;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card h3 {
  color: #ff6b35;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.player-list {
  display: grid;
  gap: 10px;
}

.player {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e9ecef;
}

.player-avatar {
  width: 40px;
  height: 40px;
  background: #202020;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
}

.info-schedule {
  background: #ffffff;
  border-radius: 15px;
  padding: 20px;
  margin-top: 20px;
  border: 1px solid #e9ecef;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);

  .info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    align-items: center;
    border: 1px solid #e9ecef;

    .time {
      font-weight: bold;
      color: #ff6b35;
      span {
        display: inline-block;
        min-width: 3rem;
        font-weight: normal;
      }
    }

    .players {
      text-align: left;
      font-weight: 700;
    }
  }
}

.match-schedule {
  background: #ffffff;
  border-radius: 15px;
  padding: 20px;
  margin-top: 20px;
  border: 1px solid #e9ecef;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.match {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr;
  gap: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 10px;
  align-items: center;
  border: 1px solid #e9ecef;
}

.match-time {
  font-weight: bold;
  color: #ff6b35;
}

.match-players {
  text-align: center;
}

.vs {
  color: #ff6b35;
  font-weight: bold;
  margin: 0 10px;
}

.match-court {
  text-align: center;
  background: rgba(255, 107, 53, 0.2);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.match-status {
  text-align: center;
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 600;
  font-style: italic;
}

.rules-grid {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.rule-card {
  background: #ffffff;
  border-radius: 15px;
  text-align: left;
  border: 1px solid #e9ecef;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 2rem;
  padding: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  border: 1px solid #e9ecef;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sponsors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ff6b35;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 5px;
}

.bracket {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 800px;
  gap: 2rem;

  .bracket-round {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .bracket-round h3 {
    text-align: center;
    color: #4a9b8e;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
  }

  .finals-round{
    padding-right: 1rem;
  }

  .final-match {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
  }

  .final-player {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;

    &:last-child {
      border-bottom: none;
    }

    &.winner {
      /* background-color: #4a9b8e; */
      color: #4a9b8e;
      font-weight: bold;
    }

    &.loser {
      opacity: 0.4;
    }

    .player-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: #4a9b8e;
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 0.8rem;
      margin-right: 0.75rem;
      flex-shrink: 0;
    }

    .player-name {
      flex: 1;
      font-size: 0.9rem;
    }

    .player-score {
      font-weight: 600;
      font-size: 1rem;
      margin-left: 0.5rem;
    }
  }

  .finals-round {
    .final-match {
      background: linear-gradient(135deg, #ff6b35 0%, #ff7f50 100%);
      border-color: #ff6b35;
    }

    .final-player {
      color: white;
      border-bottom-color: rgba(255, 255, 255, 0.2);

      &.winner {
        background: rgba(255, 255, 255, 0.2);
        font-weight: 700;
      }

      .player-avatar {
        background: white;
        color: #ff6b35;
      }
    }
  }

  .champion-trophy {
    text-align: center;
    margin-top: 1rem;
  }

  .trophy-icon {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 0.5rem;
  }

  .champion-text {
    color: #4a9b8e;
    font-weight: 600;
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .header p {
    font-size: 1rem;
  }

  .category-selector {
    gap: 10px;
  }

  .category-btn {
    padding: 10px 18px;
    font-size: 0.9rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .match {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .match-players {
    order: -1;
  }

  .tabs {
    justify-content: center;
  }

  .container {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 20px 15px;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .category-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .card {
    padding: 20px;
    overflow: auto;
  }

  .stat-number {
    font-size: 2rem;
  }

  .bracket {
    min-width: 600px;
    gap: 1rem;
  }

  .bracket-round {
    gap: 1rem;
  }

  .final-player {
    padding: 0.5rem 0.75rem;
    .player-avatar {
      width: 28px;
      height: 28px;
      font-size: 0.7rem;
    }

    .player-name {
      font-size: 0.8rem;
    }
  }
}

@media (max-width: 480px) {
  .bracket {
    min-width: 500px;
  }
}
