/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', cursive, sans-serif;
  background: linear-gradient(135deg, #1a1a3e 0%, #0f0f3d 50%, #1a1a3e 100%);
  color: white;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Animated Star Background */
.stars,
.stars2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.stars {
  background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="10" cy="10" r="1" fill="white"/><circle cx="60" cy="30" r="1.5" fill="white"/><circle cx="85" cy="70" r="1" fill="white"/><circle cx="30" cy="80" r="1.2" fill="white"/><circle cx="70" cy="50" r="0.8" fill="white"/></svg>') repeat;
  animation: starMove 100s linear infinite;
}

.stars2 {
  background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150"><circle cx="20" cy="40" r="1.5" fill="%23ffeb3b"/><circle cx="90" cy="20" r="1" fill="%23ffeb3b"/><circle cx="50" cy="100" r="1.2" fill="%23ffeb3b"/><circle cx="120" cy="80" r="0.9" fill="%23ffeb3b"/></svg>') repeat;
  animation: starMove 150s linear infinite;
  opacity: 0.6;
}

@keyframes starMove {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-100vh);
  }
}

/* Navigation */
.main-nav {
  position: sticky;
  top: 0;
  background: rgba(26, 26, 62, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
  border-bottom: 3px solid #ffd700;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border: 3px solid #fff;
  border-radius: 10px;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.hamburger span {
  width: 100%;
  height: 4px;
  background: #1a1a3e;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.7);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.nav-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.nav-btn {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.9) 0%, rgba(238, 90, 111, 0.9) 100%);
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  border-right: none;
  padding: 10px 15px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: none;
  flex: 1;
  min-width: 80px;
  justify-content: center;
  min-height: 44px;
  text-wrap: nowrap;
}

/* First nav button: rounded left corners */
.nav-btn:first-child {
  border-top-left-radius: 25px;
  border-bottom-left-radius: 25px;
}

/* Last nav button: rounded right corners + restore right border */
.nav-btn:last-child {
  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;
  border-right: 4px solid rgba(255, 255, 255, 0.3);
}

.nav-btn:hover {
  background: linear-gradient(135deg, rgba(255, 120, 120, 0.9) 0%, rgba(245, 105, 125, 0.9) 100%);
  z-index: 1;
}

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

.parent-btn {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.9) 0%, rgba(142, 68, 173, 0.9) 100%);
}

.parent-btn:hover {
  background: linear-gradient(135deg, rgba(165, 105, 199, 0.9) 0%, rgba(149, 83, 189, 0.9) 100%);
  z-index: 1;
}

.nav-icon {
  font-size: 24px;
}

.nav-text {
  font-size: 16px;
}

/* Reward Counter */
.reward-counter {
  position: fixed;
  top: 80px;
  right: 20px;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border: 4px solid white;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: #1a1a3e;
  z-index: 99;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.star-icon {
  font-size: 28px;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Container and Sections */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
    max-width: 100%;
  }
}

.section {
  min-height: 100vh;
  height: 100vh;
  padding: 60px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

/* Welcome Section */
.welcome-section {
  text-align: center;
}

.main-title {
  font-size: 64px;
  color: #ffd700;
  text-shadow: 3px 3px 0 #ff6b6b, 6px 6px 0 #4ecdc4;
  margin-bottom: 40px;
}

.bounce-in {
  animation: bounceIn 1s ease;
}

@keyframes bounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.astronaut-container {
  margin: 40px 0;
}

.astronaut {
  font-size: 120px;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-30px);
  }
}

.welcome-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
  border: 4px solid #ffd700;
}

/* Profile Picture Frame */
.profile-frame {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 30px auto;
  animation: float 4s ease-in-out infinite;
}

.profile-picture {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid #ffd700;
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), 0 0 60px rgba(78, 205, 196, 0.4);
  position: relative;
  z-index: 1;
}

.profile-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.profile-icon {
  font-size: 80px;
  margin-bottom: 10px;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.profile-text {
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

/* Frame Corners */
.frame-corners {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.corner {
  position: absolute;
  font-size: 40px;
  animation: twinkle 2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.corner.top-left {
  top: -15px;
  left: -15px;
  animation-delay: 0s;
}

.corner.top-right {
  top: -15px;
  right: -15px;
  animation-delay: 0.5s;
}

.corner.bottom-left {
  bottom: -15px;
  left: -15px;
  animation-delay: 1s;
}

.corner.bottom-right {
  bottom: -15px;
  right: -15px;
  animation-delay: 1.5s;
}

@keyframes twinkle {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 0.7;
  }
}

.section-title {
  font-size: 48px;
  color: #4ecdc4;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
  text-align: center;
}

.welcome-text {
  font-size: 28px;
  margin: 15px 0;
  color: #fff;
}

.big-btn {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  border: 4px solid white;
  border-radius: 25px;
  padding: 20px 40px;
  font-size: 28px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  margin: 20px 10px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.5);
  display: inline-block;
}

.big-btn:hover {
  transform: scale(1.15) rotate(-3deg);
  box-shadow: 0 8px 30px rgba(78, 205, 196, 0.7);
}

.big-btn:active {
  transform: scale(0.95);
  animation: shake 0.5s;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-10px) rotate(-5deg);
  }

  75% {
    transform: translateX(10px) rotate(5deg);
  }
}

/* Gallery Section */
.gallery-section {
  background: rgba(255, 107, 107, 0.1);
}

.section-subtitle {
  font-size: 24px;
  text-align: center;
  margin-bottom: 40px;
  color: #ffed4e;
}

