:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #000000;
  color: #f8fafc;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #000000;
}

body {
  overflow-x: hidden;
  position: relative;
  background: #000000;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #000000;
  opacity: 1;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.loading-screen.is-hidden {
  opacity: 0;
}

.loading-logo {
  width: min(320px, 70vw);
  height: auto;
  display: block;
  animation: pulseLogo 1.7s ease-in-out infinite;
}

@keyframes pulseLogo {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background: #000000;
  opacity: 1;
}

body::after {
  background: #000000;
  opacity: 1;
}

.dot-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.dot {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--dot-size, 2px);
  height: var(--dot-size, 2px);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 24px rgba(255, 255, 255, 0.36);
  opacity: 0;
  will-change: transform, opacity;
  transform: translate3d(var(--start-x, 0px), var(--start-y, 0px), 0) scale(0.8);
  animation: dotTravel var(--duration, 4s) linear forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes dotTravel {
  0% {
    opacity: 0;
    transform: translate3d(var(--start-x, 0px), var(--start-y, 0px), 0) scale(0.8);
  }
  10% {
    opacity: 0.85;
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--target-x, 0px), var(--target-y, 0px), 0) scale(0);
  }
}


* {
  box-sizing: border-box;
}

button,
a {
  font: inherit;
}

.page,
.modal,
.content-section,
.topbar,
.home-landing {
  position: relative;
  z-index: 2;
}

.page {
  min-height: 100vh;
  padding: 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 0 20px;
  border: none;
  background: transparent;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
}

.brand {
  min-width: 48px;
  min-height: 24px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.nav-actions .btn {
  display: inline-flex;
  white-space: nowrap;
}

.auth-status,
.logout-button {
  display: none !important;
}

.auth-status.is-authenticated,
.logout-button.is-authenticated {
  display: inline-flex !important;
}

.login-button.is-authenticated {
  display: none !important;
}

.auth-status {
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.home-landing {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
}

.landing-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.landing-logo {
  width: min(320px, 70vw);
  height: auto;
  display: block;
}

.site-logo {
  width: 48px;
  height: auto;
  display: block;
}

.hero-buttons,
.contact-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.btn {
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(255,255,255,0.08);
}

.btn:focus,
.btn:focus-visible,
.btn:active {
  outline: none;
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.btn.primary {
  background: #000000;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn.primary:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.btn.secondary,
.btn.ghost,
.btn.transparent {
  background: #000000;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn.secondary:hover,
.btn.ghost:hover,
.btn.transparent:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.space-card {
  position: relative;
  width: min(420px, 80vw);
  aspect-ratio: 1 / 1.05;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.98), #000000 98%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 48px;
  padding: 32px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(255,255,255,0.05);
}

.space-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 50%);
}

.space-stars {
  display: none;
}

.space-panel {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 28px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 40px;
  backdrop-filter: blur(16px);
}

.panel-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.panel-text {
  color: #cbd5e1;
  line-height: 1.75;
}

.content-section {
  max-width: 900px;
  margin: 48px auto 0;
  padding: 32px;
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(8, 8, 8, 0.98), rgba(0, 0, 0, 0.96));
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(255,255,255,0.04);
}

.content-section h2 {
  margin-top: 0;
  font-size: clamp(2rem, 3.5vw, 3rem);
}

.store-actions,
.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 24px 0;
  align-items: stretch;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.24);
  box-shadow: 0 18px 46px rgba(255,255,255,0.08), inset 0 1px 0 rgba(255,255,255,0.08);
}

.product-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 142px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.product-image {
  width: 100%;
  max-width: 112px;
  height: auto;
  display: block;
  border-radius: 18px;
}

.product-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.product-price {
  color: #a5b4fc;
  margin-bottom: 10px;
}

.product-description {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}

.product-buy-btn {
  width: 100%;
  margin-top: auto;
}

.success-content {
  max-width: 760px;
}

.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #e2e8f0;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.success-product {
  margin: 18px 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #a5b4fc;
}

.claim-status {
  margin-top: 14px;
  color: #cbd5e1;
}

