:root {
  --bg: #f5f7ff;
  --surface: #ffffff;
  --surface-soft: #eef3ff;
  --text: #18233f;
  --muted: #5f6b8a;
  --primary: #5b6cff;
  --primary-2: #7a5cff;
  --success: #19c37d;
  --warning: #ffb648;
  --danger: #ff5d73;
  --shadow: 0 18px 45px rgba(50, 70, 130, 0.12);
  --shadow-soft: 0 12px 28px rgba(50, 70, 130, 0.1);
  --shadow-hover: 0 28px 60px rgba(50, 70, 130, 0.2);
  --radius-xl: 40px;
  --radius-lg: 30px;
  --radius-md: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, #dbe5ff 0%, transparent 28%),
    radial-gradient(circle at top right, #ffe1f1 0%, transparent 22%),
    linear-gradient(180deg, #f7f9ff 0%, #eef3ff 100%);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(90, 108, 255, 0.08);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 50px;
  height: 50px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  font-size: 22px;
  box-shadow: var(--shadow-soft);
}

.brand-text h1 {
  margin: 0;
  font-size: 1.18rem;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* GENERAL */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 22px 58px;
}

.section {
  margin-top: 40px;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.section-header h2,
.section-header h3 {
  margin: 0;
}

.section-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 28px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(91, 108, 255, 0.06);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #6f7cff 0%, #8a68ff 55%, #ff77b7 100%);
  border-radius: 44px;
  padding: 58px 56px 58px 56px;
  color: white;
  box-shadow: var(--shadow);
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 34px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.18;
}

.hero::before {
  width: 260px;
  height: 260px;
  right: -70px;
  top: -60px;
  background: white;
}

.hero::after {
  width: 180px;
  height: 180px;
  left: -40px;
  bottom: -50px;
  background: #fff8;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  min-width: 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.16);
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.hero h2 {
  margin: 0 0 10px;
  display: block;
  font-size: clamp(3.3rem, 8vw, 6.2rem);
  line-height: 1.04;
  letter-spacing: -2px;
  font-weight: 900;
  padding-bottom: 0.12em;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  background: linear-gradient(135deg, #fff4c2 0%, #f7c948 25%, #ffb347 48%, #ff9a3d 68%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  text-shadow: 0 6px 18px rgba(255, 200, 80, 0.16);
}

.hero h3 {
  margin: 12px 0 22px;
  display: block;
  font-size: clamp(1.55rem, 3.2vw, 2.45rem);
  line-height: 1.14;
  font-weight: 800;
  padding-bottom: 0.14em;
  background: linear-gradient(135deg, #fff7d1 0%, #ffd166 35%, #f4a261 65%, #ffe29a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 14px rgba(255, 190, 90, 0.14);
}

.hero p {
  margin: 0;
  max-width: 760px;
  font-size: 1.08rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.96);
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rocket-visual {
  position: relative;
  width: min(100%, 390px);
  height: 310px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rocket-glow {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    transparent 75%
  );
  animation: rocketGlow 2.6s ease-in-out infinite;
}

.rocket-body {
  position: relative;
  z-index: 2;
  font-size: clamp(5.2rem, 12vw, 8.7rem);
  filter: drop-shadow(0 18px 24px rgba(55, 20, 120, 0.25));
  animation: rocketFloat 3s ease-in-out infinite;
}

.rocket-stars {
  position: absolute;
  z-index: 1;
  font-size: 1.6rem;
  opacity: 0.95;
  animation: starTwinkle 2.4s ease-in-out infinite;
}

.star-1 {
  top: 24px;
  left: 38px;
}

.star-2 {
  top: 50px;
  right: 30px;
  animation-delay: 0.3s;
}

.star-3 {
  bottom: 42px;
  left: 18px;
  animation-delay: 0.7s;
}

.star-4 {
  bottom: 24px;
  right: 46px;
  animation-delay: 1s;
}

/* HOME CARDS */
.home-question-header {
  justify-content: center;
  text-align: center;
}

.home-cards-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.product-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 40px;
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    filter 0.32s ease;
}

.product-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -28px;
  bottom: -28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.product-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-hover);
  filter: saturate(1.05);
}

.product-card h3 {
  margin: 0 0 12px;
  font-size: 1.48rem;
  position: relative;
  z-index: 1;
}

.product-card p {
  margin: 0;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.warm-card {
  color: #2f2240;
  border: none;
}

.warm-badge {
  background: rgba(255, 255, 255, 0.38);
  color: #4b2d2d;
  font-weight: 800;
}

.warm-courses {
  background: linear-gradient(135deg, #ffd27d 0%, #ffb86b 100%);
}

.warm-school {
  background: linear-gradient(135deg, #ffb38a 0%, #ff8a80 100%);
}

.warm-junior {
  background: linear-gradient(135deg, #ffd6a5 0%, #ffb4a2 100%);
}

.warm-about {
  background: linear-gradient(135deg, #f7b2ff 0%, #e59cff 100%);
}

.warm-plans {
  background: linear-gradient(135deg, #ffe08a 0%, #ffc857 100%);
}

.welcome-card {
  background: linear-gradient(135deg, #fff3b0 0%, #ffcf8b 50%, #ffb38a 100%);
  color: #3b2940;
  border: none;
}

.welcome-badge {
  background: rgba(255, 255, 255, 0.42);
  color: #8b4b00;
  font-weight: 800;
}

.warm-card h3,
.welcome-card h3 {
  color: #2d1e2f;
}

.warm-card p,
.welcome-card p {
  color: rgba(45, 30, 47, 0.9);
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
}

/* BUTTONS */
.card-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn {
  padding: 12px 19px;
  border-radius: 17px;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 14px 28px rgba(91, 108, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 18px 34px rgba(91, 108, 255, 0.32);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1px solid rgba(91, 108, 255, 0.16);
}

.btn-soft {
  background: var(--surface-soft);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

/* PATH */
.path-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.path-pill {
  background: var(--surface);
  border: 1px solid rgba(91, 108, 255, 0.1);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
}

/* SCHOOL CARDS */
.items-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.select-card {
  background: var(--surface);
  border-radius: 36px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(91, 108, 255, 0.08);
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.select-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(91, 108, 255, 0.18);
}

.select-card h4 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.select-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.select-card .emoji {
  font-size: 2.1rem;
  margin-bottom: 14px;
}

/* LEARN + ACTIVITY */
.learn-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.learn-box {
  background: var(--surface-soft);
  border-radius: 24px;
  padding: 20px;
  margin-top: 18px;
}

.learn-box h4 {
  margin-top: 0;
}

.progress-wrap {
  margin-top: 16px;
}

.progress-track {
  width: 100%;
  height: 14px;
  background: #dfe7ff;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--success), #44d4a0);
  width: 0%;
  transition: width 0.3s ease;
}

/* FORMS */
.input,
.select {
  width: 100%;
  border: 1px solid rgba(91, 108, 255, 0.12);
  background: white;
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
}

.input:focus,
.select:focus {
  border-color: rgba(91, 108, 255, 0.38);
  box-shadow: 0 0 0 4px rgba(91, 108, 255, 0.08);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
}

/* TEACHER PANEL */
.teacher-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

.teacher-sidebar {
  background: var(--surface);
  border-radius: 34px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.teacher-sidebar button {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.teacher-sidebar button:hover {
  transform: translateY(-3px);
}

.teacher-sidebar button.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
}

.teacher-main {
  background: var(--surface);
  border-radius: 34px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.login-card {
  max-width: 520px;
  margin: 34px auto 0;
}

/* TABLE */
.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(91, 108, 255, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: white;
}

th,
td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid #edf1ff;
}

th {
  background: #f8faff;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ZORI */
.zori-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: flex;
  align-items: end;
  gap: 12px;
}

.zori-bubble {
  max-width: 290px;
  background: white;
  color: var(--text);
  border-radius: 22px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(91, 108, 255, 0.08);
  animation: floatBubble 2.8s ease-in-out infinite;
}

.zori-avatar {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffb648, #ff7b54);
  color: white;
  font-size: 2rem;
  box-shadow: var(--shadow);
  animation: floatZori 3s ease-in-out infinite;
}

/* FOOTER NOTE */
.footer-note {
  margin-top: 30px;
  color: var(--muted);
  text-align: center;
  font-size: 0.97rem;
}

/* CONFETTI */
.confetti-piece {
  position: fixed;
  top: -10px;
  width: 10px;
  height: 16px;
  opacity: 0.95;
  z-index: 60;
  animation: confettiFall 2.8s linear forwards;
}

/* FADE ANIMATIONS */
.fade-in-up {
  animation: fadeInUp 0.7s ease both;
}

.delay-1 {
  animation-delay: 0.08s;
}

.delay-2 {
  animation-delay: 0.16s;
}

.delay-3 {
  animation-delay: 0.24s;
}

.delay-4 {
  animation-delay: 0.32s;
}

.delay-5 {
  animation-delay: 0.4s;
}

/* KEYFRAMES */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatZori {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes floatBubble {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes rocketFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(-4deg);
  }
  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

@keyframes rocketGlow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes starTwinkle {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

@keyframes confettiFall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0.9;
  }
}

/* RESPONSIVE */
@media (max-width: 1150px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 44px 32px;
  }

  .items-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .teacher-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .home-cards-grid {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: clamp(2.9rem, 12vw, 4.8rem);
  }

  .hero h3 {
    font-size: clamp(1.45rem, 6vw, 2.15rem);
  }
}

@media (max-width: 700px) {
  .container {
    padding: 18px 14px 40px;
  }

  .topbar-inner {
    padding: 14px;
  }

  .hero {
    padding: 30px 22px;
    border-radius: 30px;
  }

  .grid-2,
  .items-grid,
  .home-cards-grid {
    grid-template-columns: 1fr;
  }

  .zori-widget {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .zori-bubble {
    max-width: none;
    flex: 1;
  }
}