@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --xlm-bg: #0f1020;
  --xlm-bg2: #1a1535;
  --xlm-card: rgba(255, 255, 255, 0.06);
  --xlm-glass: rgba(20, 18, 40, 0.72);
  --xlm-text: #eae8f5;
  --xlm-muted: #a8a3c4;
  --xlm-accent: #ff7e5f;
  --xlm-accent2: #feb47b;
  --xlm-violet: #7c5cff;
  --xlm-mint: #5eead4;
  --xlm-radius: 16px;
  --xlm-bar-h: 56px;
  --xlm-dock-h: 0px;
  --xlm-max: 960px;
  --xlm-font: "Noto Sans SC", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--xlm-font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--xlm-text);
  background: var(--xlm-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124, 92, 255, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(255, 126, 95, 0.15), transparent),
    linear-gradient(180deg, var(--xlm-bg) 0%, var(--xlm-bg2) 100%);
  min-height: 100vh;
  padding-top: var(--xlm-bar-h);
}

body.xlm-dock-on {
  padding-top: calc(var(--xlm-bar-h) + var(--xlm-dock-h));
}

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

a {
  color: var(--xlm-mint);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--xlm-accent2);
}

h1, h2, h3 {
  line-height: 1.35;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  margin: 0 0 0.75em;
}

h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  margin: 0 0 0.85em;
  color: #fff;
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5em;
  color: var(--xlm-accent2);
}

p {
  margin: 0 0 1em;
  color: var(--xlm-muted);
}

/* Header */
.xlm-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--xlm-bar-h);
  background: var(--xlm-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.3s;
}

