:root {
  --bg: #06070c;
  --card: #111522;
  --card-2: #131a29;
  --accent: #8fa7d8;
  --accent2: #7bc8b9;
  --text: #ffffff;
  --muted: #aab2c2;
  --line: #252d3d;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(circle at top, #131a2d 0%, #07090f 48%, #05060b 100%),
    var(--bg);
}

body.overlay-active {
  overflow: hidden;
}

.launch-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 88% 14%, rgba(157, 191, 227, 0.16), transparent 36%),
    radial-gradient(circle at 10% 86%, rgba(127, 165, 207, 0.14), transparent 34%),
    linear-gradient(168deg, #081019 0%, #102132 58%, #0a121b 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.launch-overlay::before,
.launch-overlay::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(44px);
  opacity: 0.46;
  animation: overlayDrift 10s ease-in-out infinite;
}

.launch-overlay::before {
  width: 320px;
  height: 320px;
  top: -90px;
  right: -90px;
  background: rgba(157, 191, 227, 0.32);
}

.launch-overlay::after {
  width: 300px;
  height: 300px;
  bottom: -110px;
  left: -70px;
  background: rgba(127, 165, 207, 0.28);
  animation-delay: -2.5s;
}

.launch-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.floating-community-cards {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.floating-room-card {
  position: absolute;
  width: clamp(230px, 25vw, 318px);
  border-radius: 18px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 6px 12px rgba(2, 6, 23, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.floating-room-card-outline {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1px;
}

.floating-card-visual {
  position: relative;
  min-height: 228px;
  border-radius: 17px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(140deg, rgba(16, 32, 58, 0.66), rgba(19, 34, 58, 0.68));
}

.floating-card-background-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--card-bg-position, center);
}

.floating-card-image-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 24, 0.14), rgba(2, 6, 24, 0.88));
}

.floating-card-top-row {
  position: relative;
  z-index: 1;
  padding: 8px 8px 0;
}

.floating-card-tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.floating-roleplay-section-badge,
.floating-hot-badge,
.floating-new-badge,
.floating-category-pill,
.floating-stat-pill,
.floating-rp-mode-pill {
  border-width: 1px;
  border-style: solid;
}

.floating-roleplay-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 10px;
  padding: 3px 6px;
  border-color: rgba(194, 218, 242, 0.58);
  background-color: rgba(111, 146, 191, 0.36);
  color: #f0f7ff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.floating-hot-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 10px;
  padding: 3px 6px;
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1;
}

.floating-new-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 10px;
  padding: 3px 6px;
  border-color: rgba(147, 197, 253, 0.52);
  background-color: rgba(59, 130, 246, 0.22);
  color: #dbeafe;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.badge-icon {
  font-size: 9px;
  line-height: 1;
}