/* Gallery Tabs */
.gallery-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  margin-bottom: 30px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.gallery-tab {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.9) 0%, rgba(238, 90, 111, 0.9) 100%);
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  border-right: none;
  padding: 15px 20px;
  font-size: 22px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: none;
  flex: 1;
  justify-content: center;
}

/* First tab: rounded left corners */
.gallery-tab:first-child {
  border-top-left-radius: 25px;
  border-bottom-left-radius: 25px;
}

/* Last tab: rounded right corners + restore right border */
.gallery-tab:last-child {
  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;
  border-right: 4px solid rgba(255, 255, 255, 0.3);
}

/* Desktop: Show text */
.gallery-tab .tab-text {
  display: inline;
}

.gallery-tab:hover {
  background: linear-gradient(135deg, rgba(255, 120, 120, 0.9) 0%, rgba(245, 105, 125, 0.9) 100%);
  z-index: 1;
}

.gallery-tab.active {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-color: white;
  color: #1a1a3e;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  z-index: 2;
}

/* If active is not last, restore its right border */
.gallery-tab.active:not(:last-child) {
  border-right: 4px solid white;
}

/* Gallery Containers */
.gallery-container {
  display: none;
}

.gallery-container.active {
  display: block;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-item {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.gallery-item:hover {
  transform: scale(1.1) rotate(5deg);
  border-color: #ffd700;
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

.planet {
  font-size: 100px;
  margin-bottom: 15px;
  display: inline-block;
  animation: planetFloat 4s ease-in-out infinite;
}

@keyframes planetFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.planet-name {
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  margin-top: 10px;
}

/* Individual planet animations for variety */
.planet.mercury {
  animation: planetFloat 3s ease-in-out infinite;
}

.planet.venus {
  animation: planetFloat 3.5s ease-in-out infinite;
}

.planet.uranus {
  animation: planetFloat 4.5s ease-in-out infinite;
}

.planet.neptune {
  animation: planetFloat 5s ease-in-out infinite;
}

.planet.comet {
  animation: cometFloat 2s ease-in-out infinite;
}

@keyframes cometFloat {

  0%,
  100% {
    transform: translateY(0) rotate(-15deg);
  }

  50% {
    transform: translateY(-25px) rotate(15deg);
  }
}

.planet.star {
  animation: starTwinkle 1.5s ease-in-out infinite;
}

@keyframes starTwinkle {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: scale(1.3) rotate(180deg);
    opacity: 0.7;
  }
}

/* Moon Phase Animations */
.planet.moon-phase {
  animation: moonGlow 3s ease-in-out infinite;
}

@keyframes moonGlow {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
  }

  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.9));
  }
}

/* Moon Phases Grid - 4x2 layout for 8 phases */
.moon-phases-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* Color Items - No Rotation */
.planet.color-item {
  animation: colorPulse 2s ease-in-out infinite;
}

@keyframes colorPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* Spacecraft Animations */
.planet.spacecraft {
  animation: spacecraftHover 2s ease-in-out infinite;
}

@keyframes spacecraftHover {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(-5deg);
  }
}

/* Spacecraft Grid */
.spacecraft-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* Spacecraft Launch Animation */
.spacecraft-launch {
  animation: rocketShake 0.3s ease-in-out infinite;
}

@keyframes rocketShake {

  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }

  25% {
    transform: translateX(-50%) rotate(-2deg);
  }

  75% {
    transform: translateX(-50%) rotate(2deg);
  }
}

/* Fun Fact Popup */
.fun-fact-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  border: 6px solid white;
  border-radius: 30px;
  padding: 30px;
  z-index: 10000;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
  max-width: 500px;
  width: 90%;
}

.fun-fact-popup.show {
  transform: translate(-50%, -50%) scale(1);
  animation: popupBounce 0.5s ease;
}

@keyframes popupBounce {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.fun-fact-content {
  text-align: center;
  position: relative;
}

.fun-fact-title {
  font-size: 36px;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.fun-fact-text {
  font-size: 24px;
  color: white;
  line-height: 1.5;
  margin: 20px 0;
}

.fun-fact-close {
  position: absolute;
  top: -20px;
  right: -20px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  border: 3px solid white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 28px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
}

.fun-fact-close:hover {
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 25px rgba(255, 107, 107, 0.7);
}

/* Video Section */
.video-section {
  background: rgba(78, 205, 196, 0.1);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 15px 0;
}

.video-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 20px;
  border: 3px solid #4ecdc4;
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 40px rgba(78, 205, 196, 0.6);
}

.video-placeholder {
  border-radius: 15px;
  overflow: hidden;
}

.video-placeholder iframe {
  width: 100%;
  height: 240px;
  border: none;
}

.video-title {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  text-align: center;
  margin-top: 10px;
}

/* Game Section */
.game-section {
  background: rgba(155, 89, 182, 0.1);
}

/* Game Tabs */
.game-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.game-tab {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.9) 0%, rgba(142, 68, 173, 0.9) 100%);
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  border-right: none;
  padding: 15px 20px;
  font-size: 22px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: none;
  justify-content: center;
  flex: 1;
}

/* First tab: rounded left corners */
.game-tab:first-child {
  border-top-left-radius: 25px;
  border-bottom-left-radius: 25px;
}

/* Last tab: rounded right corners + restore right border */
.game-tab:last-child {
  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;
  border-right: 4px solid rgba(255, 255, 255, 0.3);
}

/* Inactive tabs: Show only icon */
.game-tab .tab-text {
  display: none;
}

.game-tab:hover {
  background: linear-gradient(135deg, rgba(165, 105, 199, 0.9) 0%, rgba(149, 83, 189, 0.9) 100%);
  z-index: 1;
}

/* Active tab: Show icon + text */
.game-tab.active {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-color: white;
  color: #1a1a3e;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  z-index: 2;
}

