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

:root {
  --theme-primary: #764ba2;
  --theme-accent: #667eea;

  transition:
    background-color 0.6s ease,
    background-image 0.6s ease;
}

body {
  font-family:
    Quicksand,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: #667eea;
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  overflow: hidden;
  transition:
    background-color 0.6s ease,
    background-image 0.6s ease;
  background-size: auto;
  background-repeat: repeat;

  /* Prevent pull-to-refresh on mobile */
  overscroll-behavior: none;

  /* Prevent touch callout on mobile */
  -webkit-touch-callout: none;
}

#game-container {
  width: 100%;
  max-width: 900px;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile browsers */
  max-height: 100vh;
  max-height: 100dvh; /* Dynamic viewport height for mobile browsers */
  background: rgb(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgb(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
}

/* Screen Management */
.screen {
  display: none !important;
  padding: 20px;
  position: absolute;
  inset: 0;
  overflow-y: auto;
}

.screen.active {
  display: flex !important;
  flex-direction: column;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 3px solid #e0e0e0;
  flex-shrink: 0;
}

.header h2 {
  font-size: 24px;
  color: var(--theme-primary);
  text-shadow: 2px 2px 4px rgb(0, 0, 0, 0.1);
  transition: color 0.6s ease;
}

.stats {
  display: flex;
  gap: 15px;
}

.stat {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  background: white;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgb(0, 0, 0, 0.1);
}

/* Progress Bar */
.progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-shrink: 0;
}

.progress-bar-bg {
  flex: 1;
  height: 30px;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgb(0, 0, 0, 0.1);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--theme-accent) 0%, var(--theme-primary) 100%);
  transition:
    width 0.5s ease,
    background 0.6s ease;
  width: 0%;
}

.progress-text {
  font-size: 18px;
  font-weight: bold;
  color: var(--theme-primary);
  min-width: 50px;
  transition: color 0.6s ease;
  text-align: center;
}

/* Title Screen */
#title-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.game-title {
  font-size: 48px;
  color: var(--theme-primary);
  margin-bottom: 20px;
  text-shadow: 3px 3px 6px rgb(0, 0, 0, 0.2);
  transition: color 0.6s ease;
}

.subtitle {
  font-size: 24px;
  color: var(--theme-accent);
  margin-bottom: 40px;
  transition: color 0.6s ease;
}

.title-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

/* Buttons */
.big-button {
  font-size: 24px;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-primary) 100%);
  border: none;
  padding: 20px 50px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgb(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  font-family: inherit;
}

.big-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgb(0, 0, 0, 0.4);
}

.big-button:active {
  transform: translateY(-1px) scale(1.02);
}

.secondary-button {
  font-size: 16px;
  color: var(--theme-accent);
  background: white;
  border: 2px solid var(--theme-accent);
  padding: 12px 30px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-weight: bold;
}

.secondary-button:hover {
  background: var(--theme-accent);
  color: white;
  transform: translateY(-2px);
}

.secondary-button:active {
  transform: translateY(-1px);
}

.nav-button {
  font-size: 18px;
  color: var(--theme-accent);
  background: white;
  border: 2px solid var(--theme-accent);
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-weight: bold;
}

.nav-button:hover {
  background: var(--theme-accent);
  color: white;
  transform: translateX(-3px);
}

/* Garden Hub */
.project-intro {
  text-align: center;
  font-size: 22px;
  color: #666;
  margin: 20px 0;
  font-weight: 600;
}

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

.project-option {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgb(0, 0, 0, 0.1);
}

.project-option:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 40px rgb(0, 0, 0, 0.25);
}

.project-icon {
  font-size: 80px;
  margin-bottom: 15px;
  animation: bounce 2s ease-in-out infinite;
}

.project-option h3 {
  font-size: 24px;
  color: var(--theme-primary);
  margin: 0;
  transition: color 0.6s ease;
  font-weight: bold;
}

.project-option p {
  display: none; /* Hide descriptive text */
}

.garden-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.garden-area {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgb(0, 0, 0, 0.1);
}

.garden-area.unlocked:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 30px rgb(0, 0, 0, 0.2);
}

.garden-area.locked {
  background: #e0e0e0;
  cursor: not-allowed;
  opacity: 0.6;
}

.area-icon {
  font-size: 64px;
  margin-bottom: 15px;
  animation: bounce 2s ease-in-out infinite;
}

.garden-area h3 {
  font-size: 24px;
  color: var(--theme-primary);
  margin-bottom: 10px;
  transition: color 0.6s ease;
}

.garden-area p {
  font-size: 16px;
  color: #666;
}

