:root {
  color-scheme: dark;
  --surface: rgba(16, 16, 30, 0.84);
  --surface-strong: rgba(24, 24, 40, 0.95);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f7ff;
  --muted: #b2bad6;
  --accent: #8f6bff;
  --accent-strong: #6f43ff;
  --accent-soft: rgba(143, 107, 255, 0.18);
  --success: #baf7c4;
  --danger: #ffb0b0;
  --warning: #f5d971;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top, rgba(111, 67, 255, 0.22), transparent 32%),
    linear-gradient(160deg, #05050c 0%, #0b0b16 42%, #080812 100%);
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 120px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(7, 7, 16, 0.76);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.server-meta,
.actions,
.cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-item {
  min-width: 120px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.meta-copy {
  color: inherit;
  text-align: left;
}

.meta-copy:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 107, 255, 0.42);
}

.meta-copy:focus-visible,
.bonus-fab:focus-visible,
.bonus-close:focus-visible,
.bonus-input:focus-visible,
.bonus-submit:focus-visible {
  outline: 2px solid rgba(143, 107, 255, 0.9);
  outline-offset: 2px;
}

.meta-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.copy-hint,
.status-hint,
.bonus-note,
.bonus-description,
.bonus-kicker,
.roulette-header span {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.copy-hint {
  color: #cebfff;
}

.meta-status strong[data-state='online'] {
  color: var(--success);
}

.meta-status strong[data-state='offline'] {
  color: var(--danger);
}

.language-switcher {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.lang-btn,
.action-btn,
.bonus-fab,
.bonus-close,
.bonus-submit {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s ease;
}

.lang-btn {
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.lang-btn.active {
  background: var(--accent-soft);
  color: var(--text);
}

.action-btn,
.bonus-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
  color: var(--text);
}

.action-btn:hover,
.bonus-fab:hover,
.bonus-close:hover {
  transform: translateY(-1px);
}

.action-btn.primary,
.bonus-fab {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 16px 30px rgba(111, 67, 255, 0.3);
}

.action-btn.secondary,
.action-btn.tertiary,
.bonus-close,
.bonus-submit:disabled {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.action-btn.large,
.bonus-submit {
  min-height: 54px;
  padding: 0 24px;
}

.hero-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(7, 7, 16, 0.9);
  box-shadow: var(--shadow);
}

.hero-banner {
  position: relative;
  height: 320px;
}

.banner-image,
.banner-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.banner-image {
  object-fit: cover;
}

.banner-overlay {
  background:
    linear-gradient(180deg, rgba(9, 9, 19, 0.1) 0%, rgba(9, 9, 19, 0.78) 100%),
    linear-gradient(90deg, rgba(9, 9, 19, 0.8) 0%, rgba(9, 9, 19, 0.18) 100%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 28px;
  align-items: center;
  padding: 0 28px 32px;
  margin-top: -78px;
}

.logo {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.copy-block {
  padding-top: 12px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #cebfff;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
#bonus-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.02;
}

#bonus-title {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

.lead {
  margin: 18px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.cta-row {
  margin-top: 26px;
}

.bonus-shell {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  justify-items: end;
  gap: 14px;
}

.bonus-fab {
  width: 74px;
  height: 74px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.8rem;
}

.bonus-fab[aria-expanded='true'] {
  box-shadow: 0 0 0 8px rgba(143, 107, 255, 0.16), 0 16px 30px rgba(111, 67, 255, 0.3);
}

.bonus-fab-icon {
  transform: translateY(-1px);
}

.bonus-popover {
  width: min(420px, calc(100vw - 24px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(10, 10, 22, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hidden {
  display: none !important;
}

.bonus-popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bonus-close {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--text);
  flex: 0 0 auto;
}

.bonus-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #cebfff;
}

.bonus-description {
  margin: 14px 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.bonus-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.bonus-form-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
}

.bonus-label {
  font-weight: 700;
}

.bonus-input {
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.bonus-note {
  margin-top: 14px;
  min-height: 20px;
}

.bonus-last-reward {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 217, 113, 0.22);
  border-radius: 18px;
  background: rgba(245, 217, 113, 0.08);
  color: #fff1a6;
  font-weight: 600;
}

.roulette {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.roulette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.roulette-window {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 14, 34, 0.9) 0%, rgba(9, 8, 20, 0.88) 100%);
}

.roulette-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent 0%, var(--warning) 20%, var(--warning) 80%, transparent 100%);
  z-index: 2;
}

.roulette-track {
  display: flex;
  gap: 12px;
  padding: 18px;
  transition: transform 4.5s cubic-bezier(0.12, 0.88, 0.15, 1);
  will-change: transform;
}

.roulette-card {
  flex: 0 0 180px;
  min-height: 110px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.roulette-card.money {
  border-color: rgba(122, 255, 169, 0.28);
  background: linear-gradient(180deg, rgba(122, 255, 169, 0.14) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.roulette-card.darks {
  border-color: rgba(143, 107, 255, 0.34);
  background: linear-gradient(180deg, rgba(143, 107, 255, 0.18) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.roulette-card.darks.rarity-empty {
  border-color: rgba(128, 142, 176, 0.26);
  background: linear-gradient(180deg, rgba(86, 96, 126, 0.22) 0%, rgba(26, 32, 50, 0.62) 100%);
}

.roulette-card.darks.rarity-common {
  border-color: rgba(100, 232, 161, 0.45);
  background: linear-gradient(180deg, rgba(100, 232, 161, 0.24) 0%, rgba(26, 39, 44, 0.64) 100%);
}

.roulette-card.darks.rarity-rare {
  border-color: rgba(94, 181, 255, 0.52);
  background: linear-gradient(180deg, rgba(94, 181, 255, 0.26) 0%, rgba(23, 38, 63, 0.66) 100%);
}

.roulette-card.darks.rarity-epic {
  border-color: rgba(178, 109, 255, 0.56);
  background: linear-gradient(180deg, rgba(178, 109, 255, 0.3) 0%, rgba(41, 26, 62, 0.68) 100%);
}

.roulette-card.darks.rarity-legendary {
  border-color: rgba(255, 187, 79, 0.62);
  background: linear-gradient(180deg, rgba(255, 187, 79, 0.36) 0%, rgba(61, 39, 17, 0.72) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 210, 122, 0.25);
}

.roulette-card strong {
  font-size: 1.05rem;
}

.roulette-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 860px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-content {
    display: block;
    padding-top: 0;
    text-align: center;
  }

  .logo {
    margin-bottom: 24px;
  }

  .copy-block,
  .lead,
  h1 {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-row {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .topbar,
  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-banner {
    height: 220px;
  }

  .hero-content {
    margin-top: -52px;
    padding-bottom: 24px;
  }

  .meta-item,
  .action-btn,
  .action-btn.large,
  .bonus-submit,
  .bonus-input {
    width: 100%;
  }

  .language-switcher {
    width: 100%;
    justify-content: center;
  }

  .lang-btn {
    flex: 1;
  }

  .bonus-shell {
    right: 10px;
    left: 10px;
    bottom: 10px;
    justify-items: stretch;
  }

  .bonus-fab {
    justify-self: end;
  }

  .bonus-popover {
    width: 100%;
  }

  .bonus-form-row {
    grid-template-columns: 1fr;
  }

  .roulette-card {
    flex-basis: 150px;
  }
}

.content-tabs {
  display: flex;
  gap: 12px;
  margin: 0 0 20px;
}

.content-tab {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.content-tab-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.content-tab.active {
  background: linear-gradient(135deg, rgba(255, 122, 61, 0.92), rgba(255, 84, 84, 0.88));
  border-color: transparent;
  color: #fff;
}

.tab-panel[hidden] {
  display: none;
}

.donate-panel {
  margin-top: 8px;
}

.donate-card {
  background: rgba(12, 18, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 24px;
}

.donate-form {
  display: grid;
  gap: 20px;
}

.donate-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.donate-products {
  display: grid;
  gap: 16px;
}

.donate-product-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.donate-product-eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.donate-product-card h3,
.donate-product-description {
  margin: 0;
}

.donate-product-description {
  margin-top: 8px;
  color: var(--muted);
}

.donate-product-footer {
  display: grid;
  gap: 12px;
  justify-items: end;
}

@media (max-width: 720px) {
  .donate-fields {
    grid-template-columns: 1fr;
  }

  .donate-product-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .donate-product-footer {
    width: 100%;
    justify-items: stretch;
  }
}

.donate-toolbar,
.donate-layout,
.donate-filter-group,
.donate-duration-tabs,
.donate-filter-tabs {
  display: grid;
  gap: 14px;
}

.donate-layout {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  align-items: start;
}

.donate-filter-tabs {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.donate-filter-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.donate-product-card {
  width: 100%;
  text-align: left;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.donate-product-card.active {
  border-color: rgba(255, 122, 61, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 122, 61, 0.35);
}

.donate-product-empty {
  cursor: default;
}

.donate-detail {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.donate-price-box {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.donate-price-box strong {
  font-size: 22px;
}

@media (max-width: 900px) {
  .donate-layout {
    grid-template-columns: 1fr;
  }
}

.donate-detail-fields {
  display: grid;
  gap: 10px;
}

.input-group {
  display: grid;
  gap: 6px;
}

.input-error {
  margin: 0;
  min-height: 16px;
  font-size: 0.78rem;
  color: var(--danger);
}

.donate-detail-fields .bonus-input {
  width: 100%;
}

.discord-widget-card,
.donate-recent-card {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 20px;
  display: grid;
  gap: 14px;
}

.discord-widget-frame {
  border: 0;
  width: 100%;
  height: 500px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.25);
}

.donate-recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.donate-recent-controls {
  display: inline-flex;
  gap: 8px;
}

.donate-recent-track {
  min-height: 120px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.donate-recent-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
}

.skeleton-card {
  position: relative;
  overflow: hidden;
  min-height: 88px;
}

.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.2s infinite;
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 700px) {
  .donate-recent-track {
    grid-template-columns: 1fr;
  }
}

.donate-recent-item strong {
  display: block;
  margin-bottom: 6px;
}

.donate-faq-list {
  display: grid;
  gap: 12px;
}

.donate-faq-list article {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.donate-recent-meta {
  font-size: 0.84rem;
  color: var(--muted);
}

#cabinet-profile-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text);
}

.site-legal {
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.site-legal p {
  margin: 0;
}

.site-legal p + p {
  margin-top: 8px;
}

.site-legal a {
  color: #cebfff;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(235, 235, 235, 0.96);
  color: #1c1006;
  box-shadow: var(--shadow);
}

.cookie-banner-inner {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
  align-items: center;
}

.cookie-banner-copy {
  display: grid;
  gap: 8px;
}

.cookie-banner-copy h2,
.cookie-banner-copy p {
  margin: 0;
}

.cookie-banner-link a {
  color: #5e3610;
}

.cookie-banner-actions {
  display: grid;
  gap: 10px;
  min-width: 250px;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.cookie-modal-dialog {
  position: relative;
  width: min(760px, calc(100% - 24px));
  margin: 20px auto;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #f3f3f3;
  color: #17120f;
  border-radius: 16px;
  padding: 18px;
}

#purchase-bonus-modal .cookie-modal-dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(16, 16, 30, 0.98) 0%, rgba(11, 11, 22, 0.98) 100%);
  color: var(--text);
  box-shadow: var(--shadow);
}

#purchase-bonus-modal .cookie-modal-close {
  color: var(--muted);
}

#purchase-bonus-modal .roulette {
  background: rgba(143, 107, 255, 0.08);
  border-color: rgba(143, 107, 255, 0.3);
}

.cookie-modal-close {
  position: sticky;
  top: 0;
  float: right;
  border: 0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  color: #3f2b17;
}

.cookie-option {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid rgba(50, 35, 20, 0.15);
}

.cookie-option p {
  margin: 6px 0 0;
  color: #5b4a3a;
}

.cookie-option input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
}

.cookie-modal-policy {
  margin: 14px 0;
}

.cookie-modal-policy a {
  color: #5e3610;
}

.cookie-save-btn {
  width: 100%;
}

@media (max-width: 900px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner-actions {
    min-width: 0;
  }
}

.admin-shell {
  padding: 32px;
}

.admin-card,
.admin-card-inner {
  background: rgba(12, 18, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.admin-form,
.admin-promo-list {
  display: grid;
  gap: 14px;
}

.admin-promo-delete {
  width: fit-content;
}

.admin-panel-header {
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}