:root {
  --bg-dark: #0d0d0d;
  --bg-card: rgba(26, 26, 46, 0.85);
  --accent-red: #d75a5a;
  --accent-gold: #ffd700;
  --accent-silver: #c0c0c0;
  --accent-bronze: #cd7f32;
  --text-main: #f0f0f0;
  --text-dim: #aaa;
  --green: #1f7a4d;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(8px);
  transform: scale(1.04);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  padding: 30px 0 20px;
}

.header .logo img {
  height: 280px;
  width: auto;
  display: inline-block;
  transition: transform 0.3s;
}

.header .logo img:hover {
  transform: scale(1.02);
}

.subtitle {
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.loading-skeleton {
  margin: 20px 0;
}

.skeleton-header {
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 20px;
  width: 200px;
  animation: pulse 1.5s infinite;
}

.skeleton-table {
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 0.7; }
  100% { opacity: 0.4; }
}

.tournaments-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 30px 0 20px;
}

.nav-btn {
  padding: 10px 24px;
  border: 2px solid var(--accent-red);
  border-radius: 40px;
  background: transparent;
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(4px);
}

.nav-btn:hover,
.nav-btn.active {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 0 12px rgba(215, 90, 90, 0.6);
  border-color: transparent;
}

.season {
  margin-bottom: 40px;
  display: none;
  animation: fadeIn 0.3s ease;
}

.season.visible {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.season-header {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--accent-red);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(215, 90, 90, 0.3);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  background: var(--accent-red);
  color: #fff;
  padding: 14px 12px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #a33;
  text-align: center;
}

thead th:first-child {
  text-align: center;
  width: 80px;
}

thead th:nth-child(2) {
  text-align: center;
}

tbody tr {
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  transition: background 0.2s;
}

tbody tr:hover {
  background: rgba(215, 90, 90, 0.1);
}

td {
  padding: 12px 10px;
  text-align: center;
  vertical-align: middle;
}

/* Медали */
.rank-cell {
  font-weight: 800;
  font-size: 16px;
  width: 80px;
  text-align: center;
  vertical-align: middle;
}

.medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 18px;
  background: #2a2a2a;
  color: #fff;
}

.medal-gold {
  background: linear-gradient(135deg, #ffd700, #ffb347);
  color: #1a1a1a;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

.medal-silver {
  background: linear-gradient(135deg, #e0e0e0, #b0b0b0);
  color: #1a1a1a;
}

.medal-bronze {
  background: linear-gradient(135deg, #e09d5e, #b86f2c);
  color: #1a1a1a;
}

/* Игроки по центру */
.player-cell {
  text-align: center !important;
}

.player-name {
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}

.player-number {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  text-align: center;
}

.total-cell {
  color: var(--green);
  font-weight: 800;
  font-size: 16px;
  text-align: center;
}

/* Подсветка лучших в день */
.day-gold {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), transparent);
  font-weight: 700;
  color: #ffd966;
}

.day-silver {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.25), transparent);
  font-weight: 700;
  color: #e0e0e0;
}

.day-bronze {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.25), transparent);
  font-weight: 700;
  color: #f4a460;
}

.date-header {
  color: #ffecb3 !important;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* Адаптив */
@media (max-width: 700px) {
  .container {
    padding: 12px;
  }
  .header .logo img {
    height: 180px;
  }
  .nav-btn {
    padding: 6px 16px;
    font-size: 11px;
  }
  .season-header {
    font-size: 20px;
  }
  td, th {
    padding: 8px 6px;
    font-size: 11px;
  }
  .player-name {
    font-size: 12px;
  }
  .medal {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .total-cell {
    font-size: 13px;
  }
  .rank-cell {
    width: 60px;
  }
}