﻿.rules-page {
  width: min(1200px, 94vw);
  margin: 24px auto 32px;
  animation: fadeRise 850ms ease 140ms both;
}

.rules-top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(42, 245, 152, 0.18);
}

.rules-top > div {
  text-align: center;
}

.rules-top h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 5rem);
  font-family: var(--font-heading);
  letter-spacing: 0.03em;
  color: var(--mint-soft);
}

.rules-top p {
  margin: 6px auto 10px;
  color: var(--text-dim);
  max-width: 62ch;
}

.rules-layout {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.rules-sidebar,
.rules-content {
  border: 1px solid rgba(42, 245, 152, 0.17);
  border-radius: 6px;
  background: rgba(24, 24, 24, 0.58);
  backdrop-filter: blur(12px);
}

.rules-sidebar {
  padding: 18px;
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 24px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.72) rgba(26, 26, 26, 0.72);
  scrollbar-gutter: stable;
}

.rules-sidebar::-webkit-scrollbar {
  width: 10px;
}

.rules-sidebar::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.92), rgba(18, 18, 18, 0.82));
  border-left: 1px solid rgba(42, 245, 152, 0.12);
  border-radius: 6px;
}

.rules-sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  border: 2px solid rgba(26, 26, 26, 0.92);
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.rules-sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(224, 224, 224, 0.76));
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.3);
}

.rules-sidebar h2 {
  margin: 0 0 18px;
  font-size: 1.4rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: none;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(42, 245, 152, 0.25);
}

.rules-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rules-category-item {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid rgba(42, 245, 152, 0.15);
  background: linear-gradient(135deg, rgba(42, 245, 152, 0.04), rgba(26, 26, 26, 0.6));
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: all 250ms ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.rules-category-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--mint);
  transform: scaleY(0);
  transition: transform 250ms ease;
  box-shadow: 0 0 10px var(--mint);
}

.rules-category-item:hover::before {
  transform: scaleY(1);
}

.rules-category-item:hover {
  border-color: rgba(42, 245, 152, 0.4);
  background: linear-gradient(135deg, rgba(42, 245, 152, 0.1), rgba(26, 26, 26, 0.7));
  color: var(--text);
  transform: translateX(6px);
  box-shadow: 0 4px 16px rgba(42, 245, 152, 0.12);
}

.rules-category-item.active {
  border-color: rgba(42, 245, 152, 0.42);
  background: linear-gradient(135deg, rgba(42, 245, 152, 0.11), rgba(28, 28, 28, 0.82));
  color: var(--mint-soft);
  box-shadow: 0 0 12px rgba(42, 245, 152, 0.16), inset 0 0 10px rgba(42, 245, 152, 0.05);
  transform: translateX(6px);
}

.rules-category-item.active::before {
  transform: scaleY(1);
}

.rules-badge {
  display: inline-grid;
  place-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(42, 245, 152, 0.45);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-main);
  flex-shrink: 0;
  color: var(--mint-soft);
}

.rules-category-item.active .rules-badge {
  background: linear-gradient(135deg, rgba(42, 245, 152, 0.25), rgba(42, 245, 152, 0.15));
}

.rules-category-name {
  flex: 1;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rules-content {
  padding: 16px;
}

.rules-content-title {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 3.5vw, 2.8rem);
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
  text-align: center;
}

.rules-sections {
  display: grid;
  gap: 12px;
}

.rules-section {
  border: 1px solid rgba(42, 245, 152, 0.2);
  border-radius: 6px;
  background: rgba(2, 11, 7, 0.75);
  padding: 14px;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}

.rules-list li {
  color: var(--text);
  line-height: 1.7;
  font-size: 1.05rem;
  padding: 14px 0;
  border-bottom: 1px solid rgba(42, 245, 152, 0.08);
}

.rules-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rules-list li:first-child {
  padding-top: 0;
}

.rules-list li strong {
  color: var(--mint);
  margin-right: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  display: inline-block;
  min-width: 40px;
}

.rules-empty {
  margin: 14px 0 0;
  border: 1px solid rgba(42, 245, 152, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text-dim);
  background: rgba(42, 245, 152, 0.08);
}

@media (max-width: 1100px) {
  .rules-layout {
    grid-template-columns: 1fr;
  }

  .rules-sidebar {
    position: static;
    top: auto;
    align-self: auto;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .rules-top {
    flex-direction: column;
  }
}