.game-tab.active .tab-text {
  display: inline;
}

/* If active is not last, restore its right border */
.game-tab.active:not(:last-child) {
  border-right: 4px solid white;
}

.tab-icon {
  font-size: 24px;
}

.tab-text {
  font-size: 18px;
  white-space: nowrap;
}

/* Game Containers */
.game-container {
  display: none;
}

.game-container.active {
  display: block;
}

.game-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 30px 0;
}

.stat {
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid #ffd700;
  border-radius: 20px;
  padding: 20px 40px;
  font-size: 28px;
}

.stat-label {
  color: #ffed4e;
  font-weight: bold;
  margin-right: 10px;
}

.stat-value {
  color: #fff;
  font-size: 36px;
  font-weight: bold;
}

.game-controls {
  text-align: center;
  margin: 30px 0;
}

.game-area {
  background: rgba(0, 0, 0, 0.3);
  border: 5px solid #ffd700;
  border-radius: 25px;
  min-height: 500px;
  position: relative;
  margin-top: 30px;
  overflow: hidden;
}

.game-instruction {
  font-size: 32px;
  color: #ffed4e;
  text-align: center;
}

.game-object {
  position: absolute;
  font-size: 60px;
  cursor: pointer;
  transition: transform 0.1s;
  animation: gameObjectFloat 2s ease-in-out infinite;
  user-select: none;
}

.game-object:hover {
  transform: scale(1.3);
}

@keyframes gameObjectFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-10px) rotate(10deg);
  }
}

.game-object.clicked {
  animation: clickEffect 0.5s forwards;
}

@keyframes clickEffect {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: scale(2) rotate(360deg);
    opacity: 0;
  }
}

/* Achievement Popup */
.achievement-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border: 6px solid white;
  border-radius: 30px;
  padding: 40px;
  z-index: 1000;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.achievement-popup.show {
  transform: translate(-50%, -50%) scale(1);
  animation: achievementBounce 0.5s;
}

@keyframes achievementBounce {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

.achievement-content {
  text-align: center;
}

.achievement-star {
  font-size: 80px;
  margin-bottom: 20px;
  animation: rotate 2s linear infinite;
}

.achievement-text {
  font-size: 36px;
  font-weight: bold;
  color: #1a1a3e;
}

/* Parent Section */
.parent-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1001;
  display: none;
  overflow-y: auto;
}

.parent-section.active {
  display: block;
}

.parent-content {
  max-width: 800px;
  margin: 50px auto;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  border-radius: 20px;
  padding: 40px;
  position: relative;
  border: 3px solid #9b59b6;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #e74c3c;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #c0392b;
  transform: rotate(90deg);
}

.parent-content h2 {
  color: #9b59b6;
  font-size: 36px;
  margin-bottom: 30px;
  text-align: center;
}

.parent-content h3 {
  color: #3498db;
  font-size: 24px;
  margin-top: 30px;
  margin-bottom: 15px;
}

.parent-info-box {
  color: #ecf0f1;
  font-family: Arial, sans-serif;
  line-height: 1.8;
}

.parent-info-box ul {
  margin-left: 20px;
  margin-top: 10px;
}

.parent-info-box li {
  margin: 10px 0;
}

.sound-controls {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
}

.sound-controls label {
  display: block;
  margin: 15px 0;
  font-size: 18px;
}

.sound-controls input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.sound-controls input[type="range"] {
  width: 200px;
  margin-left: 10px;
}

