@font-face {
  font-family: "KufiStandardGK";
  src: url("KufiStandardGK.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07111f;
  --text: #f8fbff;
  --muted: #aebad0;
  --gold: #ffd166;
  --green: #20f08b;
  --red: #ff3b4d;
  --blue: #2aa8ff;
  --cyan: #2ef7ff;
  --line: rgba(255, 255, 255, 0.16);
  --font: "Cairo", "KufiStandardGK", "Tajawal", "IBM Plex Sans Arabic", "Tahoma", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 12%, rgba(42, 168, 255, 0.24), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(32, 240, 139, 0.18), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(255, 59, 77, 0.16), transparent 34%),
    linear-gradient(180deg, #050914 0%, var(--bg) 52%, #0d1020 100%);
  color: var(--text);
  font-family: var(--font);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.join-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  position: relative;
  isolation: isolate;
}

.honey-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.honey-bg span {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--s);
  aspect-ratio: 1;
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  background: color-mix(in srgb, var(--c) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 58%, transparent);
  filter: drop-shadow(0 0 26px var(--c));
  opacity: 0.62;
  animation: floatHex 7s ease-in-out infinite alternate;
  animation-delay: var(--d);
}

.join-card {
  width: min(560px, 100%);
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(9, 18, 34, 0.74);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48),
    0 0 54px rgba(42, 168, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px);
}

.join-card::before {
  content: "";
  position: absolute;
  inset: -40% -30%;
  background:
    radial-gradient(circle at 28% 38%, rgba(255, 59, 77, 0.18), transparent 30%),
    radial-gradient(circle at 74% 42%, rgba(32, 240, 139, 0.2), transparent 34%),
    conic-gradient(from 120deg, rgba(255, 209, 102, 0.16), transparent, rgba(42, 168, 255, 0.2), transparent);
  animation: rotateGlow 18s linear infinite;
  opacity: 0.8;
}

.join-card > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--gold);
  font-weight: 900;
}

.brand img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  box-shadow: 0 0 26px rgba(255, 209, 102, 0.22);
}

.copy {
  margin-top: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-weight: 900;
}

h1 {
  margin: 0;
  font-size: clamp(1.85rem, 5.8vw, 3.25rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.join-form {
  display: grid;
  gap: 13px;
  margin-top: 34px;
}

label {
  color: #e7efff;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(3, 8, 17, 0.72);
  color: #fff;
  font: inherit;
  padding: 12px 18px;
  outline: none;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

input:focus {
  border-color: rgba(46, 247, 255, 0.76);
  box-shadow:
    0 0 0 4px rgba(46, 247, 255, 0.12),
    0 0 32px rgba(46, 247, 255, 0.24);
  transform: translateY(-2px);
}

.room-code {
  direction: ltr;
  text-align: center;
  font-size: clamp(1.7rem, 8vw, 2.7rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-shadow: 0 0 22px rgba(255, 209, 102, 0.34);
}

.recap-wrap {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4px;
}

button {
  min-height: 62px;
  margin-top: 10px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  color: #06101e;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(46, 247, 255, 0.22);
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

button:hover,
button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(46, 247, 255, 0.32);
  filter: saturate(1.18);
  outline: none;
}

button:active {
  transform: translateY(0) scale(0.99);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-note {
  min-height: 28px;
  margin: 2px 0 0;
  color: var(--gold);
  text-align: center;
  font-weight: 800;
}

@keyframes floatHex {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  to {
    transform: translate3d(22px, -42px, 0) rotate(32deg);
  }
}

@keyframes rotateGlow {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 560px) {
  .join-shell {
    padding: 18px;
  }

  .join-card {
    border-radius: 24px;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }
}
