:root {
  --bg1: #1a0a3e;
  --bg2: #2d1b69;
  --bg3: #ff6b9d;
  --bg4: #ffc93c;
  --card: rgba(255, 255, 255, 0.96);
  --text: #2b1d4d;
  --muted: #6b5b8a;
  --accent: #ff4d8d;
  --accent2: #4cc9f0;
  --shadow: 0 12px 40px rgba(26, 10, 62, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(145deg, var(--bg1) 0%, var(--bg2) 35%, #4a2c8a 65%, var(--bg3) 100%);
  overflow-x: hidden;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.7;
  animation: twinkle 2.5s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.hero {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
}

.badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--bg4));
  color: #fff;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(255, 77, 141, 0.4);
  animation: bounce 2s ease-in-out infinite;
}

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

.hero h1 {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2.4rem, 8vw, 4rem);
  color: #fff;
  text-shadow: 0 4px 0 #ff4d8d, 0 8px 24px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero .tagline {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.15rem;
  max-width: 520px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.stat {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 0.65rem 1.1rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.filter-btn {
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transition: transform 0.15s, background 0.15s;
}

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

.filter-btn.active {
  background: #fff;
  color: var(--accent);
  box-shadow: var(--shadow);
}

.section-title {
  font-family: "Fredoka", sans-serif;
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.18s, box-shadow 0.18s;
  border: 3px solid transparent;
}

.card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 0 18px 50px rgba(26, 10, 62, 0.3);
  border-color: var(--accent2);
}

.card.soon {
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.88);
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.card-emoji {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
}

.card h3 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f0e8ff;
  color: #6b3fa0;
}

.tag.saga {
  background: #ffe8f3;
  color: #c2185b;
}

.tag.soon-tag {
  background: #fff3cd;
  color: #b8860b;
}

.play-btn {
  margin-top: auto;
  font-family: "Fredoka", sans-serif;
  font-size: 1.05rem;
  border: none;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff8fab);
  box-shadow: 0 6px 0 #d63d74, 0 8px 20px rgba(255, 77, 141, 0.35);
  transition: transform 0.1s, box-shadow 0.1s;
}

.play-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #d63d74;
}

.play-btn:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
  color: #666;
}

.footer {
  text-align: center;
  margin-top: 3rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer a {
  color: #fff;
  font-weight: 700;
}

/* Player page */
body.player-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.player-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(26, 10, 62, 0.95);
  border-bottom: 3px solid var(--accent);
}

.back-btn {
  font-family: "Fredoka", sans-serif;
  text-decoration: none;
  color: #fff;
  background: var(--accent2);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.back-btn:hover {
  filter: brightness(1.08);
}

.player-title {
  font-family: "Fredoka", sans-serif;
  color: #fff;
  font-size: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-frame-wrap {
  flex: 1;
  background: #111;
  position: relative;
}

.player-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  touch-action: none;
}

.empty-state {
  text-align: center;
  color: #fff;
  padding: 3rem 1rem;
  font-size: 1.1rem;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 2.2rem; }
  .grid { grid-template-columns: 1fr; }
}
