/* =========================================================
   COUKOO FINAL INTRO STYLE
   Mobile-first / Optimized / Premium Glass UI
========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  min-height: 100dvh;
  font-family: "Droid Arabic Kufi", system-ui, sans-serif;
  background: #020202;
  color: #fff;
  font-weight: 400;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  caret-color: transparent;
}
button,
svg,
img {
  -webkit-user-drag: none;
  user-drag: none;
}
button {
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
}
svg {
  shape-rendering: geometricPrecision;
}
/* ================= APP ================= */
.app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(139, 92, 246, 0.16), transparent 32%),
    radial-gradient(
      circle at bottom right,
      rgba(192, 86, 255, 0.08),
      transparent 26%
    ),
    linear-gradient(135deg, #020204, #080811 48%, #0b0814);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
.app.fade-out {
  opacity: 0;
  transform: scale(1.02);
}
.app::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(139, 92, 246, 0.04),
    transparent 65%
  );
  animation: bgMove 10s ease-in-out infinite;
}
.app::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
  opacity: 0.05;
  pointer-events: none;
}
/* ================= DESKTOP WARNING ================= */
.desktop-warning {
  display: none;
}
.desktop-warning-card {
  width: min(90%, 520px);
  min-height: 240px;
  padding: 38px;
  border-radius: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(25, 18, 40, 0.76),
    rgba(10, 7, 18, 0.64)
  );
  border: 1px solid rgba(139, 92, 246, 0.15);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.42),
    0 0 20px rgba(168, 85, 247, 0.08);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
}
.desktop-warning-card h2 {
  font-size: 34px;
  font-weight: 700;
  background: linear-gradient(135deg, #9f67ff, #b56dff, #d2a7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.desktop-warning-card p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.8;
}
/* ================= SCREEN ================= */
.screen {
  position: absolute;
  inset: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px 18px;
  overflow-y: auto;
  overflow-x: hidden;
}
/* ================= PARTICLES ================= */
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(0.4px);
  will-change: transform;
  contain: layout style paint;
  background: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.45);
  animation: particleFloat 10s infinite ease-in-out;
}
.particle-1 {
  left: 10%;
  top: 20%;
}
.particle-2 {
  left: 80%;
  top: 16%;
  animation-delay: 1s;
}
.particle-3 {
  left: 24%;
  top: 74%;
  animation-delay: 2s;
}
.particle-4 {
  display: none;
}
/* ================= CARD ================= */
.card {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 430px;
  padding: 34px 18px calc(30px + env(safe-area-inset-bottom));
  border-radius: 36px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  background: linear-gradient(
    135deg,
    rgba(32, 24, 48, 0.68),
    rgba(8, 8, 14, 0.58)
  );
  border: 1px solid rgba(139, 92, 246, 0.08);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.52),
    0 0 34px rgba(168, 85, 247, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  animation: cardIn 0.65s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  opacity: 0.42;
  background: linear-gradient(
    135deg,
    rgba(192, 86, 255, 0.28),
    transparent,
    rgba(139, 92, 246, 0.18)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    transparent 20%
  );
  pointer-events: none;
}
/* ================= LOGO ================= */
.logo {
  width: 74px;
  height: 74px;
  margin: 10px auto 2px;
  display: grid;
  place-items: center;
  overflow: hidden;
  transform-origin: center;
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: all 0.22s ease;
  animation: floatLogo 6.5s ease-in-out infinite;
}
.logo svg {
  width: 74px;
  height: 74px;
  will-change: filter;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.22))
    drop-shadow(0 0 22px rgba(192, 86, 255, 0.14));
}
.logo-pressed {
  transform: scale(0.94) rotate(-2deg) !important;
}
.logo-head {
  transform-box: fill-box;
  transform-origin: center;
  animation: headPulse 3s ease-in-out infinite;
}
.logo-arm {
  transform-box: fill-box;
  transform-origin: center bottom;
}
.left-arm {
  animation: leftWave 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.right-arm {
  animation: rightWave 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
/* ================= TEXT ================= */
.title {
  margin-top: 10px;
  font-size: clamp(50px, 13vw, 64px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #9f67ff, #b56dff, #d2a7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.2));
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.22);
  will-change: filter;
  animation: titleGlow 4.5s ease-in-out infinite;
}
.subtitle {
  width: 100%;
  max-width: 260px;
  margin: 15px auto 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.desc {
  margin: 20px auto 0;
  max-width: 300px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11.5px;
  line-height: 1.8;
  font-weight: 500;
}
/* ================= FEATURES ================= */
.features {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 0.78fr 1.44fr 0.78fr;
  gap: 8px;
}
.feature {
  min-width: 0;
  height: 42px;
  padding: 1px 5px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  overflow: hidden;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.74);
  font-size: 7.8px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateZ(0);
  transform-style: preserve-3d;
  transition: all 0.22s ease;
}
.feature:hover {
  border-color: rgba(168, 85, 247, 0.18);
}
.feature:active {
  transform: scale(0.95);
  background: rgba(139, 92, 246, 0.12);
}
.feature svg {
  width: 14px;
  height: 14px;
  min-width: 14px;
  flex-shrink: 0;
  overflow: visible;
  color: #c4b5fd;
  margin-top: -1px;
}
.feature-image {
  padding: 1px 8px 0;
}
.feature-image svg {
  width: 15px;
  height: 15px;
  min-width: 15px;
}
.story {
  grid-column: 1 / 4;
  justify-self: center;
  width: max-content;
  min-width: 155px;
  height: 34px;
  padding: 0 14px;
}
/* ================= BUTTONS ================= */
.buttons {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.btn {
  position: relative;
  width: 100%;
  height: 54px;
  min-height: 54px;
  overflow: hidden;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row-reverse;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  isolation: isolate;
  transition:
    transform 0.14s ease,
    filter 0.14s ease,
    opacity 0.14s ease;
}
.btn::after {
  content: "";
  position: absolute;
  top: -120%;
  left: -40%;
  width: 42%;
  height: 320%;
  opacity: 0.8;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.16),
    transparent
  );
  transform: rotate(22deg) translateX(-220%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.btn:hover::after,
.btn:active::after {
  transform: rotate(22deg) translateX(520%);
}
.btn span {
  position: relative;
  z-index: 2;
  margin-top: 1px;
}
.btn svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  opacity: 0.92;
  overflow: visible;
  position: relative;
  z-index: 2;
  margin-top: -1px;
}
.btn:active {
  transform: scale(0.97);
  filter: brightness(1.08);
}
.btn.loading {
  opacity: 0.8;
  pointer-events: none;
  transform: scale(0.98);
  filter: brightness(0.92);
}
.primary {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #b96dff);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 10px 30px rgba(168, 85, 247, 0.26),
    0 0 30px rgba(192, 86, 255, 0.14);
  animation: buttonGlow 4s ease-in-out infinite;
}
.primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent);
  border-radius: inherit;
  pointer-events: none;
}
.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(139, 92, 246, 0.14);
}
.ghost {
  color: #b86cff;
  background: transparent;
  border: 2px solid rgba(139, 92, 246, 0.6);
}
.ghost:hover,
.ghost:active {
  background: rgba(139, 92, 246, 0.08);
}
/* ================= FOOTER ================= */
.footer {
  margin-top: 34px;
  padding-bottom: 8px;
  color: rgba(255, 255, 255, 0.24);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  opacity: 0.42;
  white-space: nowrap;
}
/* ================= MOBILE ================= */
@media (max-width: 420px) {
  .screen {
    padding: 28px 18px env(safe-area-inset-bottom);
    align-items: flex-start;
  }
  .card {
    min-height: 100dvh;
    border-radius: 0;
  }
}
@media (max-width: 360px) {
  .feature {
    font-size: 7.2px;
  }
}
/* ================= DESKTOP ================= */
@media (min-width: 700px) {
  body {
    background: radial-gradient(circle at top, #120d1f, #05050a 60%);
  }
  .screen {
    display: none;
  }
  .desktop-warning {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .particle {
    display: none !important;
  }
}
/* ================= ANIMATIONS ================= */
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-4px) rotate(0.5deg);
  }
}
@keyframes bgMove {
  0%,
  100% {
    transform: translateX(-8%) rotate(0);
  }
  50% {
    transform: translateX(8%) rotate(8deg);
  }
}
@keyframes particleFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.25;
  }
  50% {
    transform: translateY(-26px) scale(1.4);
    opacity: 0.75;
  }
}
@keyframes headPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}
@keyframes leftWave {
  0% {
    transform: rotate(0);
  }
  18% {
    transform: rotate(-18deg);
  }
  36% {
    transform: rotate(4deg);
  }
  52% {
    transform: rotate(-10deg);
  }
  68% {
    transform: rotate(2deg);
  }
  100% {
    transform: rotate(0);
  }
}
@keyframes rightWave {
  0% {
    transform: rotate(0);
  }
  18% {
    transform: rotate(18deg);
  }
  36% {
    transform: rotate(-4deg);
  }
  52% {
    transform: rotate(10deg);
  }
  68% {
    transform: rotate(-2deg);
  }
  100% {
    transform: rotate(0);
  }
}
@keyframes titleGlow {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.14);
  }
  50% {
    text-shadow: 0 0 12px rgba(192, 86, 255, 0.18);
  }
}
@keyframes buttonGlow {
  0%,
  100% {
    box-shadow:
      0 10px 30px rgba(168, 85, 247, 0.2),
      0 0 20px rgba(192, 86, 255, 0.1);
  }
  50% {
    box-shadow:
      0 10px 36px rgba(168, 85, 247, 0.34),
      0 0 34px rgba(192, 86, 255, 0.18);
  }
}
/* ================= REDUCE MOTION ================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
