/* Community Rules Page Custom Styles with Enhanced Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Poppins:wght@600;700;800;900&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.rules-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 30px 100px 30px;
}

.rules-hero {
  background: linear-gradient(135deg, rgba(15, 23, 35, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border: 2px solid rgba(220, 38, 38, 0.3);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  margin-bottom: 100px;
  padding: 100px 60px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.rules-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
  animation: heroGlow 8s ease-in-out infinite;
  z-index: -1;
}

@keyframes heroGlow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(10%, 10%) scale(1.1); opacity: 0.8; }
}

.rules-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 900 !important;
  font-size: 4.5rem !important;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 35px !important;
  text-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
}

.rules-hero p {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.9;
  color: rgba(226, 232, 240, 0.95);
  max-width: 900px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 2.8rem;
  letter-spacing: -0.8px;
  margin-bottom: 50px;
}

.rules-section {
  background: rgba(15, 23, 35, 0.7);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  padding: 40px 32px;
  margin-bottom: 30px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease backwards;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.rules-section h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 20px;
}

.rules-section p,
.rules-section li {
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 500;
  color: rgba(203, 213, 225, 0.95);
}

.rules-section:nth-child(1) { animation-delay: 0.1s; }
.rules-section:nth-child(2) { animation-delay: 0.2s; }
.rules-section:nth-child(3) { animation-delay: 0.3s; }
.rules-section:nth-child(4) { animation-delay: 0.4s; }
.rules-section:nth-child(5) { animation-delay: 0.5s; }
.rules-section:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.rules-section:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
}

.rule-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0.05));
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  font-size: 24px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.rules-section:hover .rule-icon {
  transform: scale(1.1) rotate(360deg);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.rule-item {
  padding: 16px;
  background: rgba(15, 23, 35, 0.3);
  border-left: 3px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  transition: all 0.3s ease;
  animation: slideIn 0.5s ease backwards;
}

.rule-item:nth-child(1) { animation-delay: 0.05s; }
.rule-item:nth-child(2) { animation-delay: 0.1s; }
.rule-item:nth-child(3) { animation-delay: 0.15s; }
.rule-item:nth-child(4) { animation-delay: 0.2s; }
.rule-item:nth-child(5) { animation-delay: 0.25s; }
.rule-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.rule-item:hover {
  background: rgba(15, 23, 35, 0.5);
  border-left-color: rgba(56, 189, 248, 0.6);
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.1);
}

.warning-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  animation: pulseWarning 2s ease-in-out infinite;
}

@keyframes pulseWarning {
  0%, 100% { box-shadow: 0 0 10px rgba(220, 38, 38, 0.2); }
  50% { box-shadow: 0 0 20px rgba(220, 38, 38, 0.4); }
}

.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.success-badge:hover {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.5);
  transform: scale(1.05);
}

.zero-tolerance {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.2));
  border: 2px solid rgba(220, 38, 38, 0.4);
  padding: 24px;
  border-radius: 12px;
  animation: warningPulse 3s ease-in-out infinite;
}

@keyframes warningPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    border-color: rgba(220, 38, 38, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.5);
    border-color: rgba(220, 38, 38, 0.6);
  }
}

.enforcement-level {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.enforcement-level.warning {
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fcd34d;
}

.enforcement-level.suspension {
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #fb923c;
}

.enforcement-level.ban {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #f87171;
}

.collapsible-header {
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.collapsible-header:hover {
  background: rgba(56, 189, 248, 0.1);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapsible-content.active {
  max-height: 2000px;
}

.section-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
  margin: 32px 0;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.toc-link {
  padding: 12px 16px;
  background: rgba(15, 23, 35, 0.4);
  border-left: 3px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  transition: all 0.3s ease;
  display: block;
}

.toc-link:hover {
  background: rgba(15, 23, 35, 0.6);
  border-left-color: rgba(56, 189, 248, 0.8);
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
  .rules-hero { padding: 32px 20px !important; }
  .rule-icon { width: 40px; height: 40px; font-size: 20px; }
  .rules-section { padding: 20px !important; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 35, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}