﻿.guide-page--rules {
  overflow: visible;
  max-width: 100%;
}

body.vx-rules-modal-open {
  overflow: hidden;
}

.vx-rules {
  --vx-r-max: 46rem;
  --vx-r-muted: rgb(var(--muted-foreground));
  --vx-r-line: rgba(255, 255, 255, 0.1);
  --vx-gold: hsl(var(--primary));
  position: relative;
  padding: 5.5rem 0 max(4.5rem, env(safe-area-inset-bottom));
  overflow: visible;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.vx-rules::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 52% 34% at 50% 28%, hsl(var(--primary) / 0.14), transparent 62%);
}

.vx-rules__frame {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--vx-r-max));
  margin-inline: auto;
}

.vx-rules-hero {
  max-width: 30rem;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.vx-rules-hero__kicker {
  margin: 0;
  color: var(--vx-gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.vx-rules-hero h1 {
  margin: 0.4rem 0 0;
  color: #fff;
  font-family: Outfit, Poppins, sans-serif;
  font-size: clamp(2.15rem, 5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.vx-rules-hero__lead {
  margin: 0.75rem 0 0;
  color: var(--vx-r-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.vx-rules-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.75rem;
}

.vx-rules-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: min(22rem, 100%);
  padding: 0 0.85rem;
  border: 1px solid var(--vx-r-line);
  border-radius: 999px;
  background: rgba(12, 10, 28, 0.55);
}

.vx-rules-search svg {
  width: 1rem;
  height: 1rem;
  color: var(--vx-r-muted);
  flex-shrink: 0;
}

.vx-rules-search input,
.vx-rules-search input[type="search"] {
  width: 100%;
  height: 2.65rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
}

.vx-rules-search input:focus-visible {
  outline: none;
}

.vx-rules-search input::-webkit-search-decoration,
.vx-rules-search input::-webkit-search-cancel-button,
.vx-rules-search input::-webkit-search-results-button {
  -webkit-appearance: none;
}

.vx-rules-search:focus-within {
  border-color: hsl(var(--primary) / 0.45);
}

.vx-rules-toolbar__empty {
  width: 100%;
  margin: 0.7rem 0 0;
  color: #fca5a5;
  font-size: 0.82rem;
  text-align: center;
}

.vx-rules-pick {
  display: flex;
  justify-content: center;
}

.vx-rules-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.15rem;
  width: 100%;
  max-width: 42rem;
}

.vx-rules-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  flex: 0 0 12.35rem;
  width: 12.35rem;
  min-height: 17.25rem;
  margin: 0;
  padding: 1.55rem 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.15rem;
  background: rgba(18, 15, 34, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.22);
  color: #fff;
  font-family: Outfit, Poppins, sans-serif;
  font-size: 16px !important;
  font-weight: 400;
  line-height: 1.2 !important;
  text-align: center;
  text-transform: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.vx-rules-card[hidden] {
  display: none !important;
}

.vx-rules-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.6rem;
  height: 4.6rem;
  margin-bottom: 1.15rem;
  color: var(--vx-gold);
}

.vx-rules-card__svg {
  width: 4.4rem;
  height: 4.4rem;
  display: block;
}

.vx-rules-card--media {
  justify-content: flex-end;
  padding: 0 1rem 1.2rem;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.14);
  background: #0c0a16;
}

.vx-rules-card__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.vx-rules-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(8, 6, 18, 0.08) 0%,
      rgba(8, 6, 18, 0.2) 45%,
      rgba(8, 6, 18, 0.82) 78%,
      rgba(8, 6, 18, 0.94) 100%
    );
}

.vx-rules-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.vx-rules-card .vx-rules-card__name {
  display: block;
  margin: auto 0 0;
  color: #fff !important;
  font-family: Outfit, Poppins, sans-serif !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em;
  line-height: 1.2 !important;
  white-space: nowrap;
  -webkit-text-fill-color: #fff;
  position: relative;
  z-index: 1;
}

.vx-rules-card--media .vx-rules-card__name {
  margin-top: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.vx-rules-card:focus-visible {
  outline: none;
  border-color: hsl(var(--primary) / 0.65);
}

.vx-rules-card:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .vx-rules-card:hover,
  .vx-rules-card:focus-visible {
    transform: translateY(-4px);
    border-color: hsl(var(--primary) / 0.45);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 18px 36px rgba(0, 0, 0, 0.28);
  }
}