.chat-card {
  margin-top: 24px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
}

.chat-header {
  font-weight: 700;
  margin-bottom: 14px;
}

.chat-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.chat-close-btn {
  padding: 10px 16px;
  min-width: 160px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  max-width: 80%;
  line-height: 1.5;
}

.chat-message strong {
  font-size: 0.85rem;
  opacity: 0.8;
}

.chat-message-header,
.admin-ticket-message-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.chat-delete-btn {
  border: 1px solid rgba(255,255,255,0.16);
  background: transparent;
  color: #f8fafc;
  border-radius: 999px;
  padding: 4px 9px;
  cursor: pointer;
  font-size: 0.78rem;
}

.chat-delete-btn:hover {
  background: rgba(255,255,255,0.12);
}

.chat-message.buyer {
  align-self: flex-end;
  background: rgba(255,255,255,0.14);
}

.chat-message.xerticz {
  align-self: flex-start;
  background: rgba(165, 180, 252, 0.16);
}

.chat-form {
  display: flex;
  gap: 10px;
}

.chat-form input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #000000;
  color: #ffffff;
  padding: 12px 16px;
}

.chat-form .btn {
  min-width: 96px;
}

.contact-form input,
.contact-form textarea,
.auth-form input {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.22);
  background: #000000;
  color: #ffffff;
  padding: 16px 18px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder,
.auth-form input::placeholder {
  color: rgba(255,255,255,0.62);
}

.contact-form input:focus,
.contact-form textarea:focus,
.auth-form input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2), 0 0 18px rgba(255,255,255,0.16);
}

.contact-form textarea {
  resize: vertical;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.65);
  z-index: 50;
}

.modal.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.modal-content {
  width: min(540px, calc(100vw - 40px));
  background: #000000;
  border: 1px solid rgba(255,255,255,0.24);
  padding: 32px;
  border-radius: 32px;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 24px 70px rgba(255,255,255,0.08);
}

.close-btn {
  position: absolute;
  right: 18px;
  top: 18px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.tabs {
  display: flex;
  gap: 12px;
  margin: 24px 0 20px;
}

.tab {
  border-radius: 999px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,0.24);
  background: #000000;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tab:hover,
.tab:focus,
.tab:focus-visible,
.tab:active,
.tab.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  outline: none;
  box-shadow: 0 0 16px rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.tab.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(255,255,255,0.18);
}

.auth-feedback {
  margin: 18px 0 0;
  min-height: 22px;
  color: #ffffff;
}

 .discord-cta {
  margin: 24px 0 28px;
  display: flex;
  justify-content: flex-start;
}

.discord-button {
  min-width: 180px;
  justify-content: center;
}

.admin-panel-card {
  position: relative;
  z-index: 3;
  max-width: 980px;
  margin: 24px auto 0;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(12, 12, 12, 0.98), rgba(0, 0, 0, 0.96));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 56px rgba(255,255,255,0.08);
}

.admin-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-panel-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.admin-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-ticket-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}

.admin-ticket-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.admin-ticket-meta {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.admin-ticket-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-ticket-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.admin-ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-ticket-message {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  color: #f8fafc;
}

.admin-ticket-message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.admin-reply-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.admin-reply-form input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #000000;
  color: #ffffff;
  padding: 12px 16px;
}

.admin-feedback {
  margin-top: 8px;
  color: #e2e8f0;
  font-size: 0.92rem;
}

.admin-empty {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  color: #cbd5e1;
}

@media (max-width: 900px) {
  .content-section {
    margin-top: 24px;
  }
}

@media (max-width: 640px) {
  .discord-cta {
    justify-content: stretch;
  }

  .discord-button {
    width: 100%;
  }
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .hero-buttons,
  .nav-actions {
    width: 100%;
    justify-content: stretch;
  }

  .btn {
    width: 100%;
  }

  .chat-form {
    flex-direction: column;
  }

  .chat-message {
    max-width: 100%;
  }

  .admin-reply-form {
    flex-direction: column;
  }
}
