:root {
  --bg: #0e0f13;
  --bg-soft: #12141b;
  --text: #e6e8ee;
  --muted: #aeb4c2;
  --accent: #ff4d8d;
  --accent-soft: #ff4d8d33;
  --card: #13151c;
  --stroke: #242938;
  --glow: #ff4d8d4d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Noto Sans', 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--text);
  background: radial-gradient(900px 500px at 80% -20%, #20233a 0%, transparent 60%), var(--bg);
  overflow-x: hidden;
}

body.preloading {
    overflow: hidden;
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 15, 19, .7);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid #ffffff0d;
  transition: background .2s ease, border-color .2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 800;
  letter-spacing: .5px;
  transition: transform .2s ease;
}
.brand:hover {
    transform: scale(1.02);
}

.brand-main {
  color: #fff;
}

.brand-accent {
  color: var(--accent);
  margin-left: 2px;
}

/* Main */
.main {
  padding: 32px 0 72px;
}

.section {
  padding: 24px 0;
}

.section-title {
  font-size: 28px;
  margin: 0 0 20px 0;
  font-weight: 700;
  letter-spacing: .3px;
  animation: fade-in-down .5s ease both;
}

/* Card / Accordion */
.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  margin: 16px 0;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: 0 4px 14px #00000030;
  animation: fade-in-up .5s ease both;
}
.card:nth-child(2) { animation-delay: .1s; }
.card:nth-child(3) { animation-delay: .2s; }
.card:nth-child(4) { animation-delay: .3s; }
.card:nth-child(5) { animation-delay: .4s; }

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px #00000045, 0 0 20px var(--glow);
  border-color: var(--accent-soft);
}

.card[open] {
  border-color: var(--accent);
  box-shadow: 0 10px 28px #00000055, 0 0 30px var(--glow);
}

.card-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  width: 100%;
  position: relative;
  transition: background .2s ease;
}

.card-summary::-webkit-details-marker {
  display: none;
}

.card-summary:hover {
  background: #ffffff08;
}

.card-summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  border-radius: 12px;
}

.summary-title {
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    line-height: 1.4;
}

.summary-chevron {
    margin-left: auto;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform .4s cubic-bezier(0.25, 1, 0.5, 1);
}

.card[open] .summary-chevron {
    transform: rotate(90deg);
}

.card-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s cubic-bezier(0.25, 1, 0.5, 1);
}

.card[open] .card-content {
  grid-template-rows: 1fr;
}

.card.is-closing .card-content {
  grid-template-rows: 0fr;
}

.card-content-inner {
    overflow: hidden;
    padding-left: 22px;
    padding-right: 22px;
}

.rules-list {
  margin: 0;
  padding: 18px 0 22px 34px;
  display: grid;
  gap: 12px;
}

.rules-list li {
  line-height: 1.65;
  list-style: none;
  position: relative;
  padding-left: 22px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease;
  transition-delay: 0s;
}

/* Opening animation - text appears from start */
.card[open] .rules-list li {
  opacity: 1;
  transform: translateY(0);
}

.card[open] .rules-list li:nth-child(1) { transition-delay: .05s; }
.card[open] .rules-list li:nth-child(2) { transition-delay: .08s; }
.card[open] .rules-list li:nth-child(3) { transition-delay: .11s; }
.card[open] .rules-list li:nth-child(4) { transition-delay: .14s; }
.card[open] .rules-list li:nth-child(5) { transition-delay: .17s; }
.card[open] .rules-list li:nth-child(6) { transition-delay: .2s; }
.card[open] .rules-list li:nth-child(7) { transition-delay: .23s; }
.card[open] .rules-list li:nth-child(8) { transition-delay: .26s; }
.card[open] .rules-list li:nth-child(9) { transition-delay: .29s; }
.card[open] .rules-list li:nth-child(10) { transition-delay: .32s; }
.card[open] .rules-list li:nth-child(11) { transition-delay: .35s; }
.card[open] .rules-list li:nth-child(12) { transition-delay: .38s; }
.card[open] .rules-list li:nth-child(13) { transition-delay: .41s; }
.card[open] .rules-list li:nth-child(14) { transition-delay: .44s; }
.card[open] .rules-list li:nth-child(15) { transition-delay: .47s; }
.card[open] .rules-list li:nth-child(n+16) { transition-delay: .5s; }

