.rules-page-container { max-width: 900px; margin: 2rem auto; opacity: 0; animation: fadeIn 0.8s ease-out forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.rules-header { text-align: center; margin-bottom: 3rem; }
.rules-header h1 { font-size: 3rem; margin-bottom: 1rem; }
.rules-header p { font-size: 1.2rem; color: var(--text-secondary); }

.accordion-container { display: flex; flex-direction: column; gap: 1rem; }
.accordion-item { background: rgba(18, 18, 18, 0.6); border: 1px solid var(--color-border); border-radius: 12px; transition: background-color 0.3s ease; }
.accordion-item.active { background-color: rgba(22, 22, 22, 0.8); }
.accordion-header { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; cursor: pointer; user-select: none; }
.accordion-header i:first-child { font-size: 1.8rem; color: var(--color-primary); }
.accordion-header h3 { font-size: 1.25rem; color: var(--text-main); }
.accordion-header .chevron { margin-left: auto; font-size: 1.8rem; color: var(--text-secondary); transition: transform 0.4s ease; }
.accordion-item.active .accordion-header .chevron { transform: rotate(180deg); }

.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.5s ease, padding 0.5s ease; }
.accordion-item.active .accordion-content { max-height: 2000px; padding: 0 1.5rem 1.5rem 1.5rem; }
.accordion-content ul { list-style: none; padding: 0; border: none; }

.accordion-content li { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.accordion-content li:last-child { border-bottom: none; }

.rule-text { color: var(--text-secondary); line-height: 1.7; }

.punishment { padding: 0.2rem 0.8rem; border-radius: 6px; font-size: 0.9rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.punishment-mute { background-color: rgba(229, 165, 53, 0.2); color: #e5a535; border: 1px solid #e5a535; }
.punishment-ban-short { background-color: rgba(215, 87, 60, 0.2); color: #d7573c; border: 1px solid #d7573c; }
.punishment-ban-long { background-color: rgba(200, 50, 50, 0.25); color: #c83232; border: 1px solid #c83232; }
.punishment-ban-perm { background-color: rgba(180, 40, 40, 0.3); color: #b42828; border: 1px solid #b42828; }
.punishment-warn { background-color: rgba(100, 100, 100, 0.2); color: #888; border: 1px solid #888; }
.punishment-info { background-color: rgba(2, 136, 209, 0.2); color: #0288D1; border: 1px solid #0288D1; }

.sub-rules {
  list-style: none;
  margin-top: 0.75rem;
  padding-left: 1.5rem;
  border: none;
}
.sub-rules li {
  padding: 0.5rem 0 0.5rem 1rem;
  border: none;
  font-size: 0.95rem;
  position: relative;
}
.sub-rules li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}
.sub-rule {
  width: 100%;
  margin-top: 0.5rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  opacity: 0.7;
  line-height: 1.6;
}
.sub-rule::before {
  content: '*';
  position: absolute;
  left: 0.5rem;
  color: var(--text-secondary);
}

.role-grid {
  width: 100%;
  margin-top: 1rem;
  padding-left: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.role-tag {
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  border: 1px solid;
  color: #fff;
  min-width: 90px;
}

.role-admin { background-color: rgba(211, 47, 47, 0.2); border-color: #D32F2F; }
.role-builder { background-color: rgba(251, 192, 45, 0.2); border-color: #FBC02D; }
.role-moder { background-color: rgba(173, 59, 110, 0.2); border-color: #ad3b6e; }
.role-helper { background-color: rgba(2, 136, 209, 0.2); border-color: #0288D1; }
.role-media { background-color: rgba(149, 117, 205, 0.2); border-color: #9575CD; }

.role-description {
  color: var(--text-secondary);
}

.notes-section {
  margin-top: 3rem;
  background: linear-gradient(45deg, rgba(0, 149, 224, 0.1), rgba(0, 170, 255, 0.05));
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2rem 2.5rem;
}
.notes-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.notes-header i { font-size: 2rem; color: var(--color-primary-hover); }
.notes-header h2 { font-size: 1.8rem; }
.notes-content p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 0.75rem; }
.notes-content strong { color: var(--text-main); }