/* Activity Screen */
.activity-container {
  width: 100%;
  max-width: 700px;
  min-width: min(600px, 100%);
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.creature-guide {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  flex-shrink: 0;
}

.creature-image {
  font-size: 48px;
  animation: wiggle 2s ease-in-out infinite;
  flex-shrink: 0;
}

.creature-message {
  font-size: 16px;
  font-weight: 600;
  color: var(--theme-primary);
  text-align: left;
  margin: 0;
  padding: 8px 16px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgb(0, 0, 0, 0.1);
  max-width: 280px;
}

.creature-speech {
  display: none; /* Hidden by default for cleaner UI */
}

/* Question Area */
.question-area {
  background: white;
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgb(0, 0, 0, 0.1);
  text-align: center;
  flex-shrink: 0;
}

.question {
  font-size: 28px;
  color: #333;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.4;
}

.visual-area {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 80px;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 auto;
}

.visual-item {
  font-size: 48px;
  animation: pop-in 0.3s ease-out;
}

.visual-item.crossed-out {
  opacity: 0.4;
  position: relative;
}

.visual-item.crossed-out::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 3px;
  background: #ef4444;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.visual-item.separator {
  font-size: 32px;
  opacity: 0.3;
  animation: none;
  color: #999;
}

/* Answer Options */
.answer-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  flex-shrink: 0;
}

.answer-button {
  position: relative;
  font-size: 38px;
  font-weight: bold;
  color: var(--theme-primary);
  background: white;
  border: 4px solid var(--theme-primary);
  padding: 25px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 5px 15px rgb(0, 0, 0, 0.1);

  /* Remove tap highlight on mobile browsers */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Only apply hover effects on devices that support hover (not touch screens) */
@media (hover: hover) and (pointer: fine) {
  .answer-button:hover:not(:active) {
    background: var(--theme-primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgb(0, 0, 0, 0.3);
  }
}

/* Active state for all devices */
.answer-button:active:not(.disabled) {
  transform: scale(0.98);
}

.answer-button.correct {
  background: #4ade80;
  border-color: #16a34a;
  color: white;
  animation: pulse-correct 0.5s ease;
}

.answer-button.disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Feedback Area */
.feedback-area {
  margin-top: 15px;
  padding: 0;
  border-radius: 20px;
  text-align: center;
  transition: all 0.3s ease;
  min-height: 68px;
  flex-shrink: 0;
}

.feedback-area.hidden {
  visibility: hidden;
}

/* Structured Feedback */
.feedback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border-radius: 20px;
}

.feedback-icon {
  font-size: 48px;
  animation: bounce 0.5s ease;
}

.feedback h3 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  color: inherit;
}

.feedback p {
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: normal;
}

.feedback p strong {
  font-weight: bold;
  font-size: 22px;
}

.feedback.correct {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  color: white;
}

.feedback.incorrect {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
}

.feedback.encourage {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: white;
}

.feedback-explanation {
  font-style: italic;
  opacity: 0.9;
}

/* Garden Preview */
.garden-preview {
  display: none; /* Hidden to reduce clutter and redundancy with star count */
}

.garden-canvas {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  min-height: 80px;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 auto;
}

.garden-item {
  font-size: 32px;
  animation: grow-in 0.5s ease-out;
}

/* Particles */
#particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.particle {
  position: absolute;
  font-size: 24px;
  animation: float-up 2s ease-out forwards;
  pointer-events: none;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Icon Buttons */
