.rules__section {
  padding: clamp(30px, 6vw, 60px) 0;
  position: relative;
  min-height: 100vh;
}

.rules__wrap { 
  max-width: var(--container);
  padding: 0 clamp(16px, 3vw, 24px);
}

.rules__article {
  margin: 0 auto;
  max-width: 980px;
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 
              0 0 60px rgba(212, 175, 55, 0.08);
  overflow: hidden;
}

.rules__tabs {
  display: flex;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(30, 25, 25, 0.95));
  border-bottom: 2px solid rgba(255, 175, 70, 0.3);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.rules__tabs::-webkit-scrollbar {
  height: 4px;
}

.rules__tabs::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.rules__tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 175, 70, 0.4);
  border-radius: 2px;
}

.rules__tabs::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 175, 70, 0.6);
}

.rules__tab {
  flex: 1;
  min-width: fit-content;
  padding: 18px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: rgba(255, 237, 214, 0.6);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  position: relative;
  white-space: nowrap;
}

.rules__tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: linear-gradient(90deg, #ffaf46, rgba(255, 175, 70, 0.8));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.rules__tab:hover {
  background: rgba(255, 175, 70, 0.08);
  color: rgba(255, 237, 214, 0.9);
}

.rules__tab--active {
  color: #ffaf46;
  background: rgba(255, 175, 70, 0.12);
}

.rules__tab--active::after {
  transform: scaleX(1);
}

.rules__tab-text {
  display: block;
  text-align: center;
}

.rules__content {
  padding: clamp(24px, 5vw, 40px) clamp(20px, 4vw, 48px);
  min-height: 400px;
}

.rules__panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.rules__panel--active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rules__text {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.75;
  letter-spacing: 0.02em;
  text-align: left;
}

.rules__text h2 {
  color: #ffaf46;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255, 175, 70, 0.3);
  text-shadow: 0 2px 8px rgba(199, 73, 0, 0.4);
}

.rules__text h3 {
  color: rgba(255, 211, 117, 0.95);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
  margin: 28px 0 12px 0;
  padding-left: 12px;
  border-left: 4px solid rgba(255, 175, 70, 0.6);
}

.rules__text p {
  margin: 12px 0;
  color: rgba(255, 237, 214, 0.85);
  line-height: 1.75;
}

.rules__text strong {
  color: #ffd375;
  font-weight: 600;
}

.rules__text ul {
  margin: 12px 0;
  padding-left: 28px;
  list-style: none;
}

.rules__text ul li {
  position: relative;
  padding: 8px 0;
  padding-left: 24px;
  color: rgba(255, 237, 214, 0.85);
  line-height: 1.6;
}

.rules__text ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #ffaf46;
  font-size: 14px;
  font-weight: bold;
}

.rules__text ul li strong {
  color: #ffaf46;
}

.rules__text a {
  color: #ffaf46;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 175, 70, 0.3);
  transition: all 0.2s ease;
}

.rules__text a:hover {
  color: #ffd375;
  border-bottom-color: #ffaf46;
}

/* Responsive font size for better readability */
@media (max-width: 768px) {
  .rules__text {
    font-size: 14px;
    line-height: 1.6;
  }
  
  .rules__content {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .rules__text {
    font-size: 13px;
  }
}

/* Smooth scrolling for long content */
.rules__article {
  scroll-behavior: smooth;
}
