:root {
  --kids-primary: #ff6b6b;
  --kids-secondary: #feca57;
  --kids-accent: #48dbfb;
  --kids-green: #1dd1a1;
  --kids-purple: #9c88ff;
  --font-kids: 'Fredoka', sans-serif;
  --font-fun: 'Bubblegum Sans', cursive;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-kids);
  color: #2d3436;
  background-color: #f7f9fc;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.header-top {
  background-color: #eff6ff;
  border-bottom: 1px solid #e2e8f0;
  height: 65px;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .header-top {
    height: auto;
    padding: 5px 0;
  }
}

.header-top-flex {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: stretch;
  height: 100%;
}

.header-top-left {
  display: flex;
  height: 100%;
}

.top-tab {
  display: flex;
  align-items: center;
  padding: 0 25px;
  height: 100%;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  border-right: 1px solid #e2e8f0;
  text-decoration: none;
  transition: all 0.3s ease;
}

.top-tab:first-child {
  border-left: 1px solid #e2e8f0;
}

.top-tab.active {
  background-color: white;
}

.top-tab.active:not(.kids-tab) {
  color: #f97316;
}

.kids-tab {
  color: #f43f5e;
  gap: 8px;
}

.kids-tab.active {
  color: #f43f5e;
  background-color: white;
}

.tab-icon {
  height: 18px;
}

.header-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

.top-link {
  color: #0c1b33;
  font-weight: 500;
  text-decoration: none;
}

.divider {
  color: #cbd5e1;
}

.header-main {
  padding: 15px 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--kids-primary);
}

.logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: #2d3436;
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--kids-primary);
}

.cta-kids {
  background: var(--kids-primary);
  color: white !important;
  padding: 10px 25px;
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Hero */
.hero-kids {
  background: linear-gradient(135deg, #ff9f43 0%, #ff6b6b 100%);
  padding: 80px 0 150px;
  position: relative;
  color: white;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 50px;
}

.cloud-badge {
  background: rgba(255, 255, 255, 0.2);
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(5px);
}

.hero-content h1 {
  font-family: var(--font-fun);
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 20px;
}

.text-fun {
  color: var(--kids-secondary);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.hero-actions {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.btn-kids {
  background: var(--kids-secondary);
  color: #574b90;
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 5px 0 #cf9c1c;
  transition: all 0.2s;
}

.btn-kids:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #cf9c1c;
}

.hero-image img {
  width: 100%;
  border-radius: 30px;
  box-shadow: 20px 20px 0 rgba(0, 0, 0, 0.1);
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave svg {
  position: relative;
  display: block;
  width: calc(130% + 1.3px);
  height: 100px;
}

.wave .shape-fill {
  fill: #f7f9fc;
}

/* Features */
.features-kids {
  padding: 80px 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card-kids {
  padding: 40px;
  border-radius: 30px;
  text-align: center;
  transition: transform 0.3s;
}

.card-kids:hover {
  transform: translateY(-10px);
}

.card-kids .icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.bg-yellow {
  background: #fff4cc;
}

.bg-blue {
  background: #dff9fb;
}

.bg-green {
  background: #e3fcef;
}

/* Programs */
.programs-kids {
  padding: 80px 0;
  text-align: center;
}

.title-kids {
  font-family: var(--font-fun);
  font-size: 3rem;
  color: var(--kids-primary);
  margin-bottom: 50px;
}

.course-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.course-card-kids {
  background: var(--kids-purple);
  color: white;
  padding: 40px;
  border-radius: 30px;
  width: 350px;
  position: relative;
  overflow: hidden;
}

.course-card-kids.secondary {
  background: var(--kids-green);
}

.card-inner h3 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.price {
  display: block;
  margin-top: 20px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 10px;
}

footer {
  padding: 40px 0;
  text-align: center;
  background: #2d3436;
  color: white;
  margin-top: 50px;
}

/* Play2Learn Section Redesign */
.play-learn-kids {
  padding: 80px 0;
  background-color: #f7f9fc;
}

.play-learn-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.play-learn-image {
  width: 100%;
  max-width: 1000px;
  /* Larger image */
  transform: rotate(1deg);
  transition: transform 0.3s ease;
}

.play-learn-image:hover {
  transform: rotate(0deg) scale(1.02);
}

.play-learn-image img {
  width: 100%;
  border-radius: 40px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
  border: 20px solid white;
}

.play-learn-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  width: 100%;
  max-width: 1100px;
}

.play-learn-item {
  background: white;
  padding: 40px;
  border-radius: 35px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-bottom: 8px solid var(--kids-secondary);
  text-align: center;
}

.play-learn-item.secondary {
  border-bottom-color: var(--kids-accent);
}

.play-learn-item:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.item-icon {
  font-size: 4rem;
  margin-bottom: 25px;
  display: inline-block;
  animation: bounce-kids 2s infinite ease-in-out;
}

@keyframes bounce-kids {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.play-learn-item h3 {
  font-family: var(--font-fun);
  font-size: 2.5rem;
  color: var(--kids-primary);
  margin-bottom: 20px;
}

.play-learn-item p {
  font-size: 1.15rem;
  color: #4a4a4a;
  line-height: 1.8;
}

@media (max-width: 991px) {
  .play-learn-content {
    grid-template-columns: 1fr;
  }
}

/* Fun Kids Contact Section */
.contact-kids {
  padding: 100px 0;
  background: linear-gradient(to bottom, #f7f9fc 0%, #dff9fb 100%);
  position: relative;
  overflow: hidden;
}

.contact-kids::before {
  content: '🎈';
  position: absolute;
  top: 10%;
  left: 5%;
  font-size: 3rem;
  opacity: 0.3;
  animation: float-kids 4s infinite ease-in-out;
}

.contact-kids::after {
  content: '🚀';
  position: absolute;
  bottom: 10%;
  right: 5%;
  font-size: 3rem;
  opacity: 0.3;
  animation: float-kids 5s infinite ease-in-out reverse;
}

@keyframes float-kids {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(10deg);
  }
}

.contact-kids-card {
  background: white;
  padding: 60px;
  border-radius: 50px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
  max-width: 900px;
  margin: 0 auto;
  border: 4px solid #feca57;
}

.contact-kids-header {
  text-align: center;
  margin-bottom: 50px;
}

.contact-kids-header h2 {
  font-family: var(--font-fun);
  font-size: 3.5rem;
  color: var(--kids-primary);
  margin-bottom: 20px;
}

.kids-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.kids-form-group {
  margin-bottom: 20px;
}

.kids-form-group label {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
  color: #574b90;
  font-size: 1.1rem;
}

.kids-form-group input,
.kids-form-group select {
  width: 100%;
  padding: 18px 25px;
  border: 3px solid #f1f2f6;
  border-radius: 20px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s;
  background-color: #f9f9f9;
}

.kids-form-group input:focus,
.kids-form-group select:focus {
  outline: none;
  border-color: var(--kids-accent);
  background-color: white;
  box-shadow: 0 0 0 5px rgba(72, 219, 251, 0.1);
}

.btn-kids-submit {
  width: 100%;
  background: var(--kids-green);
  color: white;
  padding: 20px;
  border-radius: 50px;
  border: none;
  font-family: var(--font-fun);
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 0 #18b68b;
  transition: all 0.2s;
  margin-top: 20px;
}

.btn-kids-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 0 #18b68b;
}

.btn-kids-submit:active {
  transform: translateY(7px);
  box-shadow: 0 3px 0 #18b68b;
}

@media (max-width: 768px) {
  .kids-form-grid {
    grid-template-columns: 1fr;
  }

  .contact-kids-card {
    padding: 30px;
  }

  .contact-kids-header h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .nav-links {
    display: none;
  }

  .header-top-flex {
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .header-top-left,
  .header-top-right {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    height: auto;
  }

  .top-tab {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.8rem;
    height: auto;
  }

  .top-tab:first-child {
    border-left: 1px solid #e2e8f0;
  }
}

/* Game Section Styles */
.game-kids {
  padding: 80px 0;
  background-color: #fff;
  text-align: center;
}

.subtitle-kids {
  font-size: 1.2rem;
  color: #64748b;
  margin-bottom: 40px;
}

.game-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

#game-container {
  width: 100%;
  max-width: 600px;
  background: #f7f9fc;
  border-radius: 30px;
  padding: 30px;
  position: relative;
  border: 8px solid #eff6ff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

#puzzle-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 15px;
  width: 240px;
  height: 240px;
  margin: 0 auto 30px;
  background: white;
  padding: 10px;
  border-radius: 20px;
  border: 4px dashed #cbd5e1;
}

.puzzle-slot {
  width: 100px;
  height: 100px;
  background: #f1f5f9;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pieces-area {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 20px;
  background: white;
  border-radius: 20px;
  min-height: 120px;
}

.puzzle-piece {
  width: 80px;
  height: 80px;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.1s ease;
}

.puzzle-piece:active {
  cursor: grabbing;
  transform: scale(1.1);
}

#piece1 {
  background-color: var(--kids-primary);
}

#piece2 {
  background-color: var(--kids-secondary);
  color: #574b90;
}

#piece3 {
  background-color: var(--kids-accent);
  color: #0c1b33;
}

#piece4 {
  background-color: var(--kids-purple);
}

