* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-color: #0a0a0a;
  color: #e5e5e5;

  font-family: "Roboto", sans-serif;

  font-size: 18px;

  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}
.container {
  width: 100%;
  max-width: 900px;
}

.text-error {
  color: #ff5555;
}
.text-info {
  color: #55aaff;
}
.text-green {
  color: #4ade80;
}
.text-red {
  color: #f87171;
}
.text-blue {
  color: #60a5fa;
}
.text-highlight {
  color: #ffffff;
}
.mt-2 {
  margin-top: 8px;
}
.mt-4 {
  margin-top: 16px;
}

.rank-gold {
  color: #ffd700;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}
.rank-silver {
  color: #c0c0c0;
  font-weight: bold;
}
.rank-bronze {
  color: #cd7f32;
  font-weight: bold;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}
.title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 25px;
}
.search-wrapper {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
}
.search-wrapper input {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 16px 20px;
  color: #fff;
  font-size: 1rem;
  outline: none;
}
.search-btn {
  background: transparent;
  border: none;
  padding: 0 24px;
  color: #888;
  cursor: pointer;
}
.search-btn:hover {
  color: #fff;
}
.status-msg {
  margin-top: 15px;
  font-size: 0.9rem;
  min-height: 20px;
}

.hidden {
  display: none !important;
}
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 10px;
}
.tab-btn {
  background: transparent;
  border: none;
  color: #888;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 8px;
}
.tab-btn.active,
.tab-btn:hover {
  color: #fff;
  background: #222;
}
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content.active {
  display: block;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.player-name {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.profile-sub {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.badge {
  background: #2a2a2a;
  color: #fff;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}
.name-gold {
  background: linear-gradient(90deg, #ffd700, #ffaa00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.name-banned {
  color: #ff4b4b !important;
  text-decoration: line-through;
  -webkit-text-fill-color: initial;
}

.xp-wrapper {
  width: 100%;
}
.xp-bar {
  width: 100%;
  height: 12px;
  background: #222;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  border-radius: 6px;
  transition: width 0.5s ease;
  width: 0%;
}
.xp-text {
  font-size: 0.85rem;
  color: #888;
  text-align: right;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.stat-card,
.leaderboard-card,
.chart-container {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 24px;
}
.stat-label {
  display: block;
  color: #888;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.stat-sub {
  color: #888;
  font-size: 0.9rem;
}

.leaderboard-card h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  font-weight: 600;
}
.lb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.lb-col h4 {
  font-size: 0.9rem;
  color: #fff;
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.lb-col p {
  font-size: 0.85rem;
  color: #aaa;
  display: flex;
  justify-content: space-between;
}
.lb-col span {
  color: #fff;
  font-weight: 600;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.chart-container h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-weight: 600;
}
.canvas-wrapper {
  position: relative;
  height: 250px;
  width: 100%;
}
.map-winrates {
  font-size: 0.85rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.map-winrates div {
  background: #1a1a1a;
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
}

.matches-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}
.matches-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
}
.match-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  background: #141414;
  border: 1px solid #2a2a2a;
  color: #888;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: #2a2a2a;
  color: #fff;
  border-color: #444;
}

details {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary:hover {
  background: #1a1a1a;
}
details[open] > summary {
  border-bottom: 1px solid #2a2a2a;
  background: #1a1a1a;
}

.match-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.match-map {
  font-weight: 600;
  font-size: 1.1rem;
}
.match-details {
  color: #888;
  font-size: 0.85rem;
}
.match-stats {
  text-align: right;
}
.match-kd {
  font-weight: 700;
  font-size: 1.1rem;
}
.match-score {
  color: #888;
  font-size: 0.85rem;
}

.match-content {
  padding: 15px;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-row {
  border: 1px solid #222;
  border-radius: 8px;
  background: #111;
  overflow: hidden;
}

.player-summary {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  padding: 18px 20px;
  font-size: 0.95rem;
  align-items: center;
  transition: background 0.2s;
}

.player-summary:hover {
  background: #1a1a1a;
}

.p-name-col {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #fff;
}
.p-stats-col {
  text-align: center;
  color: #aaa;
}
.p-score-col {
  text-align: right;
  font-weight: bold;
  color: #fff;
}

.team-red {
  background: rgba(248, 113, 113, 0.12) !important;
  border: 1px solid rgba(248, 113, 113, 0.25) !important;
}
.team-red .player-summary:hover {
  background: rgba(248, 113, 113, 0.2) !important;
}

.team-blue {
  background: rgba(96, 165, 250, 0.12) !important;
  border: 1px solid rgba(96, 165, 250, 0.25) !important;
}
.team-blue .player-summary:hover {
  background: rgba(96, 165, 250, 0.2) !important;
}

.player-details {
  padding: 15px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: #aaa;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.pd-section h5 {
  color: #fff;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
}
.pd-weapon {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.pd-stat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
