/* === RESET & BASE === */
* {
  margin: 0; padding: 0; box-sizing: border-box;
}
body {
  font-family: "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #1b2044, #2f3266, #004c7f);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* === DECORATIVE SHAPES === */
.shape {
  position: absolute; opacity: 0.05; z-index: 0;
  animation: float 25s ease-in-out infinite alternate;
}
.circle { width:200px; height:200px; border-radius:50%; background:#ffcc00; top:10%; left:15%; }
.square { width:140px; height:140px; background:#00ffcc; top:55%; left:25%; }
.triangle {
  width:0; height:0;
  border-left:90px solid transparent;
  border-right:90px solid transparent;
  border-bottom:140px solid #ff6a00;
  top:35%; right:15%;
}
.hexagon {
  width:160px; height:90px; background:#10b981;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  top:25%; left:65%;
}
@keyframes float {
  0%   { transform: translate(0,0) rotate(0); }
  50%  { transform: translate(20px,-20px) rotate(180deg); }
  100% { transform: translate(0,0) rotate(360deg); }
}

/* === HEADER & TYPING === */



.header {
  text-align: center;
  background:
    linear-gradient(135deg, #6c50c6 0%, #a864d8 50%, #e2657b 100%),
    linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: cover, 40px 40px, 40px 40px;
  background-repeat: repeat;
  background-position: center;
  border-bottom: 2px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 1;
  color: #f8f8f8;
  animation: bounceInTop 1s ease both;
}
.header .slogan {
  font-size: 1rem;
  color: #fff;
  margin-top: .5rem;
}
.header .typing-hello {
  margin-top: .8rem;
  font-size: 1rem;
  font-family: monospace;
  color: #ffeefa;
  animation: typing 5s steps(40, end) infinite;
}
.logo {
  width:80px; margin:0 auto .5rem;
  animation: bounceIn 0.8s ease both;
}
.header h1 {
  font-size:2.6rem; margin-bottom:.3rem;
  animation: bounceIn 1s ease both;
}
.header h1 {
  font-size: 2.5rem;
  color: #f0f2f5;
  margin: .5rem 0;
  text-shadow: 1px 5px 4px #ffffff85;
}
.slogan {
  font-style:italic; color:#ddd; margin-bottom:.5rem;
}
.typing-hello {
  font-family: monospace; color:#ffe873; font-size:1.2rem;
  overflow:hidden; white-space:nowrap; border-right:.15em solid #ffe873;
  display:inline-block;
  animation: typing 4s steps(30,end) 1, blink-caret .75s step-end infinite;
}
@keyframes typing { from{width:0} to{width:100%} }
@keyframes blink-caret { 50%{border-color:transparent} }
@keyframes bounceInTop {
  0% { opacity:0; transform:translateY(-150px) scale(0.8); }
  50%{ opacity:1; transform:translateY(20px) scale(1.05); }
 100%{ transform:translateY(0) scale(1); }
}
@keyframes bounceIn {
 0% { opacity:0; transform:scale(0.3); }
 50%{ opacity:1; transform:scale(1.05); }
100%{ transform:scale(1); }
}

/* === NAV === */
.main-nav {
  display:flex; justify-content:center; gap:2rem;
  padding:.8rem 0; background:rgba(255,255,255,0.1);
  backdrop-filter:blur(6px); position:relative; z-index:2;
}
.main-nav a {
  color:#fff; text-decoration:none; font-weight:600;
  transition:color .3s;
}
.main-nav a:hover { color:#ffe873; }

/* === PUZZLE PIECES === */
.main-menu {
  display:flex; justify-content:center; gap:0; padding:2rem 1rem;
  flex-wrap:wrap; position:relative; z-index:1;
}
.puzzle-piece {
  width:240px; height:320px;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:1.2rem; font-weight:600; text-align:center;
  text-decoration:none;
  box-shadow:0 12px 24px rgba(0,0,0,0.3);
  transition:transform .3s,box-shadow .3s;
  background-size: cover; background-repeat: no-repeat;
}
.puzzle-piece:hover {
  transform:translateY(-10px);
  box-shadow:0 18px 36px rgba(0,0,0,0.5);
}
.piece-left {
  background-image: url('/assets/left.svg');
  animation: slide-in-left 1s ease both;
}
.piece-middle {
  background-image: url('/assets/middle.svg');
  animation: slide-in-top 1.2s ease both;
}
.piece-right {
  background-image: url('/assets/right.svg');
  animation: slide-in-right 1.4s ease both;
}
@keyframes slide-in-left {
  from{opacity:0;transform:translateX(-200px) scale(.7);} to{opacity:1;transform:translateX(0) scale(1);}
}
@keyframes slide-in-right {
  from{opacity:0;transform:translateX(200px) scale(.7);} to{opacity:1;transform:translateX(0) scale(1);}
}
@keyframes slide-in-top {
  from{opacity:0;transform:translateY(-200px) scale(.7);} to{opacity:1;transform:translateY(0) scale(1);}
}

/* === MENU ICON === */
.menu-icon {
  width:64px; height:64px; margin-bottom:1rem;
}

/* === FOOTER === */
.footer {
  padding:1rem; text-align:center;
  background:rgba(255,255,255,0.05);
  border-top:1px solid rgba(255,255,255,0.1);
  font-size:.9rem; color:#ccc; position:relative; z-index:1;
}
/* === CANVAS CONTAINER === */
.canvas-container {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

/* Viền bo tròn & đổ bóng cho chính canvas */
#puzzleCanvas {
  border: 4px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  cursor: pointer;
  background: rgba(255,255,255,0.05);
}

/* === PUZZLE PIECES (nếu bạn dùng CSS/clip-path) === */
.puzzle {
  /* Bo cong nhẹ các góc tổng thể */
  border-radius: 8px;
  /* Đổ bóng để nhô lên */
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  transition: transform .3s, box-shadow .3s;
}
.puzzle:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.5);
}

/* Nếu bạn vẫn cần canh “miếng” riêng rẽ với clip-path: */
.puzzle-container {
  gap: 40px; /* để các bump/hole không chồng nhau */
}

/* Tối ưu hiển thị khi zoom nhỏ */
@media (max-width: 768px) {
  #puzzleCanvas {
    width: 100%;
    height: auto;
  }
  .puzzle {
    width: calc((100% - 80px)/3);
    height: auto;
  }
}



body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at center, #0a0a1f 0%, #080820 70%, #000000 100%);
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

.header {
  text-align: center;
  padding: 1rem;
}
.header .logo {
  width: 80px;
  height: auto;
}
.header h1 {
  font-size: 2.5rem;
  color: #00ffff;
  margin: .5rem 0;
}
.slogan {
  font-size: 1.2rem;
  color: #ccc;
}
.typing-hello {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #88ccff;
  font-family: monospace;
  animation: typing 5s steps(30, end) infinite;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #88ccff;
  box-sizing: border-box;
}
@keyframes typing {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; }
}

.main-nav {
  text-align: center;
}
.main-nav a {
  display: inline-block;
  margin: 0 .7rem;
  padding: .6rem 1.2rem;
  color: #00ffff;
  text-decoration: none;
  border: 1px solid #00ffff;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
}
.main-nav a:hover {
  background: #00ffff;
  color: #000;
}

.main-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  padding: 4rem 2rem;
  position: relative;
  z-index: 1;
}


