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

/* Адаптация к теме */
.terms-container {
  background-color: var(--dark-card);
  color: var(--text-primary);
  padding: 2rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.terms-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-section:last-child {
  border-bottom: none;
}

.terms-section h2 {
  color: var(--primary);
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.terms-section h3 {
  color: var(--text-primary);
  font-size: 1.35rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.terms-section h4 {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.terms-section p {
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.terms-section ol {
  counter-reset: item;
  list-style-type: none;
  padding-left: 0;
}

.terms-section ol > li {
  counter-increment: item;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 2.5rem;
}

.terms-section ol > li:before {
  content: counter(item) ".";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
}

.terms-section ul {
  list-style-type: disc;
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.terms-section ul li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.terms-section ul ul {
  list-style-type: circle;
  margin-top: 0.5rem;
}

.last-updated {
  background: var(--dark-lighter);
  padding: 1rem 1.5rem;
  border-radius: 0.375rem;
  border-left: 4px solid var(--primary);
  margin-bottom: 2rem;
}

.last-updated p {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.highlight-box {
  background: var(--dark-lighter);
  padding: 1.25rem;
  border-radius: 0.375rem;
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
}

.highlight-box p {
  margin: 0;
  color: var(--text-primary);
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .terms-container {
    padding: 1.25rem;
  }
  
  .terms-section h2 {
    font-size: 1.5rem;
  }
  
  .terms-section h3 {
    font-size: 1.25rem;
  }
}