* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Comic Sans MS", "Arial", sans-serif;
  color: white;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(
    135deg,
    #ff4fd8 0%,
    #ff8a00 18%,
    #fff066 34%,
    #58f6ff 52%,
    #8a5cff 72%,
    #ff66b7 100%
  );
  background-size: 300% 300%;
  animation: rainbowFlow 12s ease infinite;
  position: relative;
}

@keyframes rainbowFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 55%;
  }
  100% {
    background-position: 0% 50%;
  }
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.35), transparent 18%),
    radial-gradient(circle at 85% 25%, rgba(255,255,120,0.22), transparent 20%),
    radial-gradient(circle at 50% 80%, rgba(255,105,180,0.22), transparent 22%);
}

body::after {
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.8) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,120,0.8) 1.4px, transparent 1.4px),
    radial-gradient(circle, rgba(255,105,180,0.65) 1px, transparent 1px);
  background-size: 120px 120px, 180px 180px, 240px 240px;
  animation: sparkleDrift 18s linear infinite;
  opacity: 0.45;
}

@keyframes sparkleDrift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(120px);
  }
}

.landing-page,
.desktop-page,
.mobile-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.portal-card,
.device-card {
  width: min(92%, 760px);
  padding: 36px 28px;
  border-radius: 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.18);
  border: 3px solid rgba(255, 245, 140, 0.75);
  box-shadow:
    0 18px 50px rgba(0,0,0,0.16),
    0 0 24px rgba(255,255,255,0.18),
    inset 0 0 18px rgba(255,255,255,0.16);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff7a8;
  text-shadow: 0 0 12px rgba(255,255,255,0.6);
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
  color: #fff48a;
  text-shadow:
    2px 2px 0 #ff4fd8,
    5px 5px 16px rgba(138, 92, 255, 0.55);
}

.subtitle,
.lead {
  max-width: 680px;
  margin: 0 auto 18px;
  font-size: 1.1rem;
  line-height: 1.7;
  text-shadow: 0 0 10px rgba(0,0,0,0.12);
}

.button-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0 12px;
}

.rainbow-btn {
  display: inline-block;
  text-decoration: none;
  color: white;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #ff4fd8,
    #ff8a00,
    #fff066,
    #58f6ff,
    #8a5cff
  );
  background-size: 200% 200%;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  animation: buttonShift 6s ease infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rainbow-btn.alt {
  background: linear-gradient(90deg, #8a5cff, #ff4fd8, #58f6ff);
}

.rainbow-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 28px rgba(0,0,0,0.2);
}

@keyframes buttonShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.tiny-note,
.status-text {
  margin-top: 14px;
  font-size: 0.95rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.feature-card {
  background: rgba(255,255,255,0.16);
  border: 2px solid rgba(255,255,255,0.28);
  border-radius: 22px;
  padding: 18px 14px;
}

.feature-card h3 {
  margin: 0 0 8px;
  color: #fff4a8;
  text-shadow: 2px 2px 0 #ff4fd8;
}

.feature-card p {
  margin: 0;
  line-height: 1.5;
}

.action-btn {
  border: none;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  background: linear-gradient(90deg, #ff66b7, #8a5cff, #ff8a00);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  transition: transform 0.2s ease;
}

.action-btn:hover {
  transform: scale(1.03);
}

.mobile-shell {
  width: min(100%, 380px);
  margin: 24px auto 0;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255,255,255,0.16);
  border: 2px solid rgba(255,255,255,0.28);
}

.mobile-stack {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.mobile-tile {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.16);
  border: 2px solid rgba(255,245,140,0.5);
}

.mobile-tile h3 {
  margin: 0 0 6px;
  color: #fff4a8;
}

.back-link {
  display: inline-block;
  margin-top: 22px;
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .portal-card,
  .device-card {
    padding: 28px 20px;
    border-radius: 24px;
  }

  .button-group {
    flex-direction: column;
    align-items: center;
  }

  .rainbow-btn,
  .action-btn {
    width: 100%;
    max-width: 320px;
  }
}