.icon-button {
  font-size: 24px;
  background: white;
  border: 2px solid var(--theme-primary);
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon-button:hover {
  background: var(--theme-primary);
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 5px 15px rgb(0, 0, 0, 0.2);
}

.icon-button:active {
  transform: scale(1.05) rotate(5deg);
}

/* Castle Badge */
.castle-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgb(0, 0, 0, 0.3);
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%,
  100% {
    transform: scale(1);
  }

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

/* Text Button (for home link) */
.text-button {
  background: none;
  border: none;
  color: var(--theme-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  margin-top: 4px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.text-button:hover {
  color: var(--theme-accent);
  text-decoration: underline;
}

.text-button:active {
  transform: translateX(-2px);
}

/* Focus Styles - Accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
.garden-area:focus-visible {
  outline: 3px solid var(--theme-accent);
  outline-offset: 3px;
}

.answer-button:focus-visible {
  outline: 4px solid var(--theme-accent);
  outline-offset: 4px;
  transform: scale(1.05);
}

/* Prevent persistent highlight after touch on mobile */
.answer-button:focus:not(:focus-visible) {
  outline: none;
}

/* Keyboard hint */
.answer-button::after {
  content: attr(data-keyboard-hint);
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 12px;
  opacity: 0.5;
  font-weight: normal;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgb(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
}

.modal.hidden {
  display: none !important;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgb(0, 0, 0, 0.4);
}

.modal-content h2 {
  font-size: 32px;
  color: var(--theme-primary);
  margin-bottom: 20px;
  text-align: center;
}

.setting-group {
  margin-bottom: 20px;
}

.setting-group label {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.setting-select {
  width: 100%;
  font-size: 16px;
  padding: 12px;
  border: 2px solid var(--theme-primary);
  border-radius: 10px;
  font-family: inherit;
  background: white;
  cursor: pointer;
}

.setting-description {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
  font-style: italic;
}

/* Project Progress Modal */
.project-modal {
  text-align: center;
}

.project-visual {
  font-size: 120px;
  line-height: 1.2;
  margin: 20px 0;
  min-height: 150px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.project-progress-text {
  font-size: 20px;
  color: #666;
  margin: 20px 0;
  font-weight: 600;
}

/* Castle Screen */
.castle-container {
  text-align: center;
  padding: 20px;
}

.castle-description {
  font-size: 18px;
  color: #666;
  margin-bottom: 15px;
}

.castle-svg-container {
  margin: 30px auto;
  max-width: 600px;
  min-height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.castle-pieces {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.castle-piece {
  width: 60px;
  height: 60px;
  border: 3px solid var(--theme-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: white;
}

.castle-piece.completed {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  animation: pop-in 0.5s ease-out;
}

.castle-piece.locked {
  opacity: 0.3;
}

/* Keyboard Input */
.answer-input {
  font-size: 32px;
  font-weight: bold;
  color: var(--theme-primary);
  background: white;
  border: 4px solid var(--theme-primary);
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  width: 100%;
  max-width: 300px;
  font-family: inherit;
  box-shadow: 0 5px 15px rgb(0, 0, 0, 0.1);
}

.answer-input:focus {
  outline: none;
  border-color: var(--theme-accent);
  box-shadow: 0 8px 25px rgb(0, 0, 0, 0.2);
}

.answer-input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.submit-answer-button {
  font-size: 20px;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-primary) 100%);
  border: none;
  padding: 15px 40px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 5px 20px rgb(0, 0, 0, 0.2);
}

.submit-answer-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 30px rgb(0, 0, 0, 0.3);
}

.submit-answer-button:active {
  transform: translateY(-1px) scale(1.02);
}

.submit-answer-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Responsive Design */
@media (width <= 768px) {
  body {
    padding: 5px;
  }

  #game-container {
    border-radius: 15px;
    height: 100vh;
    max-height: 100vh;
  }

  .screen {
    padding: 10px;
  }

  .game-title {
    font-size: 28px;
    margin-bottom: 10px;
  }

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

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

  .header {
    margin-bottom: 10px;
    padding-bottom: 5px;
  }

  .header h2 {
    font-size: 18px;
  }

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

  .creature-guide {
    padding: 5px;
    gap: 8px;
  }

  .creature-image {
    font-size: 32px;
  }

  .creature-message {
    font-size: 12px;
    padding: 6px 10px;
  }

  .creature-speech p {
    font-size: 14px;
  }

  .question-area {
    padding: 15px;
  }

  .question {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .visual-item {
    font-size: 32px;
  }

  .answer-options {
    gap: 10px;
  }

  .answer-button {
    font-size: 28px;
    padding: 15px;
  }

  .garden-item {
    font-size: 28px;
  }

  .activity-container {
    gap: 10px;
  }
}

/* Castle Notification */
.castle-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-150px);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgb(0, 0, 0, 0.4);
  z-index: 10001;
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
  opacity: 0;
  max-width: 90%;
}

.castle-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  animation: notification-bounce 0.5s ease;
}

@keyframes notification-bounce {
  0% {
    transform: translateX(-50%) translateY(-150px);
  }

  60% {
    transform: translateX(-50%) translateY(10px);
  }

  80% {
    transform: translateX(-50%) translateY(-5px);
  }

  100% {
    transform: translateX(-50%) translateY(0);
  }
}

.castle-notification-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.castle-notification-icon {
  font-size: 48px;
  animation: notification-spin 1s ease;
}

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

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

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

.castle-notification-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.castle-notification-text strong {
  font-size: 20px;
  font-weight: bold;
}

.castle-notification-text span {
  font-size: 16px;
  opacity: 0.9;
}

/* Level Complete Screen */
#level-complete-screen {
  padding: 2rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.celebration {
  background: white;
  border: 3px solid var(--theme-primary);
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 8px 24px rgb(0, 0, 0, 0.2);
  max-width: 600px;
  margin: 0 auto;
  animation: celebration-bounce 0.6s ease-out;
}

@keyframes celebration-bounce {
  0% {
    transform: scale(0.8) rotate(-5deg);
    opacity: 0;
  }

  50% {
    transform: scale(1.05) rotate(2deg);
  }

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

.celebration h2 {
  color: var(--theme-primary);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgb(0, 0, 0, 0.1);
}

.completion-message {
  font-size: 1.2rem;
  color: #666;
  margin: 1.5rem 0;
  font-weight: 600;
}

.rewards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  border-radius: 15px;
}

.reward-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--theme-primary);
}

.reward-icon {
  font-size: 2rem;
}

.reward-text {
  font-size: 1.1rem;
}

.project-progress-container {
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  color: white;
  animation: pop-in 0.5s ease-out;
}

.project-piece-earned {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.project-piece-icon {
  font-size: 4rem;
  animation: spin-in 0.8s ease-out;
}

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

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

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

.project-piece-earned p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.completion-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 2rem auto 0;
}

/* Responsive adjustments for level complete screen */
@media (width <= 768px) {
  .celebration {
    padding: 2rem 1rem;
  }

  .celebration h2 {
    font-size: 2rem;
  }

  .completion-message {
    font-size: 1rem;
  }

  .reward-item {
    font-size: 1rem;
  }

  .reward-icon {
    font-size: 1.5rem;
  }

  .project-piece-icon {
    font-size: 3rem;
  }

  .completion-buttons {
    width: 100%;
  }
}