.reset-btn {
  background: #e74c3c;
  border: 3px solid white;
  border-radius: 15px;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.reset-btn:hover {
  background: #c0392b;
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .memory-grid {
    max-width: 600px;
    gap: 10px;
  }

  .memory-card {
    font-size: 40px;
  }

  .memory-card .card-back,
  .memory-card .card-front {
    font-size: 40px;
  }

  .big-btn {
    font-size: 24px;
    padding: 16px 32px;
    min-width: 44px;
    min-height: 44px;
  }

  .planet {
    font-size: 80px;
  }

  .planet-name {
    font-size: 24px;
  }

  .game-area {
    min-height: 400px;
  }

  .thumbnail-item {
    min-width: 120px;
    height: 120px;
  }

  /* Game Tabs Responsive */
  .game-tabs {
    flex-direction: column;
    padding: 0;
    gap: 0 !important;
    width: 100%;
  }

  .game-tab {
    padding: 14px;
    min-width: 100%;
    border-right: 4px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
    justify-content: flex-start;
    padding-left: 20px;
    margin: 0;
  }

  /* First tab: rounded top corners */
  .game-tab:first-child {
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    border-bottom-left-radius: 0;
  }

  /* Last tab: rounded bottom corners + restore bottom border */
  .game-tab:last-child {
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    border-top-right-radius: 0;
    border-bottom: 4px solid rgba(255, 255, 255, 0.3);
  }

  /* All tabs show text on mobile */
  .game-tab .tab-text {
    display: inline;
  }

  .game-tab.active {
    min-width: 100%;
    padding: 14px 20px;
    border-right: 4px solid white;
  }

  /* If active is not last, restore its bottom border */
  .game-tab.active:not(:last-child) {
    border-right: 4px solid white;
    border-bottom: 4px solid white;
  }

  .tab-icon {
    font-size: 22px;
  }

  .tab-text {
    font-size: 16px;
  }
}

@media (max-width: 768px) {

  /* Enable hamburger menu */
  .hamburger {
    display: flex;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .main-nav {
    position: relative;
    justify-content: center;
    padding: 15px 70px;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    padding: 0;
    gap: 0;
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-btn {
    padding: 15px;
    font-size: 16px;
    min-width: 100%;
    border-right: 4px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
    justify-content: flex-start;
    padding-left: 20px;
    min-height: auto;
  }

  /* First nav button: rounded top corners */
  .nav-btn:first-child {
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    border-bottom-left-radius: 0;
  }

  /* Last nav button: rounded bottom corners + restore bottom border */
  .nav-btn:last-child {
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    border-top-right-radius: 0;
    border-bottom: 4px solid rgba(255, 255, 255, 0.3);
  }

  .nav-icon {
    font-size: 28px;
  }

  /* Show text on mobile */
  .nav-text {
    display: inline;
  }

  /* Sections */
  .section {
    height: auto;
    min-height: auto;
    padding: 40px 0;
  }

  .container {
    padding: 15px;
  }

  /* Welcome Section */
  .main-title {
    font-size: 36px;
    text-shadow: 2px 2px 0 #ff6b6b, 4px 4px 0 #4ecdc4;
    margin-bottom: 30px;
  }

  .section-title {
    font-size: 32px;
  }

  .section-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
  }

  .welcome-text {
    font-size: 20px;
  }

  .welcome-content {
    padding: 25px;
  }

  .astronaut {
    font-size: 70px;
  }

  .profile-frame {
    width: 200px;
    height: 200px;
  }

  .profile-icon {
    font-size: 60px;
  }

  .corner {
    font-size: 30px;
  }

  /* Buttons */
  .big-btn {
    font-size: 20px;
    padding: 14px 28px;
    margin: 15px 5px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Gallery */
  .gallery-tabs {
    flex-direction: column;
    padding: 0;
    gap: 0;
    width: 100%;
  }

  .gallery-tab {
    padding: 14px;
    font-size: 18px;
    min-width: 100%;
    border-right: 4px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
    justify-content: flex-start;
    padding-left: 20px;
  }

  /* First tab: rounded top corners */
  .gallery-tab:first-child {
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    border-bottom-left-radius: 0;
  }

  /* Last tab: rounded bottom corners + restore bottom border */
  .gallery-tab:last-child {
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    border-top-right-radius: 0;
    border-bottom: 4px solid rgba(255, 255, 255, 0.3);
  }

  /* All tabs show text on mobile */
  .gallery-tab .tab-text {
    display: inline;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 30px;
    width: 100%;
  }

  .moon-phases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .spacecraft-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item {
    padding: 15px 5px;
    width: 100%;
  }

  .fun-fact-popup {
    width: 90%;
    padding: 25px;
  }

  .fun-fact-title {
    font-size: 28px;
  }

  .fun-fact-text {
    font-size: 20px;
  }

  .fun-fact-close {
    width: 40px;
    height: 40px;
    font-size: 24px;
    top: -15px;
    right: -15px;
  }

  .planet {
    font-size: 70px;
    margin-bottom: 8px;
  }

  .planet-name {
    font-size: 18px;
  }

  /* Video Section */
  .video-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Personal Media Section */
  .media-preview-container {
    padding: 20px;
  }

  .preview-controls {
    gap: 0;
    max-width: 300px;
  }

  .control-btn {
    padding: 12px;
    font-size: 28px;
    min-width: 50px;
    min-height: 50px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
  }

  /* Mobile: Hide text, show only icon */
  .control-btn .btn-text {
    display: none !important;
  }

  .control-btn .btn-icon {
    display: block !important;
    font-size: 28px;
  }

  .thumbnail-strip {
    gap: 10px;
    padding: 15px;
  }

  .thumbnail-item {
    min-width: 100px;
    height: 100px;
  }

  .thumb-icon {
    font-size: 40px;
  }

  .thumb-label {
    font-size: 14px;
  }

  /* Game Section */
  .game-tabs {
    gap: 10px;
  }

  .game-tab {
    padding: 12px 20px;
    font-size: 18px;
    width: 100%;
    max-width: 300px;
    min-height: 50px;
  }

  .tab-icon {
    font-size: 24px;
  }

  .tab-text {
    font-size: 17px;
  }

  .game-stats {
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
  }

  .stat {
    padding: 15px 30px;
    font-size: 22px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .stat-value {
    font-size: 28px;
  }

  .game-area {
    min-height: 350px;
    border-width: 4px;
  }

  .game-instruction {
    font-size: 24px;
    padding: 20px;
  }

  .game-object {
    font-size: 50px;
  }

  /* Memory Game */
  .memory-grid {
    max-width: 100%;
    padding: 10px;
    gap: 6px;
    width: calc(100% - 30px);
    margin: 20px auto;
    border-width: 4px;
    min-height: 300px;
  }

  .memory-grid.easy,
  .memory-grid.medium,
  .memory-grid.hard {
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
  }

  .memory-card {
    font-size: 24px;
    border-width: 3px;
    width: 100%;
    max-width: 100%;
  }

  .memory-card .card-back,
  .memory-card .card-front {
    font-size: 24px;
  }

  .difficulty-selector {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .difficulty-selector label {
    width: 100%;
    text-align: center;
    margin: 0 !important;
  }

  .difficulty-buttons {
    display: flex;
    width: 100%;
    gap: 8px;
  }

  .difficulty-btn {
    flex: 1;
    max-width: none;
    padding: 12px 10px;
    font-size: 16px;
    min-height: 44px;
  }

  /* Reward Counter */
  .reward-counter {
    width: 60px;
    height: 60px;
    font-size: 16px;
    top: 80px;
    right: 10px;
  }

  .star-icon {
    font-size: 22px;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
  .main-title {
    font-size: 28px;
    text-shadow: 1px 1px 0 #ff6b6b, 2px 2px 0 #4ecdc4;
  }

  .section-title {
    font-size: 26px;
  }

  .section-subtitle {
    font-size: 18px;
  }

  .welcome-text {
    font-size: 18px;
  }

  .welcome-content {
    padding: 20px;
  }

  .astronaut {
    font-size: 60px;
  }

  .profile-frame {
    width: 180px;
    height: 180px;
  }

  .big-btn {
    font-size: 18px;
    padding: 12px 24px;
  }

  .nav-icon {
    font-size: 24px;
  }

  .nav-btn {
    padding: 12px;
    font-size: 14px;
    padding-left: 20px;
    padding: 10px !important;
  }

  .gallery-item {
    padding: 15px;
  }

  .planet {
    font-size: 60px;
  }

  .planet-name {
    font-size: 18px;
  }

  .fun-fact-popup {
    width: 90%;
    padding: 20px;
  }

  .fun-fact-title {
    font-size: 24px;
  }

  .fun-fact-text {
    font-size: 18px;
  }

  .control-btn {
    padding: 12px;
    font-size: 26px;
    min-width: 50px;
    min-height: 50px;
    width: 50px;
  }

  /* Mobile: Hide text, show only icon */
  .control-btn .btn-text {
    display: none !important;
  }

  .control-btn .btn-icon {
    display: block !important;
    font-size: 26px;
  }

  .preview-controls {
    flex-direction: row;
    width: 100%;
    justify-content: center;
    gap: 0;
  }

  .difficulty-selector {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .difficulty-selector label {
    width: 100%;
    text-align: center;
    margin: 0 !important;
    font-size: 18px !important;
  }

  .difficulty-buttons {
    display: flex;
    width: 100%;
    gap: 6px;
  }

  .difficulty-btn {
    flex: 1;
    max-width: none;
    padding: 10px 8px;
    font-size: 14px;
    min-height: 44px;
  }

  .game-tab {
    padding: 10px 16px;
    font-size: 16px;
  }

  .tab-icon {
    font-size: 22px;
  }

  .tab-text {
    font-size: 15px;
  }

  .stat {
    padding: 12px 20px;
    font-size: 20px;
  }

  .stat-value {
    font-size: 24px;
  }

  .game-area {
    min-height: 300px;
  }

  .game-instruction {
    font-size: 20px;
    padding: 15px;
  }

  .game-object {
    font-size: 45px;
  }

  .memory-grid {
    gap: 4px;
    padding: 6px;
    width: calc(100% - 20px);
    margin: 15px auto;
    border-width: 3px;
    min-height: 250px;
    border-radius: 15px;
  }

  .memory-grid.easy,
  .memory-grid.medium,
  .memory-grid.hard {
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
  }

  .memory-card {
    font-size: 18px;
    border-width: 2px;
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
  }

  .memory-card .card-back,
  .memory-card .card-front {
    font-size: 18px;
  }

  .music-keyboard {
    gap: 6px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .music-key {
    width: 100%;
    height: 90px;
  }

  .key-emoji {
    font-size: 24px;
  }

  .key-label {
    font-size: 14px;
  }

  .instrument-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 100%;
  }

  .instrument-btn {
    padding: 10px 18px;
    font-size: 15px;
    min-height: 44px;
    width: 100%;
  }

  .instrument-btn.active {
    transform: scale(1);
  }

  .instrument-btn:hover {
    transform: scale(1);
  }

  .song-btn {
    padding: 10px 18px;
    font-size: 15px;
    min-height: 44px;
  }

  .reward-counter {
    width: 50px;
    height: 50px;
    font-size: 14px;
    top: 75px;
    right: 8px;
  }

  .star-icon {
    font-size: 18px;
  }

  .thumbnail-item {
    min-width: 80px;
    height: 80px;
  }
}

/* Personal Media Section */
.personal-media-section {
  background: rgba(155, 89, 182, 0.1);
}

.media-preview-container {
  background: rgba(0, 0, 0, 0.4);
  border: 5px solid #9b59b6;
  border-radius: 30px;
  padding: 30px;
  margin: 40px 0;
}

.media-preview {
  background: #000;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
}

.preview-placeholder {
  text-align: center;
  color: #fff;
  padding: 40px;
}

.placeholder-icon {
  font-size: 120px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.preview-placeholder p {
  font-size: 28px;
  margin: 15px 0;
}

.placeholder-note {
  font-size: 20px !important;
  color: #ffed4e;
  margin-top: 20px !important;
}

.preview-image {
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 15px;
  animation: fadeIn 0.5s ease;
}

.preview-video {
  max-width: 100%;
  max-height: 600px;
  width: 100%;
  height: auto;
  border-radius: 15px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.preview-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.control-btn {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.9) 0%, rgba(142, 68, 173, 0.9) 100%);
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  border-right: none;
  padding: 15px 10px;
  font-size: 22px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: none;
  flex: 1;
  min-width: 80px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  text-wrap: nowrap;
  overflow: hidden;
}

/* First button: rounded left corners */
.control-btn:first-child {
  border-top-left-radius: 25px;
  border-bottom-left-radius: 25px;
}

/* Last button: rounded right corners + restore right border */
.control-btn:last-child {
  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;
  border-right: 4px solid rgba(255, 255, 255, 0.3);
}

/* Desktop: Show text, hide icon */
.control-btn .btn-text {
  display: inline;
}

.control-btn .btn-icon {
  display: none;
}

.control-btn:hover {
  background: linear-gradient(135deg, rgba(165, 105, 199, 0.9) 0%, rgba(149, 83, 189, 0.9) 100%);
  z-index: 1;
}

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

.reload-btn {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.9) 0%, rgba(255, 237, 78, 0.9) 100%);
  color: #1a1a3e;
  font-weight: bold;
  transition: all 0.3s ease;
}

.reload-btn:hover {
  background: linear-gradient(135deg, rgba(255, 225, 30, 0.9) 0%, rgba(255, 240, 100, 0.9) 100%);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  z-index: 1;
}

.reload-btn:active {
  transform: scale(1.1);
  animation: spin 0.6s ease-in-out;
}

@keyframes spin {
  0% {
    transform: scale(1.1) rotate(0deg);
  }

  100% {
    transform: scale(1.1) rotate(360deg);
  }
}

.reload-videos-btn {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #1a1a3e;
  transition: all 0.3s ease;
}

.reload-videos-btn:hover {
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
  transform: scale(1.2);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.8);
}

.reload-videos-btn:active {
  transform: scale(1.15);
  animation: spin 0.6s ease-in-out;
}

/* Thumbnail Strip */
.thumbnail-strip {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  margin: 30px 0;
  scroll-behavior: smooth;
}

.thumbnail-strip::-webkit-scrollbar {
  height: 10px;
}

.thumbnail-strip::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
  background: #9b59b6;
  border-radius: 10px;
}

.thumbnail-strip::-webkit-scrollbar-thumb:hover {
  background: #8e44ad;
}

.thumbnail-item {
  min-width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.15);
  border: 3px solid #9b59b6;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumbnail-item:hover {
  transform: scale(1.1);
  border-color: #ffd700;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.thumbnail-item.active {
  border-color: #ffd700;
  border-width: 5px;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
  transform: scale(1.05);
}

.thumbnail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #fff;
}

.thumb-icon {
  font-size: 60px;
  margin-bottom: 10px;
}

.thumb-label {
  font-size: 16px;
  font-weight: bold;
}

/* Media Instructions */
.media-instructions {
  background: rgba(255, 255, 255, 0.1);
  border: 3px solid #4ecdc4;
  border-radius: 20px;
  padding: 30px;
  margin-top: 40px;
}

.media-instructions h3 {
  color: #4ecdc4;
  font-size: 28px;
  margin-bottom: 20px;
}

.media-instructions ol {
  color: #fff;
  font-size: 20px;
  line-height: 1.8;
  margin-left: 30px;
}

.media-instructions li {
  margin: 15px 0;
}

.media-instructions code {
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 10px;
  border-radius: 5px;
  color: #ffed4e;
  font-family: 'Courier New', monospace;
  font-size: 16px;
}

/* Video Modal */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

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

.video-modal-content {
  background: linear-gradient(135deg, #1a1a3e 0%, #2d1b69 100%);
  border: 5px solid #ffd700;
  border-radius: 30px;
  padding: 30px;
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.5), 0 0 100px rgba(78, 205, 196, 0.3);
  animation: modalZoomIn 0.3s ease;
}

@keyframes modalZoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  border: 3px solid white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 28px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2001;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
}

