/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0b0e14;
  --bg-card: #12161f;
  --bg-card-hover: #161b27;
  --border: #1e2533;
  --text: #e6eaf2;
  --text-muted: #8b95a8;
  --accent: #5b8def;
  --accent-soft: rgba(91, 141, 239, 0.15);
  --ban: #f07178;
  --ban-bg: rgba(240, 113, 120, 0.12);
  --mute: #e6b450;
  --mute-bg: rgba(230, 180, 80, 0.12);
  --perm: #ff6b9d;
  --perm-bg: rgba(255, 107, 157, 0.15);
  --success: #7fd962;
  --radius: 12px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background effects */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 37, 51, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 37, 51, 0.4) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(91, 141, 239, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #5b8def, #7c6aef);
  border-radius: 10px;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(91, 141, 239, 0.35);
}

.logo h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.nav a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

/* ===== Cover Banner ===== */
.cover {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.cover-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(91, 141, 239, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(124, 106, 239, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(255, 193, 77, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #0d1118 0%, #0b0e14 100%);
  z-index: 0;
}

.cover-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 37, 51, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 37, 51, 0.35) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 70%);
}

.cover-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 24px 40px;
}

.cover-logo {
  margin-bottom: 20px;
}

.cover-svg {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 8px 24px rgba(91, 141, 239, 0.4));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.cover-title {
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #e6eaf2 0%, #5b8def 45%, #ffc14d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
  line-height: 1.1;
}

.cover-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.cover-divider {
  width: 64px;
  height: 3px;
  margin: 0 auto 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, #5b8def, #7c6aef, #ffc14d);
}

.cover-tagline {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(139, 149, 168, 0.8);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ===== Hero ===== */
.hero {
  padding: 48px 0 40px;
  text-align: center;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  border: 1px solid rgba(91, 141, 239, 0.25);
}

.hero h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #e6eaf2 0%, #a8b4c8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-text strong {
  color: var(--text);
}

.strike {
  color: var(--ban);
  font-weight: 600;
}

/* ===== Sections ===== */
.section {
  padding: 48px 0;
}

.section-alt {
  background: rgba(18, 22, 31, 0.5);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  font-size: 1.25rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

/* ===== Roles ===== */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.role-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.role-rank {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: var(--mono);
}

.role-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.role-helper { border-color: #3d4a5c; }
.role-helper .role-name { color: #8b9cb3; }

.role-sr-helper { border-color: #3d5a6c; }
.role-sr-helper .role-name { color: #7ba3c4; }

.role-mod { border-color: #2d5a4a; }
.role-mod .role-name { color: #6bc4a0; }

.role-sr-mod { border-color: #2d6a5a; }
.role-sr-mod .role-name { color: #5dd4b0; }

.role-admin { border-color: #4a3d6c; }
.role-admin .role-name { color: #a78bfa; }

.role-sr-admin { border-color: #5a3d7c; }
.role-sr-admin .role-name { color: #c4a1ff; }

.role-co-owner { border-color: #6c4a2d; }
.role-co-owner .role-name { color: #f0b060; }

.role-owner {
  border-color: #8b5a2d;
  background: linear-gradient(145deg, #1a1410, #12161f);
}
.role-owner .role-name {
  color: #ffc14d;
  font-weight: 700;
}

.role-founder {
  border-color: #c9a227;
  background: linear-gradient(145deg, #1f1a0a, #15120c);
  box-shadow: 0 0 20px rgba(255, 193, 77, 0.15);
}
.role-founder .role-name {
  color: #ffe08a;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(255, 193, 77, 0.35);
}
.role-founder .role-rank {
  color: #ffc14d;
}

/* ===== Rule Cards ===== */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s, background 0.15s;
}

.rule-card:hover {
  background: var(--bg-card-hover);
  border-color: #2a3344;
}

.rule-critical {
  border-color: rgba(255, 107, 157, 0.35);
  background: linear-gradient(145deg, rgba(255, 107, 157, 0.06), var(--bg-card));
}

.rule-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.rule-header h4 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(139, 149, 168, 0.15);
  color: var(--text-muted);
  white-space: nowrap;
}

.tag-severe {
  background: var(--ban-bg);
  color: var(--ban);
}

.tag-perm {
  background: var(--perm-bg);
  color: var(--perm);
}

.offense-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offense-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  font-size: 0.875rem;
}

.offense {
  color: var(--text-muted);
  font-weight: 500;
}

.duration {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.duration.ban {
  background: var(--ban-bg);
  color: var(--ban);
}

.duration.mute {
  background: var(--mute-bg);
  color: var(--mute);
}

.duration.perm {
  background: var(--perm-bg);
  color: var(--perm);
}

/* ===== Notes ===== */
.section-notes {
  padding-bottom: 64px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.note-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.note-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.note-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.note-card p strong {
  color: var(--text);
}

.note-warn .note-icon {
  background: var(--mute-bg);
  color: var(--mute);
}

.note-info .note-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.note-critical .note-icon {
  background: rgba(127, 217, 98, 0.15);
  color: var(--success);
}

.note-strike .note-icon {
  background: var(--ban-bg);
  color: var(--ban);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
}

.footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-sub {
  margin-top: 8px;
  font-size: 0.75rem !important;
  opacity: 0.7;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: nowrap;
  }

  .nav a {
    flex-shrink: 0;
  }

  .hero {
    padding: 40px 0 32px;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }

  .roles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .offense-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
