* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #0f0f0f;
  color: #ffffff;
  margin: 0;
  padding: 20px;
}

h1, h2 {
  text-align: center;
  color: #ff4d4d;
}

/* ---------- Cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: #181818;
  border-radius: 12px;
  padding: 14px;
  border: 2px solid #ff3333;
  box-shadow: 0 0 10px rgb(255, 51, 51);
}

.banner {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.card h3 {
  margin: 5px 0;
  color: #ffb3b3;
}

.riot-id {
  font-size: 0.85em;
  color: #aaa;
}

.score {
  margin-top: 10px;
  padding: 6px;
  background: #101010;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
  color: #00ff88;
}

.muted {
  font-size: 0.8em;
  color: #888;
}

/* ---------- Compare ---------- */

.compare-section {
  margin-top: 50px;
  background: #141414;
  padding: 20px;
  border-radius: 12px;
}

.compare-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

select, button {
  padding: 8px;
  border-radius: 6px;
  border: none;
}

button {
  background: #ff4d4d;
  color: white;
  cursor: pointer;
}

button:hover {
  background: #ff1a1a;
}

.compare-card {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.compare-card img {
  width: 48%;
  border-radius: 8px;
}

/* ---------- Table ---------- */

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

th, td {
  padding: 8px;
  border-bottom: 1px solid #333;
  text-align: center;
}

th {
  color: #ff8080;
}

.good-stat {
  color: #00ff88;
  font-weight: bold;
}

.bad-stat {
  color: #ff4d4d;
}

.equal-stat {
  color: #ffff05;
  font-weight: bold;
}

.player-link {
  color: #ff9aa2;       
  text-decoration: none;
  font-weight: 600;
}

.player-link:visited {
  color: #ff9aa2;      
}

.player-link:hover {
  color: #ffd1d4;        
  text-decoration: none;
}
.player-link:active {
  color: #ff7f87;        
}

.controls{
  margin-bottom:20px;
  display:flex;
  justify-content:center;
  gap:10px;
  align-items:center;
}

#sortSelect{
  padding:5px 8px;
  background:#1e1e1e;
  color:white;
  border:1px solid #444;
  border-radius:5px;
}

.toggle {
  position: relative;
  display: block;
  width: 46px;
  height: 24px;
  margin: 0 0 10px auto;
}

.toggle input {
  display: none;
}

.toggle::before {
  content: "Show Differences";
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toggle:hover::before,
.toggle:focus-within::before {
  opacity: 1;
  transform: translateY(0);
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #FFF;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: rgb(35, 145, 188);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.no-changes {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 20px auto;
  max-width: 420px;
  padding: 14px 18px;
  text-align: center;
  color: #f5f5f5;
  font-size: 1.5rem;
  font-weight: bold;
}

.diff-highlight {
  border-radius: 12px;
  padding: 14px;
  border: 2px solid #ffff05;
  box-shadow: 0 0 10px rgb(255, 255, 5);  
}