:root {
  --bg: #070b14;
  --bg-mid: #0c1220;
  --bg-2: #101a2e;
  --panel: rgba(22, 32, 52, 0.72);
  --panel-solid: #161f34;
  --panel-2: rgba(28, 40, 68, 0.85);
  --text: #f4f7fb;
  --muted: #94a3b8;
  --accent: #2ee6be;
  --accent-hot: #5dffce;
  --violet: #a855f7;
  --violet-soft: rgba(168, 85, 247, 0.2);
  --rose: #fb7185;
  --gold: #fbbf24;
  --accent-soft: rgba(46, 230, 190, 0.12);
  --bubble-in: rgba(18, 28, 48, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-bright: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 80px rgba(46, 230, 190, 0.12);
  --radius: 18px;
  --font: "Cairo", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background: rgba(168, 85, 247, 0.35);
  color: var(--text);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(168, 85, 247, 0.22), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 40%, rgba(46, 230, 190, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(251, 113, 133, 0.08), transparent),
    linear-gradient(165deg, var(--bg-mid) 0%, var(--bg) 45%, #050810 100%);
}

.app {
  position: relative;
  min-height: 100%;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) 20px calc(28px + env(safe-area-inset-bottom));
}

.bg-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% -5%, black, transparent 72%);
  opacity: 0.22;
  z-index: 0;
}

.orbs {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: float-orb 18s ease-in-out infinite;
}

.orb--a {
  width: min(420px, 90vw);
  height: min(420px, 90vw);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.55), transparent 70%);
  top: -12%;
  left: -15%;
  animation-delay: 0s;
}

.orb--b {
  width: min(360px, 80vw);
  height: min(360px, 80vw);
  background: radial-gradient(circle, rgba(46, 230, 190, 0.4), transparent 70%);
  top: 35%;
  right: -20%;
  animation-delay: -6s;
}

.orb--c {
  width: min(280px, 70vw);
  height: min(280px, 70vw);
  background: radial-gradient(circle, rgba(251, 113, 133, 0.28), transparent 70%);
  bottom: 5%;
  left: 10%;
  animation-delay: -12s;
}

@keyframes float-orb {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(4%, 3%) scale(1.05);
  }
  66% {
    transform: translate(-3%, 2%) scale(0.96);
  }
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app > *:not(.bg-grid):not(.orbs):not(.noise) {
  position: relative;
  z-index: 3;
}

.topbar--glass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  margin: 4px -4px 0;
  border-radius: var(--radius);
  border: 1px solid var(--line-bright);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: #03120d;
  background: linear-gradient(145deg, #ecfdf5, #5eead4 35%, #14b8a6 72%, #0f766e);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    var(--shadow),
    0 0 32px rgba(46, 230, 190, 0.42);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.topbar__name {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, #fff, #b8e8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar__status {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-hot), var(--accent));
  box-shadow: 0 0 0 0 rgba(46, 230, 190, 0.55);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 230, 190, 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(46, 230, 190, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 230, 190, 0);
  }
}

.hero {
  padding: 26px 0 6px;
}

.hero__frame {
  position: relative;
  padding: 28px 22px 26px;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--line-bright);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 42%, rgba(10, 14, 24, 0.65) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow), var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(ellipse at 30% 0%, rgba(168, 85, 247, 0.25), transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(46, 230, 190, 0.15), transparent 45%);
  pointer-events: none;
}

.hero__badges {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
}

.pill--stars {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.12), rgba(251, 113, 133, 0.08));
  color: #fde68a;
  letter-spacing: 0.02em;
}

.pill--soft {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
}

.hero__eyebrow {
  position: relative;
  margin: 0 0 14px;
}

.hero__eyebrow-inner {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(46, 230, 190, 0.35);
  background: linear-gradient(90deg, rgba(46, 230, 190, 0.15), rgba(168, 85, 247, 0.12));
  color: var(--accent-hot);
  box-shadow: 0 0 24px rgba(46, 230, 190, 0.12);
}

.hero__title {
  position: relative;
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 4.2vw, 2.05rem);
  font-weight: 800;
  line-height: 1.42;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero__title-line {
  color: #e2e8f0;
}

