.rules-page {
  padding: 5rem 0 3rem;
}

.rules-shell {
  background: linear-gradient(165deg, rgba(3, 6, 12, 0.97), rgba(2, 4, 8, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.2rem;
}

.rules-shell h1 {
  margin-top: 0.2rem;
}

.rules-shell > p {
  color: #a6bad0;
  line-height: 1.6;
}

.rules-index {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.rules-index a {
  border: 1px solid rgba(0, 168, 255, 0.35);
  background: rgba(0, 168, 255, 0.1);
  color: #d9ecff;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.rules-index a:hover {
  border-color: rgba(100, 255, 89, 0.6);
  color: #64ff59;
}

.rules-index a.is-active {
  border-color: #64ff59;
  background: rgba(100, 255, 89, 0.16);
  color: #64ff59;
  box-shadow: 0 0 14px rgba(100, 255, 89, 0.25);
}

.rule-section {
  margin-top: 1rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  scroll-margin-top: 108px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rule-section.rule-highlight {
  border-color: #64ff59;
  box-shadow:
    0 0 0 2px rgba(100, 255, 89, 0.75),
    0 0 28px rgba(100, 255, 89, 0.3);
}

.rule-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  color: #e9f4ff;
}

.rule-section h3 {
  margin: 1rem 0 0.45rem;
  font-size: 1.05rem;
  color: #64ff59;
}

.rule-section p,
.rule-section li {
  color: #d7e8f8;
  line-height: 1.6;
}

.rule-section ul,
.rule-section ol {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.2rem;
}

.rules-meta {
  color: #89a4bf;
  font-size: 0.95rem;
}

.rules-footer {
  margin-top: 1rem;
  font-weight: 700;
  color: #64ff59;
}

.rules-note {
  color: #89a4bf;
  font-size: 0.9rem;
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6rem 0 0.2rem;
  font-size: 0.92rem;
}

.rules-table th,
.rules-table td {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.5rem 0.65rem;
  text-align: left;
  color: #d7e8f8;
}

.rules-table th {
  background: rgba(0, 168, 255, 0.12);
  color: #9fd8ff;
}

.rules-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.back-link {
  margin-top: 0.9rem;
  display: inline-flex;
  color: #64ff59;
  font-weight: 600;
}

@media (max-width: 700px) {
  .rules-table {
    font-size: 0.82rem;
  }

  .rules-table th,
  .rules-table td {
    padding: 0.4rem;
  }
}