.modal-close-btn:hover {
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 25px rgba(255, 107, 107, 0.7);
}

.modal-video-container {
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
}

.modal-video {
  width: 100%;
  max-height: 70vh;
  display: block;
}

/* Custom Video Controls */
.custom-video-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 15px 20px;
  border: 3px solid #4ecdc4;
}

.video-control-btn {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  border: 3px solid white;
  border-radius: 15px;
  width: 50px;
  height: 50px;
  font-size: 24px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-control-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(78, 205, 196, 0.6);
}

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

.video-progress-container {
  flex: 1;
  height: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  border: 2px solid #9b59b6;
  overflow: hidden;
}

.video-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.video-time {
  color: #ffed4e;
  font-size: 18px;
  font-weight: bold;
  min-width: 100px;
  text-align: center;
}

.volume-slider {
  width: 100px;
  height: 10px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  outline: none;
  border: 2px solid #9b59b6;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #ffd700;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #ffd700;
  cursor: pointer;
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.modal-video-title {
  text-align: center;
  color: #4ecdc4;
  font-size: 28px;
  font-weight: bold;
  margin-top: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive Modal */
@media (max-width: 768px) {
  .video-modal-content {
    padding: 20px;
    max-width: 95vw;
  }

  .custom-video-controls {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
  }

  .video-control-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .video-time {
    font-size: 14px;
    min-width: auto;
  }

  .volume-slider {
    width: 80px;
  }

  .modal-video-title {
    font-size: 22px;
  }
}

/* Memory Card Game */
.difficulty-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.difficulty-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid #9b59b6;
  border-radius: 15px;
  padding: 10px 20px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.difficulty-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.difficulty-btn.active {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  border-color: white;
  box-shadow: 0 4px 15px rgba(78, 205, 196, 0.6);
}

.memory-grid {
  display: grid;
  gap: 15px;
  max-width: 800px;
  width: 100%;
  margin: 30px auto;
  padding: 20px;
  min-height: 400px;
  background: rgba(0, 0, 0, 0.3);
  border: 5px solid #ffd700;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.memory-grid.easy {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}

.memory-grid.medium {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}

.memory-grid.hard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}

.game-instruction {
  margin: 40px 0;
}

.memory-card {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  border: 4px solid #ffd700;
  border-radius: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 4px 15px rgba(155, 89, 182, 0.5);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.memory-card:hover:not(.flipped):not(.matched) {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.memory-card .card-back {
  display: block;
  font-size: 60px;
}

.memory-card .card-front {
  display: none;
  font-size: 60px;
}

.memory-card.flipped {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  transform: rotateY(180deg) scale(1.05);
}

.memory-card.flipped .card-back {
  display: none;
}

.memory-card.flipped .card-front {
  display: block;
  transform: rotateY(180deg);
}

.memory-card.matched {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-color: white;
  animation: matchedPulse 0.5s;
  cursor: default;
  opacity: 0.7;
}

.memory-card.matched .card-back {
  display: none;
}

.memory-card.matched .card-front {
  display: block;
}

@keyframes matchedPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

/* Music Game */
.instrument-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: 30px auto;
  flex-wrap: nowrap;
  max-width: 600px;
}

.instrument-btn {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.9) 0%, rgba(142, 68, 173, 0.9) 100%);
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  border-right: none;
  padding: 15px 30px;
  font-size: 22px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: none;
  flex: 1;
  min-width: 80px;
}

/* First instrument button: rounded left corners */
.instrument-btn:first-child {
  border-top-left-radius: 25px;
  border-bottom-left-radius: 25px;
}

/* Last instrument button: rounded right corners + restore right border */
.instrument-btn:last-child {
  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;
  border-right: 4px solid rgba(255, 255, 255, 0.3);
}

.instrument-btn:hover {
  background: linear-gradient(135deg, rgba(165, 105, 199, 0.9) 0%, rgba(149, 83, 189, 0.9) 100%);
  z-index: 1;
}

.instrument-btn.active {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-color: white;
  color: #1a1a3e;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  z-index: 2;
}

/* If active is not last, restore its right border */
.instrument-btn.active:not(:last-child) {
  border-right: 4px solid white;
}

.music-keyboard {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 40px auto;
  padding: 30px;
  background: rgba(0, 0, 0, 0.4);
  border: 5px solid #4ecdc4;
  border-radius: 30px;
  max-width: 900px;
  flex-wrap: wrap;
}

.music-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 240, 240, 0.9) 100%);
  border: 4px solid #4ecdc4;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
  position: relative;
  overflow: hidden;
}