.footer {
  text-align: center;
  padding: 1rem;
  font-size: .9rem;
  color: #666;
}

/* QUIZ floating box */
.quiz-box {
  position: absolute;
  bottom: 2rem;         /* đưa xuống dưới */
  right: 5%;
  transform: rotate(-1.5deg);
  padding: 0.8rem 1.8rem;
  max-width: 300px;
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 14px 14px 14px 6px;
  color: rgba(0, 255, 255, 0.6);
  font-size: 1.6rem;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(0,255,255,0.3);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 8px rgba(0,255,255,0.15), inset 0 0 6px rgba(0,255,255,0.1);
  z-index: 2; /* thấp hơn */
  pointer-events: none; /* không chặn click các thứ bên trên */
  opacity: 0.7;
}

.quiz-box::after {
  content: "";
  position: absolute;
  bottom: -14px;
  right: 16px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-top-color: rgba(0, 255, 255, 0.3);
  filter: drop-shadow(0 0 4px rgba(0,255,255,0.2));
  transform: rotate(5deg);
}

/* Floating symbols around */
.symbol {
  position: absolute;
  font-size: calc(1rem + 1.5vw);
  color: rgba(0, 200, 255, 0.3);
  opacity: 0.3;
  animation: floatSymbol 14s infinite linear;
  z-index: 1; /* chìm dưới flashcard */
  pointer-events: none;
  transform: translateY(100vh) scale(0.8) rotate(0deg);
}