/* Closing animation - text disappears from end to start */
.card.is-closing .rules-list li:nth-child(1) { transition-delay: .15s; }
.card.is-closing .rules-list li:nth-child(2) { transition-delay: .14s; }
.card.is-closing .rules-list li:nth-child(3) { transition-delay: .13s; }
.card.is-closing .rules-list li:nth-child(4) { transition-delay: .12s; }
.card.is-closing .rules-list li:nth-child(5) { transition-delay: .11s; }
.card.is-closing .rules-list li:nth-child(6) { transition-delay: .1s; }
.card.is-closing .rules-list li:nth-child(7) { transition-delay: .09s; }
.card.is-closing .rules-list li:nth-child(8) { transition-delay: .08s; }
.card.is-closing .rules-list li:nth-child(9) { transition-delay: .07s; }
.card.is-closing .rules-list li:nth-child(10) { transition-delay: .06s; }
.card.is-closing .rules-list li:nth-child(11) { transition-delay: .05s; }
.card.is-closing .rules-list li:nth-child(12) { transition-delay: .04s; }
.card.is-closing .rules-list li:nth-child(13) { transition-delay: .03s; }
.card.is-closing .rules-list li:nth-child(14) { transition-delay: .02s; }
.card.is-closing .rules-list li:nth-child(15) { transition-delay: .01s; }
.card.is-closing .rules-list li:nth-child(n+16) { transition-delay: 0s; }

.rules-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
}

.rules-list li.sub {
  color: var(--muted);
  margin-left: -18px;
  padding-left: 0;
}

.rules-list li.sub::before {
  display: none;
}

.muted {
  color: var(--muted);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  transition: all .3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 2px 8px #00000020;
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px #00000040;
}

.social-link svg {
  flex-shrink: 0;
  transition: transform .3s ease;
}

.social-link:hover svg {
  transform: scale(1.1);
}

.social-link.telegram {
  border-color: #0088cc44;
}

.social-link.telegram:hover {
  background: #0088cc;
  border-color: #0088cc;
  color: #fff;
  box-shadow: 0 8px 20px #0088cc40;
}

.social-link.discord {
  border-color: #5865f244;
}

.social-link.discord:hover {
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
  box-shadow: 0 8px 20px #5865f240;
}

/* Footer */
.site-footer {
  border-top: 1px solid #ffffff14;
  padding: 24px 0;
  background: #0e0f13;
}

/* Keyframes */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 720px) {
  .header-inner { height: 56px; }
  .section-title { font-size: 24px; }
  .card-summary { padding: 16px; gap: 12px; }
  .summary-title { font-size: 16px; }
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity .4s ease;
}

.preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-logo {
    display: flex;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: .5px;
    color: #fff;
    position: relative;
}

.preloader .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: char-in .4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.preloader .b  { animation-delay: 0.05s; }
.preloader .r  { animation-delay: 0.1s; }
.preloader .a  { animation-delay: 0.15s; }
.preloader .w  { animation-delay: 0.2s; }
.preloader .l  { animation-delay: 0.25s; color: var(--accent); }
.preloader .i  { animation-delay: 0.3s; color: var(--accent); }
.preloader .f  { animation-delay: 0.35s; color: var(--accent); }
.preloader .e  { animation-delay: 0.4s; color: var(--accent); }
.preloader .e2 { animation-delay: 0.45s; color: var(--accent); }

@keyframes char-in {
    to { opacity: 1; transform: translateY(0); }
}