.piece-dropped {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  box-shadow: none;
  cursor: default;
  font-size: 1rem;
}

#victory-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 107, 107, 0.95);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  z-index: 2000;
  padding: 20px;
  text-align: center;
}

#victory-screen h1 {
  font-family: var(--font-fun);
  font-size: 3rem;
  margin-bottom: 10px;
}

.institute-name {
  font-weight: 600;
  margin: 10px 0 30px;
}

.btn-reset {
  background: var(--kids-secondary);
  color: #574b90;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-family: var(--font-fun);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 5px 0 #cf9c1c;
  transition: all 0.2s;
}

.btn-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #cf9c1c;
}

.btn-reset:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #cf9c1c;
}

@media (max-width: 480px) {
  #game-container {
    padding: 15px;
  }

  .puzzle-slot,
  .piece-dropped {
    width: 70px;
    height: 70px;
  }

  #puzzle-board {
    width: 175px;
    height: 175px;
    gap: 10px;
  }

  .puzzle-piece {
    width: 60px;
    height: 60px;
    font-size: 0.6rem;
  }
}

/* Puzzle Icon Styles */
.slot-icon {
  font-size: 3.5rem;
  opacity: 0.15;
  pointer-events: none;
}

.puzzle-piece {
  flex-direction: column;
  gap: 2px;
  padding: 5px;
}

.piece-icon {
  font-size: 2.5rem;
  pointer-events: none;
}

.piece-text {
  font-size: 0.7rem;
  text-transform: uppercase;
  pointer-events: none;
}

.piece-dropped {
  padding: 0;
}

.piece-dropped .piece-text {
  display: none;
}

.piece-dropped .piece-icon {
  font-size: 4rem;
}

/* Hide slot icon when piece is dropped */
.puzzle-slot .piece-dropped~.slot-icon,
.puzzle-slot .slot-icon:has(+ .piece-dropped) {
  display: none;
}

/* Simpler approach: the piece covers the slot icon since it's added as a child last */
.puzzle-slot {
  position: relative;
  overflow: hidden;
}

.slot-icon {
  position: absolute;
}