@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;600&family=Sora:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg: #05070f;
  --surface: rgba(14, 20, 40, 0.78);
  --surface2: rgba(10, 16, 32, 0.62);
  --border: rgba(140, 170, 210, 0.35);
  --text: #eef2ff;
  --text2: #cad6f3;
  --muted: #9fb0c9;
  --accent: #5cf6e3;
  --accent2: #6b7bff;
  --shadow: 0 26px 60px rgba(4, 8, 20, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);

  --font-body: "Sora", sans-serif;
  --font-display: "Space Grotesk", "Sora", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --bg-1: #05070f;
  --bg-2: #0a1024;
  --panel: var(--surface);
  --panel-border: var(--border);
  --card: var(--surface);
  --card-border: var(--border);
  --primary: var(--accent);
  --primary-2: var(--accent2);
  --focus: rgba(92, 246, 227, 0.4);
  --danger: #ff7aa5;
  --cyan: #5cf6e3;
  --teal: #50ddc9;
  --blue: #6ba4ff;
  --violet: #9b8cff;
}

* {
  box-sizing: border-box;
}

body.page-bg {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  position: relative;
  overflow-x: hidden;
}

body.page-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 5px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

body.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(140% 140% at 50% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
    radial-gradient(140% 140% at 50% 100%, rgba(4, 6, 14, 0.7), transparent 60%);
  opacity: 0.45;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

body.galaxy-page,
body.auth-page {
  background: #05070f;
}

body.galaxy-page::before,
body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 5px);
  opacity: 0.08;
  mix-blend-mode: soft-light;
  z-index: 1;
  pointer-events: none;
}

body.galaxy-page::after,
body.auth-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(140% 140% at 50% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
    radial-gradient(140% 140% at 50% 100%, rgba(0, 0, 0, 0.25), transparent 65%);
  opacity: 0.28;
  z-index: 1;
  pointer-events: none;
}

.galaxy-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: normal;
  opacity: 1;
}

body.blur-text main,
body.blur-text .card,
body.blur-text .panel,
body.blur-text .chat-shell,
body.blur-text .settings__card,
body.blur-text .chat__card {
  filter: blur(5px);
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.2px;
  color: var(--text);
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.1; font-weight: 700; }
h2 { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.2; font-weight: 600; }
h3 { font-size: clamp(18px, 1.8vw, 24px); line-height: 1.25; font-weight: 600; }

p {
  margin: 0 0 0.8em;
  color: var(--text2);
}

small {
  font-size: 12px;
  color: var(--muted);
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

.page {
  position: relative;
  z-index: 3;
  width: min(1100px, 92vw);
  margin: 0 auto;
  display: grid;
  gap: 24px;
  padding: 32px 0 60px;
}

.auth-layout {
  display: grid;
  place-items: center;
  padding: 40px 20px 60px;
  position: relative;
  z-index: 3;
}

.auth-layout::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at center, rgba(8, 10, 20, 0) 0%, rgba(8, 10, 20, 0.2) 55%, rgba(8, 10, 20, 0.35) 100%);
  z-index: 0;
  pointer-events: none;
}

.page-bg .glass-card,
.page-bg .panel,
.page-bg .card,
.page-bg .chat-shell,
.page-bg .settings__card,
.page-bg .chat__card,
.page-bg .user-card__panel,
.page-bg .media-viewer__content,
.page-bg .chat-sidebar,
.page-bg .chat__list,
.page-bg .screen-wrapper,
.page-bg .settings__input,
.page-bg .chat__input,
.page-bg .chat__media-input,
.page-bg .chat__input,
.page-bg .input {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(160%);
  position: relative;
  z-index: 3;
}

.glass-card {
  border-radius: 20px;
  padding: 22px;
}

.hero-card {
  padding: 34px;
  display: grid;
  gap: 18px;
}