.xlm-bar.xlm-shadow {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.xlm-bar-wrap {
  max-width: var(--xlm-max);
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.xlm-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.xlm-logo img {
  border-radius: 10px;
}

.xlm-nav-d {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.xlm-nav-d a {
  color: var(--xlm-muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.xlm-nav-d a:hover,
.xlm-nav-d a.xlm-on {
  color: #fff;
  background: rgba(124, 92, 255, 0.2);
}

.xlm-ham {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.xlm-ham i {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.xlm-ham.xlm-open i:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.xlm-ham.xlm-open i:nth-child(2) {
  opacity: 0;
}

.xlm-ham.xlm-open i:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.xlm-nav-m {
  position: fixed;
  top: var(--xlm-bar-h);
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--xlm-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s, opacity 0.3s;
}

.xlm-nav-m.xlm-show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.xlm-nav-m ul {
  list-style: none;
  margin: 0;
  padding: 12px 16px 16px;
}

.xlm-nav-m a {
  display: block;
  padding: 12px 8px;
  color: var(--xlm-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.xlm-nav-m a.xlm-on {
  color: var(--xlm-accent);
}

/* Fixed download dock */
.xlm-dock {
  position: fixed;
  top: var(--xlm-bar-h);
  left: 0;
  right: 0;
  z-index: 998;
  background: rgba(15, 16, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s, opacity 0.35s;
}

.xlm-dock.xlm-show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.xlm-dock-grid,
.xlm-ad-grid {
  max-width: var(--xlm-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.xlm-ad-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}

.xlm-ad-grid img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: block;
  background: rgba(124, 92, 255, 0.18);
}

.xlm-ad-grid span {
  font-size: 10px;
  color: var(--xlm-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

@media (min-width: 768px) {
  .xlm-nav-d {
    display: flex;
  }

  .xlm-ham {
    display: none;
  }

  .xlm-dock-grid,
  .xlm-ad-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .xlm-ad-grid img {
    width: 48px;
    height: 48px;
  }
}

/* Promo ads zone */
.xlm-promo {
  padding: 8px 12px 4px;
  max-width: var(--xlm-max);
  margin: 0 auto;
}

/* Hero */
.xlm-hero {
  position: relative;
  padding: 32px 16px 40px;
  overflow: hidden;
}

.xlm-hero-glow {
  position: absolute;
  inset: -20% -10%;
  background: conic-gradient(from 200deg at 50% 50%, var(--xlm-violet), var(--xlm-accent), var(--xlm-mint), var(--xlm-violet));
  opacity: 0.12;
  filter: blur(60px);
  animation: xlm-spin 20s linear infinite;
}

@keyframes xlm-spin {
  to { transform: rotate(360deg); }
}

.xlm-hero-inner {
  position: relative;
  max-width: var(--xlm-max);
  margin: 0 auto;
  padding: 28px 20px;
  background: var(--xlm-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.xlm-hero-sub {
  font-size: 1rem;
  margin: 0;
}

/* Main content */
.xlm-main {
  max-width: var(--xlm-max);
  margin: 0 auto;
  padding: 0 16px 48px;
}

.xlm-block {
  margin-bottom: 40px;
  padding: 24px 20px;
  background: var(--xlm-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--xlm-radius);
  animation: xlm-fade 0.6s ease both;
}

@keyframes xlm-fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.xlm-split {
  display: grid;
  gap: 20px;
}

.xlm-split-reverse .xlm-split {
  direction: rtl;
}

.xlm-split-reverse .xlm-split > * {
  direction: ltr;
}

.xlm-fig {
  margin: 0;
  text-align: center;
}

.xlm-fig img {
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.xlm-fig figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--xlm-muted);
}

.xlm-fig-center {
  margin-top: 20px;
}

.xlm-fig-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.xlm-fig-row img {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 640px) {
  .xlm-split {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
}

/* Tiles */
.xlm-tiles {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.xlm-tiles-4 {
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 640px) {
  .xlm-tiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .xlm-tiles-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.xlm-tile {
  padding: 16px;
  background: rgba(124, 92, 255, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(124, 92, 255, 0.2);
}

.xlm-tile p {
  margin: 0;
  font-size: 0.92rem;
}

.xlm-duo-cards {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .xlm-duo-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.xlm-duo-cards article {
  padding: 16px;
  background: rgba(255, 126, 95, 0.08);
  border-radius: 12px;
  border-left: 3px solid var(--xlm-accent);
}

.xlm-duo-cards p {
  margin: 0;
  font-size: 0.92rem;
}

/* CTA */
.xlm-block-cta {
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(255, 126, 95, 0.15));
  border-color: rgba(124, 92, 255, 0.3);
}

.xlm-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.xlm-btn {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--xlm-accent), var(--xlm-violet));
  color: #fff !important;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(255, 126, 95, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.xlm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 126, 95, 0.45);
  color: #fff !important;
}

.xlm-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.xlm-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

/* Breadcrumb */
.xlm-crumb {
  max-width: var(--xlm-max);
  margin: 16px auto 0;
  padding: 0 16px;
  font-size: 0.85rem;
  color: var(--xlm-muted);
}

.xlm-crumb a {
  color: var(--xlm-muted);
}

.xlm-crumb-sep {
  margin: 0 8px;
  opacity: 0.5;
}

/* Legal pages */
.xlm-legal section {
  margin-bottom: 28px;
}

.xlm-legal h1 {
  margin-bottom: 1.2em;
}

/* Error pages */
.xlm-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}

.xlm-error-box {
  text-align: center;
  padding: 40px 24px;
  background: var(--xlm-card);
  border-radius: var(--xlm-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.xlm-error-code {
  font-size: 4rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, var(--xlm-accent), var(--xlm-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Footer */
.xlm-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 16px;
  margin-top: 24px;
  background: rgba(0, 0, 0, 0.25);
}

.xlm-foot-inner {
  max-width: var(--xlm-max);
  margin: 0 auto;
  text-align: center;
}

.xlm-foot-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.xlm-foot-nav a {
  color: var(--xlm-muted);
  font-size: 0.9rem;
}

.xlm-foot-nav a.xlm-on {
  color: var(--xlm-accent);
}

.xlm-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--xlm-muted);
  opacity: 0.7;
}