.vx-rules-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.1rem, env(safe-area-inset-top)) 1.1rem max(1.1rem, env(safe-area-inset-bottom));
  background: rgba(6, 4, 16, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.vx-rules-modal[hidden] {
  display: none !important;
}

.vx-rules-modal__window {
  position: relative;
  z-index: 1;
  width: min(61.88rem, calc(100vw - 2.2rem));
  max-width: calc(100vw - 2.2rem);
  max-height: min(82dvh, 40rem);
  overflow: auto;
  padding: 1.45rem 1.35rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.15rem;
  background: rgb(16, 13, 32);
  box-shadow:
    0 0 0 1px hsl(var(--primary) / 0.12),
    0 28px 70px rgba(0, 0, 0, 0.48);
  animation: vx-rules-window 0.22s ease both;
  -webkit-overflow-scrolling: touch;
}

.vx-rules-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.vx-rules-modal__close:hover,
.vx-rules-modal__close:focus-visible {
  color: #fff;
  outline: none;
}

.vx-rules-read__head {
  margin: 0 2rem 1.15rem 0;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--vx-r-line);
}

.vx-rules-read__head h2 {
  margin: 0;
  color: #fff;
  font-family: Outfit, Poppins, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.vx-rules-read__head p {
  margin: 0.4rem 0 0;
  color: var(--vx-r-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.vx-rule {
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.vx-rule:first-child {
  padding-top: 0.15rem;
}

.vx-rule[hidden] {
  display: none !important;
}

.vx-rule h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.vx-rule p,
.vx-rule ul {
  margin: 0.38rem 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  line-height: 1.62;
}

.vx-rule ul {
  padding-left: 1.05rem;
}

.vx-rule li + li {
  margin-top: 0.22rem;
}

.vx-rule__pens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.vx-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.26rem 0.5rem;
  border-radius: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.vx-badge--ban {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.28);
}

.vx-badge--mute {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.vx-badge--taxa {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.28);
}

.vx-badge--off {
  color: rgba(226, 232, 240, 0.82);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.vx-rules-foot {
  margin: 1.05rem 0 0;
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.75rem;
  line-height: 1.5;
}

.vx-rules mark {
  background: hsl(var(--primary) / 0.28);
  color: #fff;
  padding: 0 0.12em;
  border-radius: 0.15rem;
}

@keyframes vx-rules-window {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 860px) {
  .vx-rules-card {
    flex: 0 0 min(12.35rem, calc(50% - 0.6rem));
    width: min(12.35rem, calc(50% - 0.6rem));
  }
}

@media (max-width: 640px) {
  .vx-rules {
    padding-top: 4.6rem;
  }

  .vx-rules__frame {
    width: min(100% - 1.25rem, var(--vx-r-max));
  }

  .vx-rules-grid {
    gap: 0.75rem;
  }

  .vx-rules-card {
    min-height: 15.5rem;
    padding: 1.25rem 0.75rem 1rem;
    border-radius: 1rem;
  }

  .vx-rules-card .vx-rules-card__name {
    font-size: 1.05rem !important;
  }

  .vx-rules-modal {
    padding: 0.9rem;
    align-items: flex-end;
  }

  .vx-rules-modal__window {
    width: 100%;
    max-height: min(78dvh, 38rem);
    padding: 1.25rem 1.05rem 1.2rem;
    border-radius: 1.05rem 1.05rem 0.85rem 0.85rem;
  }

  .vx-rule h3 {
    overflow-wrap: anywhere;
  }
}

.vx-rules-fx {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  overflow: hidden;
}

.vx-rules-card.vx-rules-card--exploding {
  transform: scale(0.97);
  opacity: 0;
  transition:
    transform 120ms ease,
    opacity 100ms ease 70ms;
  pointer-events: none;
}

.vx-rules.is-shaking {
  animation: vx-mc-shake 160ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.vx-mc-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.vx-mc-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #1a1a1a;
  opacity: 0;
  transition: opacity 180ms linear;
  pointer-events: none;
}

.vx-mc-veil.is-on {
  opacity: 0.97;
}

.vx-mc-veil.is-out {
  opacity: 0;
  transition: opacity 160ms ease;
}

.vx-mc-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.vx-mc-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

.vx-rules-modal__window.vx-rules-window--enter {
  animation: vx-rules-window-enter 180ms cubic-bezier(0.22, 0.8, 0.25, 1) 420ms both;
}

@keyframes vx-mc-shake {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-4px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-3px, 1px); }
  80% { transform: translate(2px, -1px); }
}

@keyframes vx-rules-window-enter {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .vx-rules-card,
  .vx-rules-modal__window {
    animation: none;
    transition: none;
  }

  .vx-rules-card:hover,
  .vx-rules-card:active {
    transform: none;
  }

  .vx-rules.is-shaking,
  .vx-rules-modal__window.vx-rules-window--enter {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
  }

  .vx-rules-card.vx-rules-card--exploding {
    transition: none;
    opacity: 0;
  }
}