@keyframes floatSymbol {
  0%   { transform: translateY(100vh) scale(0.8) rotate(0deg); opacity: 0; }
  20%  { opacity: 0.4; }
  80%  { opacity: 0.5; }
  100% { transform: translateY(-10vh) scale(1.2) rotate(360deg); opacity: 0; }
}



.main-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}


.flashcard-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.flashcard {
  width: 220px;
  height: 280px;
  perspective: 1000px;
  position: relative;
  cursor: pointer;
}

.flashcard .card-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  z-index: 1;
}

.flashcard .card-inner {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  transform-style: preserve-3d;
  transition: transform 0.8s;
  position: relative;
  z-index: 2;
}

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

.flashcard .card-front, .flashcard .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-shadow: 0 0 6px rgba(0,255,255,0.7);
  transition: background 0.3s;
}

.flashcard .card-front:hover {
  background: rgba(255,255,255,0.2);
}

.flashcard .card-back {
  transform: rotateY(180deg);
}

.create-quiz-btn {
  text-align: center;
  margin-top: 2rem;
}

.create-quiz-btn .small {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  background: linear-gradient(45deg, #ff00cc, #3333ff);
  color: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(255,255,255,0.4);
  transition: transform 0.2s;
}

.create-quiz-btn .small:hover {
  transform: scale(1.1);
}

.card-image {
  display: block;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  margin: auto;
  transition: transform 0.3s ease;
}

.flashcard:hover .card-image {
  transform: scale(1.05);
}
.flashcard-title {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 5px rgba(0,0,0,0.6), 0 0 10px rgba(0,0,0,0.6);
  padding: .4rem 1rem;
  background: rgba(0, 0, 0, 0.4);   /* nền mờ đen */
  border-radius: 12px;
  backdrop-filter: blur(4px);       /* nếu trình duyệt hỗ trợ */
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  width: 100%;
}

.card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  height: 100%;
  padding: 1rem;
  border-radius: 16px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: white;
  font-size: 1.4rem;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: transform 0.5s;
}

.card-front .material-symbols-outlined {
  font-size: 6rem;
  color: white;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}

.flashcard-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-align: center;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}


html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.main-menu {
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 1rem;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.15);  /* nhẹ, trong suốt */
  color: #bbb;
  font-size: 0.9rem;
  text-align: center;
  z-index: 999;
  backdrop-filter: blur(4px);  /* hiệu ứng mờ background dưới */
}

.footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer .dmca-badge img {
  max-width: 120px;
  height: auto;
}



