/* ── Launcher: Kaylee's Game World ── */

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

/* Root & body */
:root {
  --pink:       #ff69b4;
  --purple:     #7b2ff7;
  --dark:       #0d0621;
  --card-bg:    #ffffff;
  --radius:     20px;
  --shadow:     0 8px 32px rgba(0,0,0,0.35);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #1a0540 0%, #0d0621 60%);
  font-family: 'Nunito', sans-serif;
  overflow-x: hidden;
}

/* ── Starfield ── */
#stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  animation: twinkle linear infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0;    transform: scale(0.8); }
  50%       { opacity: 0.9; transform: scale(1.2); }
}

/* ── Wrapper ── */
#launcher {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ── Header ── */
.launcher-header {
  text-align: center;
  padding: 48px 0 32px;
}

.launcher-header h1 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin: 0;
  background: linear-gradient(135deg, #fff 10%, var(--pink) 60%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 12px rgba(255,105,180,0.5));
  line-height: 1.15;
}

.launcher-header .crown {
  font-size: clamp(2rem, 5vw, 3.2rem);
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-8px); }
}

.launcher-header p {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255,255,255,0.75);
  margin: 10px 0 0;
  letter-spacing: 0.04em;
}

/* ── Game Grid ── */
#gameGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  padding-top: 8px;
}

/* ── Tiles ── */
.tile {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.tile--available {
  cursor: pointer;
}

.tile--available:hover,
.tile--available:focus-visible {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 48px rgba(255,105,180,0.45);
  outline: none;
}

.tile--available:active {
  transform: translateY(-2px) scale(0.99);
}

/* Art banner */
.tile__art {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile__emoji {
  font-size: 5rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  transition: transform 0.2s ease;
}

.tile--available:hover .tile__emoji {
  transform: scale(1.15) rotate(-5deg);
}

.tile__soon-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* Info section */
.tile__info {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tile__title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.25rem;
  margin: 0 0 2px;
  color: #1a0a2e;
}

.tile__subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.tile__desc {
  font-size: 0.88rem;
  color: #555;
  margin: 0 0 16px;
  line-height: 1.45;
  flex: 1;
}

/* Play button */
.tile__btn {
  font-family: 'Fredoka One', cursive;
  font-size: 1.05rem;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 28px;
  cursor: pointer;
  width: 100%;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(123,47,247,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.tile__btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(123,47,247,0.55);
}

/* Coming Soon state */
.tile--soon .tile__art {
  opacity: 0.75;
  filter: saturate(0.7);
}

.tile__locked {
  font-size: 0.88rem;
  font-weight: 700;
  color: #aaa;
  text-align: center;
  padding: 9px 0;
  border: 2px dashed #ddd;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* ── Responsive tweaks ── */
@media (max-width: 480px) {
  #launcher { padding: 0 12px 48px; }
  .launcher-header { padding: 32px 0 24px; }
  #gameGrid { gap: 18px; }
}