.hero__title-line--dim {
  font-size: 0.88em;
  font-weight: 700;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.hero__highlight {
  background: linear-gradient(110deg, #fde68a 0%, #fb7185 35%, #c084fc 65%, #2ee6be 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(168, 85, 247, 0.25));
}

.hero__lead {
  position: relative;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.82;
  color: #b8c5d6;
  max-width: 58ch;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 26px;
  padding: 0 2px;
}

.stats__note {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.88;
  text-align: center;
}

.stat {
  position: relative;
  padding: 18px 12px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.2));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 40%, rgba(46, 230, 190, 0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.stat--glow {
  border-color: rgba(46, 230, 190, 0.35);
  box-shadow: 0 0 48px rgba(46, 230, 190, 0.1), 0 16px 40px rgba(0, 0, 0, 0.4);
}

.stat__value {
  position: relative;
  display: block;
  font-size: clamp(1.2rem, 3.6vw, 1.55rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__label {
  position: relative;
  display: block;
  margin-top: 6px;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 520px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

.section-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.section-title--glow {
  background: linear-gradient(90deg, #f8fafc, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  width: fit-content;
  max-width: 100%;
}

.regions {
  margin-top: 32px;
  padding: 0 2px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.chip:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.features {
  margin-top: 32px;
  padding: 0 2px;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.65), rgba(15, 23, 42, 0.85));
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at 85% 0%, rgba(168, 85, 247, 0.14), transparent 42%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 230, 190, 0.35);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45), 0 0 40px rgba(46, 230, 190, 0.06);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card__icon {
  font-size: 1.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.feature-card__title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #f1f5f9;
}

.feature-card p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--muted);
}

.rooms {
  margin-top: 32px;
  padding: 0 2px;
}

.rooms__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.rooms__head .section-title {
  margin: 0;
}

.rooms__badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.room-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.room {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(95deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.6));
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.room:hover {
  border-color: rgba(168, 85, 247, 0.3);
  transform: scale(1.01);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.room__live {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #86ffd4, #22c55e);
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.65);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.room__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.room__name {
  font-weight: 800;
  font-size: 0.92rem;
  color: #f8fafc;
}

.room__meta {
  font-size: 0.76rem;
  color: var(--muted);
}

.room__tag {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.35), rgba(251, 113, 133, 0.12));
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.25);
}

.room__tag--muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border-color: var(--line);
}

.ticker {
  margin-top: 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  direction: ltr;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.ticker__viewport {
  overflow: hidden;
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
}

.ticker__set {
  display: flex;
  align-items: center;
  gap: 44px;
  padding: 12px 22px;
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.chat {
  flex: 1;
  margin-top: 30px;
  padding: 10px 2px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-pill {
  align-self: center;
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  margin-bottom: 2px;
}

.msg--in {
  display: flex;
  justify-content: flex-start;
}

.msg__bubble {
  max-width: min(94%, 540px);
  background: var(--bubble-in);
  border-radius: var(--radius) var(--radius) var(--radius) 6px;
  padding: 14px 16px 10px;
  border: 1px solid var(--line-bright);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.msg__bubble--accent {
  background: linear-gradient(145deg, rgba(46, 230, 190, 0.14), rgba(168, 85, 247, 0.08));
  border-color: rgba(46, 230, 190, 0.35);
}

.msg__bubble p {
  margin: 0 0 6px;
  line-height: 1.68;
  font-size: 0.94rem;
}

.msg__hint {
  color: #94a3b8;
  font-size: 0.87rem;
}

.msg__time {
  display: block;
  text-align: left;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 6px;
}

.composer {
  margin-top: 10px;
  padding-top: 14px;
}

.btn {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 14px 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--lux {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(105deg, #34d399 0%, #2ee6be 28%, #22d3ee 55%, #a78bfa 100%);
  color: #04121a;
  box-shadow:
    0 18px 48px rgba(46, 230, 190, 0.35),
    0 0 60px rgba(167, 139, 250, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--lux:hover {
  filter: brightness(1.07) saturate(1.05);
  box-shadow:
    0 22px 56px rgba(46, 230, 190, 0.45),
    0 0 72px rgba(167, 139, 250, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn__sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: translateX(-100%);
  animation: sheen 3.5s ease-in-out infinite;
}

@keyframes sheen {
  0% {
    transform: translateX(-100%);
  }
  45%,
  100% {
    transform: translateX(100%);
  }
}

.btn__label {
  position: relative;
  z-index: 1;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line-bright);
  white-space: nowrap;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 10px 16px;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(46, 230, 190, 0.25);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(22, 32, 52, 0.95);
  color: var(--text);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow), 0 0 40px rgba(46, 230, 190, 0.15);
  border: 1px solid var(--line-bright);
  max-width: calc(100% - 32px);
  text-align: center;
  z-index: 40;
  backdrop-filter: blur(12px);
}

.toast[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .btn__sheen,
  .ticker__track,
  .pulse-dot,
  .room__live {
    animation: none !important;
  }

  .btn__sheen {
    display: none;
  }

  .ticker__viewport {
    overflow: visible;
  }

  .ticker__track {
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }

  .ticker__set {
    flex-wrap: wrap;
    justify-content: center;
    white-space: normal;
    text-align: center;
    width: 100%;
  }

  .ticker__set[aria-hidden="true"] {
    display: none;
  }

  html {
    scroll-behavior: auto;
  }
}
