/* Kids Wonder Arcade Hub Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 10%, #1e1548 0%, #0d0b24 55%, #050412 100%);
  font-family: 'Fredoka', 'Comic Sans MS', system-ui, -apple-system, sans-serif;
  color: #ffffff;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Sparkles */
.stars-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 40px 70px, #fbcfe8, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 90px 40px, #bae6fd, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 160px 120px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.hub-container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.hub-header {
  text-align: center;
  margin-bottom: 36px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.logo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.logo-icon {
  font-size: 1.4rem;
}

.logo-text {
  font-weight: 800;
  font-size: 1.05rem;
  background: linear-gradient(135deg, #f472b6, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.hub-btn {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.hub-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.hub-btn:active {
  transform: scale(0.95);
}

.main-title {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 30%, #ff007f 70%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  text-shadow: 0 4px 20px rgba(255, 140, 0, 0.3);
}

.main-subtitle {
  font-size: 1.2rem;
  color: #cbd5e1;
  font-weight: 600;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-bottom: 40px;
}

/* Game Card */
.game-card {
  position: relative;
  background: rgba(25, 20, 56, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 28px 24px 22px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--card-gradient, linear-gradient(135deg, #ec4899, #8b5cf6));
}

.card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tag-badge {
  background: rgba(236, 72, 153, 0.25);
  color: #fbcfe8;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244, 114, 182, 0.3);
}

.age-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.card-icon-wrap {
  align-self: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.2);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover .card-icon-wrap {
  transform: scale(1.15) rotate(6deg);
}

.card-icon {
  font-size: 3.2rem;
}

.card-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
  text-align: center;
}

.card-desc {
  font-size: 0.98rem;
  color: #cbd5e1;
  line-height: 1.45;
  text-align: center;
  margin-bottom: 18px;
}

.card-features {
  list-style: none;
  margin-bottom: 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.card-features li {
  font-size: 0.88rem;
  color: #e2e8f0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.play-btn {
  margin-top: auto;
  background: var(--card-gradient, linear-gradient(135deg, #ec4899, #8b5cf6));
  padding: 13px 20px;
  border-radius: 999px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.game-card:hover .play-btn {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.5);
}

/* Footer */
.hub-footer {
  text-align: center;
  margin-top: auto;
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 600;
}

/* Parent Install Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  position: relative;
  background: #1e1b4b;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 28px;
  padding: 32px 28px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffd700;
  margin-bottom: 10px;
}

.modal-text {
  font-size: 0.98rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-bottom: 24px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
}

.step-num {
  background: #8b5cf6;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.modal-action-btn {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

@media (max-width: 640px) {
  .main-title {
    font-size: 2.2rem;
  }
  .btn-label {
    display: none;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
}
