@import url('https://fonts.googleapis.com/css2?family=Bubblegum+Sans&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --pink: #ff9ec6;
  --blue: #7ec8e3;
  --green: #a8e06c;
  --yellow: #ffe066;
  --violet: #c9a0dc;
  --orange: #ffb347;
  --pink-light: #ffe0ef;
  --blue-light: #e0f4ff;
  --green-light: #e8ffd0;
  --yellow-light: #fff8d0;
  --violet-light: #f0e0ff;
}

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

body {
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #ffe0ef 0%, #e0f4ff 30%, #e8ffd0 60%, #fff8d0 100%);
  overflow-x: hidden;
  color: #4a3560;
}

/* ── Floating background shapes ── */
.bg-shapes { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.bg-shapes span {
  position: absolute;
  display: block;
  opacity: .18;
  animation: floaty 18s ease-in-out infinite alternate;
}
.bg-shapes .cloud1 { top: 8%; left: 5%; font-size: 5rem; animation-delay: 0s; }
.bg-shapes .cloud2 { top: 60%; right: 8%; font-size: 4rem; animation-delay: -4s; }
.bg-shapes .star1  { top: 20%; right: 15%; font-size: 3rem; animation-delay: -2s; }
.bg-shapes .star2  { bottom: 15%; left: 12%; font-size: 3.5rem; animation-delay: -6s; }
.bg-shapes .star3  { top: 45%; left: 50%; font-size: 2.5rem; animation-delay: -8s; }
.bg-shapes .rainbow { top: 5%; right: 30%; font-size: 4.5rem; animation-delay: -3s; }
.bg-shapes .heart  { bottom: 25%; right: 25%; font-size: 3rem; animation-delay: -5s; }

@keyframes floaty {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-30px) rotate(5deg); }
  100% { transform: translateY(10px) rotate(-3deg); }
}

/* ── Header ── */
header {
  position: relative; z-index: 1;
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.logo {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 3.2rem;
  background: linear-gradient(90deg, #ff6b9d, #ff9a56, #ffd93d, #6bcb77, #4d96ff, #9b59b6);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-shift 4s linear infinite;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,.08));
}

@keyframes rainbow-shift {
  to { background-position: 200% center; }
}

.subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: .3rem;
  color: #7c5caa;
}

/* ── App Grid ── */
.app-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

/* ── Card ── */
.card {
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(6px);
  border-radius: 1.5rem;
  padding: 2rem 1.2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border: 3px solid transparent;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
}
.card:nth-child(1):hover { border-color: var(--pink); }
.card:nth-child(2):hover { border-color: var(--blue); }
.card:nth-child(3):hover { border-color: var(--green); }
.card:nth-child(4):hover { border-color: var(--violet); }
.card:nth-child(5):hover { border-color: var(--orange); }
.card:nth-child(6):hover { border-color: var(--yellow); }
.card:nth-child(7):hover { border-color: var(--blue); }
.card:nth-child(8):hover { border-color: var(--violet); }

.card-icon {
  font-size: 3.5rem;
  line-height: 1;
  animation: wiggle 3s ease-in-out infinite;
  animation-play-state: paused;
}
.card:hover .card-icon { animation-play-state: running; }

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

.card-title {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.3rem;
}

.card-desc {
  font-size: .92rem;
  font-weight: 600;
  opacity: .75;
  line-height: 1.3;
}

/* ── Coming soon cards ── */
.card.coming-soon {
  opacity: .55;
  cursor: default;
  filter: grayscale(.3);
}
.card.coming-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}
.card.coming-soon .card-icon { animation-play-state: paused !important; }

.badge-soon {
  position: absolute;
  top: .8rem; right: -.6rem;
  background: var(--orange);
  color: #fff;
  font-family: 'Bubblegum Sans', cursive;
  font-size: .85rem;
  padding: .2rem .9rem;
  border-radius: 1rem;
  transform: rotate(12deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ── Sparkle particles ── */
.sparkles { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.sparkle {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--yellow);
  border-radius: 50%;
  opacity: 0;
  animation: sparkle-float 6s ease-in-out infinite;
}
.sparkle:nth-child(2) { left: 20%; animation-delay: 1s; background: var(--pink); }
.sparkle:nth-child(3) { left: 45%; animation-delay: 2.5s; background: var(--blue); }
.sparkle:nth-child(4) { left: 70%; animation-delay: 3.5s; background: var(--green); }
.sparkle:nth-child(5) { left: 90%; animation-delay: 4.5s; background: var(--violet); }
.sparkle:nth-child(1) { left: 10%; }

@keyframes sparkle-float {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  20%  { opacity: .7; }
  80%  { opacity: .5; }
  100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

/* ── Footer ── */
footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
  color: #9b7cc0;
}
footer .safe { font-size: .82rem; opacity: .7; margin-top: .3rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .logo { font-size: 2.2rem; }
  .subtitle { font-size: 1rem; }
  .app-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; padding: 0 1rem; }
  .card { padding: 1.4rem .8rem 1.2rem; }
  .card-icon { font-size: 2.8rem; }
  .card-title { font-size: 1.1rem; }
  .card-desc { font-size: .82rem; }
}

@media (min-width: 900px) {
  .app-grid { grid-template-columns: repeat(4, 1fr); }
}