.hero-card .card-text {
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions a {
  text-decoration: none;
}

.hero-actions .pill-button,
.hero-actions .button-secondary {
  min-height: 44px;
}

.muted-note {
  font-size: 13px;
  color: var(--muted);
}

.auth-card {
  width: min(520px, 92vw);
  margin: 0 auto;
  padding: 34px 30px 30px;
  border-radius: 24px;
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: linear-gradient(140deg, rgba(55, 60, 110, 0.55), rgba(24, 28, 64, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    0 32px 80px rgba(4, 6, 16, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 46px rgba(140, 120, 255, 0.35);
  backdrop-filter: blur(30px) saturate(160%);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.auth-form,
.row {
  display: grid;
  gap: 14px;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.24), transparent 45%);
  pointer-events: none;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    inset 0 0 26px rgba(255, 255, 255, 0.12),
    0 0 52px rgba(140, 120, 255, 0.28);
  pointer-events: none;
}

.auth-card:hover {
  transform: translateY(-2px);
  border-color: rgba(180, 200, 255, 0.6);
  box-shadow:
    0 40px 90px rgba(4, 6, 16, 0.65),
    0 0 0 1px rgba(180, 200, 255, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.page-bg .title {
  font-size: clamp(42px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 2px 0 6px;
  color: var(--text);
}

.auth-subtitle {
  font-size: 18px;
  color: var(--text2);
  margin: 18px 0 10px;
}

.page-bg .field {
  display: grid;
  gap: 8px;
}

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

.page-bg .input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(140, 170, 210, 0.4);
  background: rgba(8, 14, 28, 0.6);
  color: var(--text);
  font-size: 15px;
}

.page-bg .input::placeholder {
  color: rgba(202, 214, 243, 0.55);
}

.page-bg .input:focus {
  outline: none;
  border-color: rgba(92, 246, 227, 0.5);
  box-shadow: 0 0 0 3px rgba(92, 246, 227, 0.18);
}

.page-bg .btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(140, 170, 210, 0.35);
  font-weight: 600;
  font-size: 16px;
  min-height: 50px;
  cursor: pointer;
  transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.page-bg .btn:active {
  transform: translateY(1px);
}

.page-bg .separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.page-bg .separator::before,
.page-bg .separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(140, 170, 210, 0.25);
}

.page-bg .muted-link {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0 4px;
}

.page-bg .quick-links {
  display: grid;
  gap: 10px;
}

.page-bg .btn-ghost {
  background: rgba(8, 14, 28, 0.55);
  color: var(--text);
  text-decoration: none;
}

.page-bg .btn-ghost:hover {
  filter: brightness(1.08);
}

.page-bg .error {
  display: none;
  color: #ffd1dc;
  background: rgba(255, 122, 165, 0.08);
  border: 1px solid rgba(255, 122, 165, 0.3);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.card-text {
  font-size: 15px;
  color: var(--text2);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(140, 170, 210, 0.35);
  background: rgba(8, 14, 28, 0.6);
  font-size: 12px;
  color: var(--text);
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(92, 246, 227, 0.6);
}

.pill-button,
.page-bg .btn-primary,
.page-bg .button,
.page-bg .button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(92, 246, 227, 0.45);
  background: linear-gradient(120deg, rgba(92, 246, 227, 0.95), rgba(107, 123, 255, 0.9));
  color: #041017;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(80, 200, 230, 0.35);
}

.pill-button:hover,
.page-bg .btn-primary:hover,
.page-bg .button:hover {
  filter: brightness(1.05);
}

.button-secondary,
.page-bg .btn-secondary,
.page-bg .button.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(140, 170, 210, 0.4);
  background: rgba(12, 20, 36, 0.7);
  color: var(--text);
}

.page-bg .btn-social,
.page-bg .btn-discord {
  border-radius: 999px;
  border: 1px solid rgba(140, 170, 210, 0.35);
  box-shadow: 0 10px 24px rgba(4, 8, 18, 0.4);
}

.page-bg .btn-social {
  background: #f7f9ff;
  color: #151a28;
  box-shadow:
    0 16px 34px rgba(8, 12, 24, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.page-bg .btn-discord {
  background: linear-gradient(120deg, #6a6cff, #4b5dff 55%, #3b42e2);
  background-size: 160% 160%;
  color: #eef2ff;
  border-color: rgba(140, 170, 210, 0.45);
  box-shadow:
    0 18px 36px rgba(36, 48, 140, 0.45),
    0 0 26px rgba(120, 140, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.page-bg .btn-social:hover,
.page-bg .btn-discord:hover,
.page-bg .btn-ghost:hover {
  transform: scale(1.015);
  box-shadow: 0 18px 40px rgba(36, 48, 140, 0.45);
}

.page-bg .btn-discord:hover {
  background-position: 80% 20%;
}

.page-bg .btn-discord::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -80%;
  width: 60%;
  height: 160%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-120%) rotate(12deg);
  opacity: 0;
}

.page-bg .btn-discord:hover::before {
  opacity: 1;
  animation: button-shine 0.6s ease;
}

.page-bg .btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(92, 246, 227, 0.35),
    0 12px 26px rgba(36, 48, 140, 0.35);
}

@keyframes button-shine {
  0% { transform: translateX(-120%) rotate(12deg); }
  100% { transform: translateX(220%) rotate(12deg); }
}

.link-line {
  position: relative;
  color: var(--text2);
}

.link-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(92, 246, 227, 0.8), rgba(107, 123, 255, 0.8));
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: left;
  transition: opacity 220ms ease, transform 220ms ease;
}

.link-line:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.list-row {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  transition: transform 0.2s ease, color 0.2s ease;
}

.list-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(140, 170, 210, 0.6);
  background: linear-gradient(140deg, rgba(92, 246, 227, 0.5), rgba(10, 16, 32, 0.3));
  box-shadow: 0 0 10px rgba(92, 246, 227, 0.4);
}

.list-row:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.accordion {
  display: grid;
  gap: 10px;
}

.accordion__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(140, 170, 210, 0.4);
  background: rgba(8, 14, 28, 0.6);
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: var(--font-mono);
  cursor: pointer;
}

.accordion__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(92, 246, 227, 0.45);
  color: var(--accent);
  font-size: 14px;
}

.accordion__content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.accordion.is-open .accordion__content {
  max-height: 1000px;
}

.accordion.is-open .accordion__icon {
  transform: rotate(45deg);
}

.page-bg .menu__item,
.page-bg .chat-sidebar__item,
.page-bg .dm-item {
  background: var(--surface2);
  border: 1px solid var(--border);
}

.page-bg .menu__item.is-active,
.page-bg .chat-sidebar__item.is-active,
.page-bg .dm-item.is-active {
  border-color: rgba(92, 246, 227, 0.6);
  box-shadow: 0 0 18px rgba(92, 246, 227, 0.25);
}

.page-bg .settings__label,
.page-bg .chat__meta,
.page-bg .chat__time,
.page-bg .profile__email,
.page-bg .profile__uuid {
  color: var(--muted);
}

.page-bg .settings__input,
.page-bg .chat__input,
.page-bg .chat__media-input,
.page-bg .input {
  color: var(--text);
  border-radius: 12px;
}

.page-bg .settings__input:focus,
.page-bg .chat__input:focus,
.page-bg .chat__media-input:focus,
.page-bg .input:focus {
  outline: none;
  border-color: rgba(92, 246, 227, 0.5);
  box-shadow: 0 0 0 3px rgba(92, 246, 227, 0.15);
}

.page-bg .chat__content {
  color: var(--text2);
}

@media (max-width: 720px) {
  .page {
    padding: 24px 0 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
