/* Защита от горизонтального скролла */
html, body { 
  overflow-x: hidden; 
  max-width: 100vw; 
}

/* Адаптация под светлую тему */
.bg-dark {
  background: #8863c4 !important;
  color: var(--light) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-dark:nth-child(2n) {
  background: #708dd5 !important;
}

.bg-dark:nth-child(3n) {
  background: #a867c3 !important;
}

.bg-dark:nth-child(4n) {
  background: #3a77e1 !important;
}

.bg-light {
  background-color: var(--light) !important;
  color: var(--dark) !important;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.bg-light,
.bg-light *,
.bg-light .card-title,
.bg-light .card-text,
.bg-light p,
.bg-light h3,
.bg-light h4,
.bg-light li {
  color: #000000 !important;
}

.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.tournament-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #fd8b0f;
  color: white;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.prize-amount {
  font-size: 2.5rem;
  font-weight: 700;
  background: #fd8b0f;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 1rem 0;
}

.tournament-feature {
  padding: 1.5rem;
  border-left: 4px solid #fd8b0f;
  background: rgba(253, 139, 15, 0.05);
  margin-bottom: 1.5rem;
  border-radius: 8px;
}

.table-responsive {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.table {
  color: var(--text);
  margin-bottom: 0;
}

.table thead {
  background: var(--gradient-dark);
  color: white;
  border-bottom: 3px solid #fd8b0f;
}

.table thead th {
  padding: 1.25rem 1rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 700;
  color: white;
}

.rank-1 { background: linear-gradient(135deg, #FFD700, #FFA500); }
.rank-2 { background: linear-gradient(135deg, #C0C0C0, #808080); }
.rank-3 { background: linear-gradient(135deg, #CD7F32, #8B4513); }
.rank-other { background: var(--gradient-secondary); }

.tournament-type {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--accent);
  color: white;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.timeline-container {
  position: relative;
  padding-left: 2rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fd8b0f;
}

.timeline-step {
  position: relative;
  padding: 1.5rem 0;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 2rem;
  width: 12px;
  height: 12px;
  background: #fd8b0f;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--light);
}

.btn-primary {
  background: #fd8b0f;
  border: none;
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.lead {
  font-size: 1.25rem;
  color: var(--text);
  line-height: 1.7;
}

h2 {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #fd8b0f;
  display: inline-block;
}

h3 {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 1rem;
}