.floating-category-pill {
  border-radius: 10px;
  padding: 3px 6px;
  border-color: rgba(215, 231, 250, 0.36);
  background-color: rgba(7, 17, 30, 0.45);
  color: rgba(255, 255, 255, 0.9);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.floating-room-footer-content {
  position: relative;
  z-index: 1;
  padding: 16px 8px 8px;
  display: grid;
  gap: 8px;
}

.floating-room-identity-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.floating-room-avatar-wrap {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background-color: rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
}

.floating-room-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-room-title-wrap {
  flex: 1;
  min-width: 0;
}

.floating-room-name {
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-room-topic {
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-room-stats-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.floating-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 10px;
  background-color: rgba(6, 15, 28, 0.58);
  border-color: rgba(176, 198, 225, 0.26);
}

.floating-stat-icon {
  font-size: 11px;
  line-height: 1;
}

.floating-stat-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.floating-stat-text {
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.floating-rp-mode-pill {
  width: 22px;
  height: 22px;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  display: inline-flex;
  background-color: rgba(111, 146, 191, 0.34);
  border-color: rgba(178, 206, 236, 0.5);
  color: #fde68a;
  font-size: 10px;
}

.card-alpha {
  top: 9%;
  left: 6%;
  animation: floatCardAlpha 22s ease-in-out infinite;
}

.card-beta {
  bottom: 13%;
  left: 11%;
  animation: floatCardBeta 25s ease-in-out infinite;
}

.card-gamma {
  top: 18%;
  right: 7%;
  animation: floatCardGamma 24s ease-in-out infinite;
}

.overlay-content {
  position: relative;
  z-index: 2;
  width: min(950px, 95vw);
  text-align: center;
  animation: overlayEnter 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.overlay-title {
  color: rgba(248, 250, 252, 0.94);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.countdown-strip {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 2vw, 24px);
}

.time-unit {
  min-width: clamp(80px, 16vw, 190px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-number {
  display: block;
  font-size: clamp(56px, 13vw, 138px);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.02em;
  color: #f8fafc;
  text-shadow:
    0 6px 24px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(157, 191, 227, 0.22);
  background: linear-gradient(180deg, #f8fbff 0%, #d2e3f6 72%, #b4cbeb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.time-number.tick {
  animation: numberTick 0.34s ease;
}

.time-label {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.time-divider {
  position: relative;
  width: 1px;
  height: clamp(54px, 8vw, 90px);
  align-self: center;
  background: linear-gradient(
    180deg,
    rgba(157, 191, 227, 0),
    rgba(157, 191, 227, 0.86),
    rgba(157, 191, 227, 0)
  );
}

.time-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(157, 191, 227, 0.9);
  box-shadow: 0 0 14px rgba(157, 191, 227, 0.8);
  animation: dividerPulse 1.6s ease-in-out infinite;
}

.overlay-pulse {
  position: relative;
  width: min(560px, 82vw);
  height: 1px;
  margin: 18px auto 0;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    rgba(157, 191, 227, 0),
    rgba(157, 191, 227, 0.72),
    rgba(157, 191, 227, 0)
  );
}

.overlay-pulse::before {
  content: '';
  position: absolute;
  top: 0;
  left: -130px;
  width: 130px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(157, 191, 227, 0),
    rgba(255, 255, 255, 0.96),
    rgba(157, 191, 227, 0)
  );
  animation: sweepLine 2.8s linear infinite;
}

.overlay-links {
  margin-top: 14px;
  display: inline-flex;
  gap: 10px;
  justify-content: center;
}

.overlay-links a {
  color: #d9e5fb;
  text-decoration: none;
  border: 1px solid #303a50;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(6, 15, 28, 0.36);
  font-size: 12px;
  font-weight: 700;
}

.overlay-links a:hover {
  border-color: #4d6187;
}

.nav,
.hero,
.features,
.footer {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #2e3750;
}

.logo {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.5px;
  color: var(--text);
}

.nav-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  padding: 10px 18px;
  border-radius: 999px;
  color: #0a0f18;
  text-decoration: none;
  font-weight: 700;
}

.hero {
  text-align: center;
  padding: 70px 20px 50px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 620px;
  margin: 0 auto 30px;
}

.cta-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0a0f18;
}

.btn-secondary {
  border: 1px solid #2a3244;
  color: var(--text);
  background: rgba(17, 22, 34, 0.74);
}

.phone-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  perspective: 1200px;
}

.phone {
  width: 260px;
  height: 520px;
  border-radius: 40px;
  padding: 14px;
  background: linear-gradient(145deg, #1c1c2b, #0a0a12);
  box-shadow:
    0 0 40px rgba(139, 92, 246, 0.35),
    0 30px 80px rgba(0, 0, 0, 0.6);
  transform: rotateY(-12deg) rotateX(6deg);
  transition: transform 0.4s ease;
  animation: floatPhone 6s ease-in-out infinite;
}

.phone:hover {
  animation-play-state: paused;
  transform: rotateY(0deg) rotateX(0deg) scale(1.03);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes floatPhone {
  0% {
    transform: translateY(0px) rotateY(-12deg) rotateX(6deg);
  }
  50% {
    transform: translateY(-12px) rotateY(-12deg) rotateX(6deg);
  }
  100% {
    transform: translateY(0px) rotateY(-12deg) rotateX(6deg);
  }
}

.features {
  padding: 34px 0 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  background: linear-gradient(170deg, rgba(143, 167, 216, 0.08), transparent 58%), var(--card);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  transition: 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: #4a5b7e;
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: inline-flex;
  gap: 10px;
}

.footer-links a {
  color: #d9e5fb;
  text-decoration: none;
  border: 1px solid #303a50;
  border-radius: 999px;
  padding: 6px 12px;
}

.footer-links a:hover {
  border-color: #4d6187;
}

@keyframes overlayEnter {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes overlayDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(10px, -16px, 0) scale(1.08);
  }
}

@keyframes floatCardAlpha {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-7deg);
  }
  50% {
    transform: translate3d(30px, 24px, 0) rotate(-2deg);
  }
}

@keyframes floatCardBeta {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(5deg);
  }
  50% {
    transform: translate3d(36px, -18px, 0) rotate(1deg);
  }
}

@keyframes floatCardGamma {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(6deg);
  }
  50% {
    transform: translate3d(-34px, 22px, 0) rotate(1deg);
  }
}

@keyframes numberTick {
  0% {
    transform: translateY(8px) scale(0.98);
    opacity: 0.3;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes dividerPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.55;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
}

@keyframes sweepLine {
  0% {
    left: -130px;
  }
  100% {
    left: calc(100% + 10px);
  }
}

@media (max-width: 1100px) {
  .floating-room-card {
    width: clamp(210px, 32vw, 280px);
    opacity: 0.82;
  }

  .card-beta {
    left: 4%;
  }

  .card-gamma {
    right: 2%;
  }
}

@media (max-width: 840px) {
  .countdown-strip {
    gap: 12px;
  }

  .time-divider {
    height: 54px;
  }

  .card-beta {
    display: none;
  }

  .card-alpha {
    top: 8%;
    left: 4%;
  }

  .card-gamma {
    top: 16%;
    right: 3%;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .phone {
    width: 220px;
    height: 440px;
    border-radius: 34px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .overlay-title {
    margin-bottom: 10px;
  }

  .countdown-strip {
    gap: 8px;
  }

  .time-label {
    margin-top: 8px;
    font-size: 10px;
  }

  .time-divider {
    height: 42px;
  }

  .overlay-pulse {
    margin-top: 14px;
  }

  .floating-room-card {
    width: min(64vw, 230px);
    opacity: 0.74;
  }

  .card-alpha {
    display: block;
    top: 6%;
    left: -14%;
  }

  .card-gamma {
    display: block;
    top: auto;
    bottom: 10%;
    right: -16%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .launch-overlay::before,
  .launch-overlay::after,
  .floating-room-card,
  .time-number.tick,
  .time-divider::after,
  .overlay-pulse::before,
  .phone {
    animation: none !important;
  }

  .phone {
    transform: rotateY(-12deg) rotateX(6deg);
  }
}
