* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: #f3f5fa;
  color: #1f2937;
}

.eqsy-highscore-widget {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 16px;
}

.eqsy-highscore-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 20px;
}

.eqsy-kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2f6feb;
}

.eqsy-highscore-header h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
  line-height: 1.15;
  color: #1f2a44;
}

.eqsy-highscore-header p {
  margin: 0;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.55;
}

.eqsy-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.eqsy-tab {
  border: 1px solid #d6dce8;
  background: #ffffff;
  color: #3f4b62;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.eqsy-tab:hover {
  transform: translateY(-1px);
}

.eqsy-tab.active {
  background: #2f6feb;
  color: #ffffff;
  border-color: #2f6feb;
}

.eqsy-highscore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.eqsy-score-card {
  background: #ffffff;
  border: 1px solid #dee4ef;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(21, 34, 58, 0.05);
}

.eqsy-score-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.eqsy-score-card h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: #1f2a44;
}

.eqsy-game-type {
  font-size: 0.68rem;
  font-weight: 700;
  color: #2f6feb;
  background: #edf3ff;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.eqsy-score-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.eqsy-score-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f8;
}

.eqsy-score-row:last-child {
  border-bottom: 0;
}

.eqsy-rank {
  font-weight: 700;
  color: #1f2a44;
}

.eqsy-player {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #374151;
}

.eqsy-score {
  font-weight: 700;
  color: #1f2a44;
}

.eqsy-empty,
.eqsy-error,
.eqsy-loading {
  text-align: center;
  color: #6b7280;
  grid-column: 1 / -1;
  padding: 20px;
}

.eqsy-card-empty {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 16px;
}

.eqsy-play-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
  background: #2f6feb;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 12px;
  border-radius: 10px;
  transition: 0.2s ease;
}

.eqsy-play-link:hover {
  transform: translateY(-1px);
  background: #245fcb;
}

@media (max-width: 600px) {
  .eqsy-highscore-widget {
    padding: 24px 12px;
  }

  .eqsy-score-card {
    padding: 16px;
  }
}