/* Mô tả dưới mỗi thẻ */
.card-caption {
  text-align: center;
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: #f0f0f0;
  opacity: 0.85;
  font-style: italic;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* Dòng OR giữa thẻ */
.or-divider {
  text-align: center;
  margin: 2rem 0 1rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: #ffecb3;
  letter-spacing: 1px;
  opacity: 0.9;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}



.hero-section {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  margin-bottom: 4rem;
}

.img-new-hero-wrap {
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 3.25%, rgba(255, 255, 255, 0.04) 96.75%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(27px);
  -webkit-backdrop-filter: blur(27px);
  padding: 24px;
  max-width: 1100px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.hero-screenshot {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  margin: 1px auto 6rem auto!important;
}












.top-banner {
  background: linear-gradient(90deg, #9a3eaa, #b858c0);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.1rem 1.8rem;
  text-align: center;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
  position: relative;
  z-index: 100;
}

.top-banner a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  transition: color 0.3s ease;
}

.top-banner a:hover {
  color: #ffeb3b;
}

.top-banner .arrow-icon {
  display: inline-block;
  transform: rotate(-90deg);  /* Ban đầu hướng lên */
  transition: transform 0.35s ease;
}

.top-banner a:hover .arrow-icon {
  transform: rotate(0deg);  /* Hover xoay ngang */
}



/* === RESPONSIVE === */
@media (max-width: 1024px) {
  /* Header giữ căn giữa và không bị lệch */
  .header {
    padding: 1.5rem 1rem;
  }
  .header h1 {
    font-size: 2rem;
  }
  .typing-hello {
    font-size: 1rem;
  }

  .main-nav a {
    margin: 0 .5rem;
    padding: .5rem 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  /* Banner không lệch */
  .top-banner {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }

  /* Header căn giữa đẹp */
  .header h1 {
    font-size: 1.8rem;
  }
  .header .logo {
    width: 64px;
  }

  /* Puzzle, flashcard xếp dọc */
  .main-menu {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 2rem 1rem;
  }

  .flashcard-container {
    flex-direction: column;
    gap: 1.2rem;
  }

  .flashcard {
    width: 90%;
    max-width: 280px;
    height: auto;
  }

  /* Ảnh hero thu gọn vừa màn */
  .hero-section {
    margin: 2rem 0;
    padding: 0 1rem;
  }

  .img-new-hero-wrap {
    padding: 16px;
    max-width: 100%;
    border-radius: 20px;
  }

  .hero-screenshot {
    border-radius: 16px;
    margin-bottom: 2rem !important;
  }

  /* Footer fit mobile */
  .footer {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.6rem;
  }
  .main-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .main-nav a {
    flex: 1 1 auto;
    text-align: center;
    margin: 0.3rem 0;
  }

  .quiz-box {
    bottom: 1rem;
    right: 1rem;
    max-width: 240px;
    font-size: 1.2rem;
    padding: 0.6rem 1rem;
  }
}


@media (max-width: 768px) {
  .puzzle-piece {
    width: 90%;     /* hoặc: 80%, tuỳ ý bạn */
    max-width: 320px;
    height: auto;
    aspect-ratio: 3/4;  /* tự giữ tỉ lệ cao đẹp */
    font-size: 1.4rem;  /* vừa đủ đọc */
    padding: 1.2rem;
    margin-bottom: 1.2rem;
  }

  .puzzle-piece:hover {
    transform: translateY(-6px);
  }

  .or-divider {
    margin: 1.2rem 0;
    font-size: 1rem;
  }

  .quiz-box {
    font-size: 1.1rem;
    bottom: 1rem;
    right: 1rem;
    max-width: 220px;
  }
}



@media (max-width: 768px) {
  .flashcard-container {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .flashcard {
    width: 90%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .flashcard .card-inner {
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .create-quiz-btn {
    width: 90%;
    max-width: 300px;
  }

  .create-quiz-btn .flashcard.small {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 1;   /* nhỏ ngang, dễ đọc */
  }

  .or-divider {
    margin: 1.2rem 0;
    font-size: 1rem;
  }
}
.footer a[href^="/"] {
  color: #3a86ff;
  text-decoration: none;
  margin: 0 6px;
}

.footer a[href^="/"]:hover {
  color: #d62828;
  text-decoration: underline;
}

/* Add these styles to your existing CSS */

/* Animated Elements */
.animated-element {
  position: absolute;
  z-index: 2;
}

/* Rocket animation */
.rocket {
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  animation: rocketFloat 3s ease-in-out infinite;
}

@keyframes rocketFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* Book animation */
.book {
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  animation: bookFloat 4s ease-in-out infinite;
}

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

/* Tools animation */
.tools {
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  animation: toolsFloat 3s ease-in-out infinite;
}

@keyframes toolsFloat {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.1); }
}

/* Star container and stars */
.star-container {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.star {
  position: absolute;
  width: 15px;
  height: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFD700' d='M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z'/%3E%3C/svg%3E");
  background-size: contain;
  animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* Confetti */
.confetti-container {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.confetti {
  position: absolute;
  width: 8px;
  height: 16px;
  background: linear-gradient(to bottom, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff);
  transform-origin: center;
  animation: confettiFall 3s ease-in-out infinite var(--delay);
  top: -10px;
  left: calc(10% + (var(--delay) * 30%));
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(150px) rotate(720deg); opacity: 0; }
}

/* Pencil container and pencils */
.pencil-container {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.pencil {
  position: absolute;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFA500' d='M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87L20.71,7.04M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z'/%3E%3C/svg%3E");
  background-size: contain;
  animation: pencilSpin 4s linear infinite;
}

@keyframes pencilSpin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

/* Checkmarks */
.checkmark-container {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.checkmark {
  position: absolute;
  width: 25px;
  height: 25px;
  top: calc(30% + (var(--delay) * 30%));
  left: calc(20% + (var(--delay) * 40%));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2300FF00' d='M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z'/%3E%3C/svg%3E");
  background-size: contain;
  animation: checkmarkPop 2s ease-in-out infinite var(--delay);
}

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

/* Gears */
.gear-container {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gear {
  position: absolute;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(255,255,255,0.7)' d='M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z'/%3E%3C/svg%3E");
  background-size: contain;
}

.gear-large {
  width: 50px;
  height: 50px;
  top: 60%;
  left: 70%;
  animation: gearRotate 10s linear infinite;
}

.gear-medium {
  width: 35px;
  height: 35px;
  top: 70%;
  left: 55%;
  animation: gearRotate 7s linear infinite reverse;
}

.gear-small {
  width: 25px;
  height: 25px;
  top: 65%;
  left: 40%;
  animation: gearRotate 5s linear infinite;
}

@keyframes gearRotate {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

/* Tool icons */
.tool-icons {
  position: absolute;
  width: 100%;
  height: 100%;
}

.tool-icon {
  position: absolute;
  width: 30px;
  height: 30px;
  top: calc(40% + (var(--delay) * 20%));
  left: calc(30% + (var(--delay) * 30%));
  animation: toolIconFloat 3s ease-in-out infinite var(--delay);
}

@keyframes toolIconFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-15px) rotate(10deg); }
}

/* Animated plus */
.animated-plus {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: plusPulse 2s ease-in-out infinite;
}

@keyframes plusPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(1.2); opacity: 0.8; }
}

/* Shooting stars */
.shooting-star {
  position: absolute;
  width: 2px;
  height: 15px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
  top: 20%;
  left: 80%;
  animation: shootingStar 3s linear infinite var(--delay);
}

@keyframes shootingStar {
  0% { transform: translateX(0) translateY(0) rotate(45deg); opacity: 0; }
  10% { opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateX(-100px) translateY(100px) rotate(45deg); opacity: 0; }
}

/* Enhanced symbol animations */
.symbol.spinning {
  animation: symbolSpin 6s linear infinite;
}

.symbol.pulsing {
  animation: symbolPulse 3s ease-in-out infinite;
}

@keyframes symbolSpin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

@keyframes symbolPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.7; }
}