.music-key::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  transition: height 0.15s ease;
  z-index: 0;
}

.music-key:active::before {
  height: 100%;
}

.music-key:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(78, 205, 196, 0.6);
  border-color: #ffd700;
}

.music-key:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: 0 2px 10px rgba(78, 205, 196, 0.8);
}

.music-key.playing {
  animation: keyPress 0.3s ease;
}

@keyframes keyPress {
  0% {
    transform: scale(1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 240, 240, 0.9) 100%);
  }

  50% {
    transform: scale(0.95);
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  }

  100% {
    transform: scale(1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 240, 240, 0.9) 100%);
  }
}

.key-emoji {
  font-size: 40px;
  margin-bottom: 5px;
  z-index: 1;
  position: relative;
}

.key-label {
  font-size: 20px;
  font-weight: bold;
  color: #1a1a3e;
  z-index: 1;
  position: relative;
}

.song-recorder {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.song-recorder .big-btn {
  min-width: 180px;
}

.premade-songs {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  padding: 25px;
  background: rgba(0, 0, 0, 0.3);
  border: 4px solid #e74c3c;
  border-radius: 25px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.song-btn {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.8) 0%, rgba(192, 57, 43, 0.8) 100%);
  border: 4px solid #e74c3c;
  border-radius: 20px;
  padding: 15px 30px;
  font-size: 22px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 8px 0;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.song-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 25px rgba(231, 76, 60, 0.6);
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.song-btn:active {
  transform: translateY(-1px) scale(1.02);
}

/* Responsive Music Game */
@media (max-width: 900px) {
  .music-keyboard {
    gap: 8px;
    padding: 20px;
  }

  .music-key {
    width: 70px;
    height: 100px;
  }

  .key-emoji {
    font-size: 30px;
  }

  .key-label {
    font-size: 16px;
  }

  .instrument-btn {
    padding: 12px 25px;
    font-size: 18px;
  }

  .song-btn {
    padding: 12px 25px;
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .music-keyboard {
    gap: 8px;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .music-key {
    width: 100%;
    height: 100px;
  }

  .key-emoji {
    font-size: 28px;
  }

  .key-label {
    font-size: 16px;
  }

  .instrument-selector {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .instrument-btn {
    font-size: 18px;
    padding: 14px 20px;
    min-width: 100%;
    width: 100%;
    border-right: 4px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
    text-align: left;
  }

  /* First instrument button: rounded top corners */
  .instrument-btn:first-child {
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    border-bottom-left-radius: 0;
  }

  /* Last instrument button: rounded bottom corners + restore bottom border */
  .instrument-btn:last-child {
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    border-top-right-radius: 0;
    border-bottom: 4px solid rgba(255, 255, 255, 0.3);
  }

  .instrument-btn.active {
    padding: 14px 20px;
    font-size: 18px;
    width: 100%;
    border-right: 4px solid white;
  }

  /* If active is not last, restore its bottom border */
  .instrument-btn.active:not(:last-child) {
    border-right: 4px solid white;
    border-bottom: 4px solid white;
  }

  .instrument-btn.active {
    transform: scale(1);
  }

  .instrument-btn:hover {
    transform: scale(1);
  }

  .song-btn {
    padding: 10px 20px;
    font-size: 16px;
  }
}

/* Simon Dit Game */
.simon-sequence {
  background: rgba(0, 0, 0, 0.3);
  border: 5px solid #4ecdc4;
  border-radius: 25px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
  padding: 20px;
}

.simon-flash {
  font-size: 120px;
  animation: simonPulse 0.5s ease;
}

@keyframes simonPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }
}

.simon-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.simon-btn {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  border: 5px solid white;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(155, 89, 182, 0.5);
  min-height: 120px;
}

.simon-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(155, 89, 182, 0.7);
}

.simon-btn.simon-active {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  transform: scale(0.95);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
}

.simon-emoji {
  font-size: 80px;
}

/* Compte les Étoiles Game */
.count-area {
  background: rgba(0, 0, 0, 0.3);
  border: 5px solid #ffd700;
  border-radius: 25px;
  min-height: 300px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  padding: 40px;
}

.count-star {
  font-size: 60px;
  opacity: 0;
  transform: scale(0);
}

@keyframes starAppear {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.count-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.count-option-btn {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  border: 5px solid white;
  border-radius: 25px;
  padding: 30px 50px;
  font-size: 60px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.5);
  min-width: 120px;
}

.count-option-btn:hover {
  transform: scale(1.15) rotate(-3deg);
  box-shadow: 0 8px 30px rgba(78, 205, 196, 0.7);
}

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

.count-celebration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffd700;
  font-weight: bold;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

/* Trouve la Planète Game */
.find-grid {
  display: grid;
  gap: 15px;
  max-width: 800px;
  margin: 30px auto;
  padding: 20px;
  min-height: 400px;
  background: rgba(0, 0, 0, 0.3);
  border: 5px solid #9b59b6;
  border-radius: 25px;
}

.find-grid.easy {
  grid-template-columns: repeat(3, 1fr);
}

.find-grid.medium {
  grid-template-columns: repeat(4, 1fr);
}

.find-grid.hard {
  grid-template-columns: repeat(4, 1fr);
}

.find-card {
  aspect-ratio: 1;
  background: transparent;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  font-size: 60px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.find-card:hover:not(.flipped) {
  transform: scale(1.05);
}

.find-card-front,
.find-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  border-radius: 15px;
  border: 4px solid #9b59b6;
  box-shadow: 0 4px 15px rgba(155, 89, 182, 0.5);
}

.find-card-front {
  background: linear-gradient(135deg, #1a1a3e 0%, #2d1b69 100%);
  transform: rotateY(0deg);
}

.find-card-back {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  transform: rotateY(180deg);
}

/* Planet card gets special golden background */
.find-card[data-has-planet="true"] .find-card-back {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.find-card.flipped {
  transform: rotateY(180deg);
}

.find-card.flipped:hover {
  transform: rotateY(180deg) scale(1.05);
}

@keyframes findSuccess {

  0%,
  100% {
    transform: rotateY(180deg) scale(1);
  }

  50% {
    transform: rotateY(180deg) scale(1.2);
  }
}

/* Alphabet Game */
.alphabet-display {
  background: rgba(0, 0, 0, 0.3);
  border: 5px solid #f39c12;
  border-radius: 25px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0 20px 0;
  padding: 20px;
  position: relative;
}

.alphabet-emoji {
  font-size: 120px;
  animation: alphabetBounce 1s ease infinite;
}

@keyframes alphabetBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

.alphabet-word {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.alphabet-letter {
  display: inline-block;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border: 4px solid white;
  border-radius: 15px;
  padding: 20px 15px;
  font-size: 48px;
  font-weight: bold;
  color: white;
  min-width: 60px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.5);
  text-transform: uppercase;
}

.alphabet-letter.missing {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  animation: alphabetPulse 1s ease infinite;
}

.alphabet-letter.correct {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  animation: alphabetCorrect 0.5s ease;
}

@keyframes alphabetPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

@keyframes alphabetCorrect {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2) rotate(5deg);
  }
}

.alphabet-choices {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.alphabet-choice-btn {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  border: 5px solid white;
  border-radius: 25px;
  padding: 30px 40px;
  font-size: 60px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(155, 89, 182, 0.5);
  min-width: 100px;
  text-transform: uppercase;
}

.alphabet-choice-btn:hover {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 8px 30px rgba(155, 89, 182, 0.7);
}

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

.alphabet-celebration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  color: #ffd700;
  font-weight: bold;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  z-index: 10;
  animation: alphabetCelebration 0.5s ease;
}

@keyframes alphabetCelebration {

  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Responsive styles for new games */
@media (max-width: 768px) {
  .simon-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 100%;
  }

  .simon-btn {
    min-height: 100px;
  }

  .simon-emoji {
    font-size: 60px;
  }

  .simon-flash {
    font-size: 80px;
  }

  .count-star {
    font-size: 50px;
  }

  .count-option-btn {
    padding: 20px 40px;
    font-size: 50px;
    min-width: 100px;
  }

  .find-grid.medium,
  .find-grid.hard {
    grid-template-columns: repeat(3, 1fr);
  }

  .find-card {
    font-size: 50px;
  }

  .alphabet-emoji {
    font-size: 90px;
  }

  .alphabet-letter {
    font-size: 36px;
    padding: 15px 10px;
    min-width: 50px;
  }

  .alphabet-choice-btn {
    padding: 20px 30px;
    font-size: 50px;
    min-width: 80px;
  }
}

@media (max-width: 480px) {
  .simon-btn {
    min-height: 80px;
  }

  .simon-emoji {
    font-size: 50px;
  }

  .count-star {
    font-size: 40px;
  }

  .count-option-btn {
    padding: 15px 30px;
    font-size: 40px;
    min-width: 80px;
  }

  .find-card {
    font-size: 40px;
  }

  .alphabet-emoji {
    font-size: 70px;
  }

  .alphabet-letter {
    font-size: 32px;
    padding: 12px 8px;
    min-width: 45px;
  }

  .alphabet-choice-btn {
    padding: 15px 25px;
    font-size: 45px;
    min-width: 70px;
  }
}

/* Print Styles (for parents) */
@media print {

  .stars,
  .stars2,
  .main-nav,
  .reward-counter,
  .game-section {
    display: none;
  }
}
