@font-face {
  font-family: "Arial Black";
  src: url("https://cdn.mau5cord.com/media/fonts/ArialBlack.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Arial Bold";
  src: url("https://cdn.mau5cord.com/media/fonts/ArialBold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Arial Regular";
  src: url("https://cdn.mau5cord.com/media/fonts/ArialRegular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 2rem 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  font-family: "Arial Regular", Arial, sans-serif;
  color: #e4e4e7;
  background-color: #0f0f10;
  background-image: url("https://cdn.mau5cord.com/media/images/background.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 15, 16, 0.85) 0%, rgba(15, 15, 16, 0.6) 40%, rgba(15, 15, 16, 0.75) 100%);
  pointer-events: none;
  z-index: 0;
}

.banner {
  position: relative;
  z-index: 1;
  height: 42vh;
  max-height: 320px;
  width: min(72%, 900px);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.server-card {
  position: relative;
  z-index: 1;
  width: min(90%, 640px);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  background: rgba(24, 24, 27, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.2);
}

.server-card__icon {
  flex-shrink: 0;
  height: 72px;
  width: 72px;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  order: 1;
}

.server-card__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
  order: 2;
}

.server-card__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.server-card__title h1 {
  margin-top: -0.12em;
  line-height: 1;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-family: "Arial Black", Arial, sans-serif;
}

.server-card__verified {
  flex-shrink: 0;
  vertical-align: middle;
  width: 1.35em;
  height: 1.35em;
}

.server-card__description {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.5;
  color: #a1a1aa;
  text-align: left;
  max-width: 32ch;
  font-family: "Arial Bold", Arial, sans-serif;
}

.server-card__counts {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.15rem;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.count {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: #a1a1aa;
}

.count__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.count__dot--online {
  background-color: #23a559;
  box-shadow: 0 0 10px rgba(35, 165, 89, 0.4);
}

.count__dot--members {
  background-color: #71717a;
}

.count__value {
  font-weight: 600;
  color: #e4e4e7;
}

.server-card__actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  min-width: 140px;
  order: 3;
}

.server-card__actions-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.server-card__actions-row .btn {
  flex: 1;
  min-width: 0;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  padding: 0 1.25rem;
  font-family: "Arial Bold", Arial, sans-serif;
  font-size: 15px;
  font-weight: bold;
  line-height: 1;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
}

.btn--primary:hover {
  background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
}

.btn--secondary {
  color: #e4e4e7;
  background: rgba(39, 39, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn--secondary:hover {
  background: rgba(63, 63, 70, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 680px) {
  .banner {
    width: min(92%, 900px);
    height: 36vh;
    max-height: 260px;
    border-radius: 20px;
  }

  .server-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .server-card__info {
    align-items: center;
  }

  .server-card__description {
    text-align: center;
  }

  .server-card__actions {
    width: 100%;
    max-width: 280px;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  body {
    gap: 1.5rem;
    padding: 1.25rem 0.75rem;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  body {
    background-attachment: scroll;
  }

  .banner {
    width: 100%;
    max-width: none;
    height: 28vh;
    min-height: 140px;
    max-height: 220px;
    border-radius: 16px;
  }

  .server-card {
    width: 100%;
    padding: 1.5rem 1.25rem;
    gap: 1.25rem;
    border-radius: 16px;
  }

  .server-card__icon {
    height: 64px;
    width: 64px;
    border-radius: 14px;
  }

  .server-card__info {
    align-items: center;
  }

  .server-card__title h1 {
    font-size: 1.35rem;
  }

  .server-card__description {
    text-align: center;
    font-size: 0.75rem;
    max-width: none;
  }

  .server-card__counts {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.45rem 0.75rem;
  }

  .count {
    font-size: 0.8125rem;
  }

  .server-card__actions {
    width: 100%;
    max-width: 280px;
    min-width: 0;
  }

  .btn {
    height: 48px;
    font-size: 16px;
    min-height: 48px;
  }
}

@media (max-width: 360px) {
  .server-card__counts {
    flex-direction: column;
    align-items: center;
  }

  .server-card__actions-row {
    flex-direction: column;
  }

  .server-card__actions-row .btn {
    width: 100%;
  }
}

.rules-page {
  justify-content: flex-start;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.rules-back {
  position: relative;
  z-index: 1;
  color: #a1a1aa;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.rules-back:hover {
  color: #e4e4e7;
}

.content-card {
  position: relative;
  z-index: 1;
  width: min(90%, 640px);
  padding: 2rem 2.25rem;
  background: rgba(24, 24, 27, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.2);
}

.content-card__title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Arial Black", Arial, sans-serif;
}

.rules-section {
  margin-bottom: 1.5rem;
  scroll-margin-top: 1rem;
}

.rules-section:target {
  outline: 2px solid rgba(234, 179, 8, 0.7);
  outline-offset: 4px;
  border-radius: 8px;
}

.rules-section:last-child {
  margin-bottom: 0;
}

.content-card h2 {
  font-size: 0.95rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  font-family: "Arial Bold", Arial, sans-serif;
}

.rules-section__link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.rules-section__link:hover {
  color: #a5b4fc;
}

.rules-section__link:focus-visible {
  outline: 2px solid rgba(234, 179, 8, 0.8);
  outline-offset: 2px;
  border-radius: 2px;
}

.content-card p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.55;
  color: #a1a1aa;
}

.content-card__back {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.content-card__back .btn {
  width: auto;
}

@media (max-width: 560px) {
  .rules-page {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .rules-back {
    font-size: 0.85rem;
  }

  .content-card {
    width: 100%;
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
  }

  .content-card__title {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
  }

  .content-card h2 {
    font-size: 0.9rem;
  }

  .content-card p {
    font-size: 0.8rem;
  }
}