* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #faf7ff;
  color: #2b2246;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Test Mode Indicator */
.test-mode-indicator {
  position: fixed;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #ff6b6b, #ff8e53);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 12px;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  animation: testModePulse 2s infinite;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

@keyframes testModePulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.5);
  }
}

/* Username prompt styles */
.username-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
}

.username-container {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 400px;
  width: 100%;
  transform: translateY(-20px);
  animation: slideIn 0.5s ease-out forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.welcome-logo {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  max-height: 100px;
}

@keyframes slideIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.username-container h2 {
  color: #2b2246;
  margin-bottom: 15px;
  font-size: clamp(24px, 4vw, 28px);
  font-weight: 600;
}

.username-container p {
  color: #5b4f86;
  margin-bottom: 25px;
  font-size: 16px;
}

.username-input {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  border: 2px solid #e1e5ee;
  border-radius: 16px;
  font-size: 16px;
  transition: all 0.3s ease;
  text-align: center;
  background: #ffffff;
}

.username-input:focus {
  border-color: #6b4eff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(107, 78, 255, 0.2);
}

.username-input::placeholder {
  color: #5b4f86;
}

/* intl-tel-input overrides to maintain the design */
.iti {
  width: 100%;
  margin-bottom: 20px;
}
.iti input.username-input {
  margin-bottom: 0;
  text-align: left;
  padding-left: 105px !important;
}

@media (max-width: 767px) {
  .iti .iti__country-list {
    bottom: auto;
    max-height: min(320px, calc(100vh - 230px));
    top: calc(100% + 8px);
  }
}

/* 3D pill button (matches pre-payment-complete.html pay-button) */
.btn-primary.pay-button {
  background: #581c87;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  outline-offset: 4px;
  width: 100%;
  display: block;
  box-shadow: 0 6px 0 #3b0764;
  transition: box-shadow 0.1s ease, transform 0.1s ease;
  position: relative;
  margin-top: 4px;
}

.btn-primary.pay-button .pay-button-inner {
  display: block;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 1.15rem;
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  transform: translateY(-3px);
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.3px;
  transition: transform 0.1s ease;
}

.btn-primary.pay-button:active {
  box-shadow: 0 2px 0 #3b0764;
}

.btn-primary.pay-button:active .pay-button-inner {
  transform: translateY(0);
}

.btn-primary.pay-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.app-container {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(43, 34, 70, 0.1);
  padding: clamp(16px, 4vw, 32px);
  max-width: min(960px, calc(100vw - 32px));
  width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Responsive breakpoints for centered content */
@media (max-width: 479px) {
  .app-container {
    max-width: calc(100vw - 16px);
    padding: 16px;
  }
}

@media (min-width: 768px) {
  .app-container {
    max-width: min(920px, calc(100vw - 48px));
    padding: 24px;
  }
}

@media (min-width: 1024px) {
  .app-container {
    max-width: min(1120px, calc(100vw - 64px));
    padding: 32px;
  }
}

.progress-bar {
  background: rgba(107, 78, 255, 0.1);
  height: 12px;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  position: relative;
}

.progress-fill {
  background: #6b4eff;
  height: 100%;
  border-radius: 12px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.question-counter {
  color: #777;
  font-size: 14px;
  margin-bottom: 20px;
}

.question-type {
  background: rgba(107, 78, 255, 0.1);
  padding: 12px 24px;
  border-radius: 12px;
  display: inline-block;
  font-size: 14px;
  color: #2b2246;
  margin: 0 auto 16px auto;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(107, 78, 255, 0.1);
  position: relative;
}

.sound-buttons-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 20px auto;
}

.sound-button {
  background: #6b4eff;
  border: none;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(107, 78, 255, 0.3);
}

.slow-sound-button {
  background: #ff6b4e;
  font-size: 24px;
  width: 60px;
  height: 60px;
  box-shadow: 0 4px 12px rgba(255, 107, 78, 0.3);
}

/* New Feature Highlighting */
.sound-button.featured-new {
  position: relative;
  animation: newFeaturePulse 2s infinite;
  border: 3px solid #ff6b6b;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.new-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ff6b6b, #ff8e53);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  animation: badgeBounce 1.5s infinite;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.new-feature-notice {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 16px auto;
  max-width: 600px;
  position: relative;
  animation: noticeSlideIn 0.5s ease-out;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.notice-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #856404;
  font-weight: 500;
}

.notice-icon {
  font-size: 18px;
  animation: iconBounce 2s infinite;
}

.notice-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  color: #856404;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.notice-close:hover {
  opacity: 1;
}

@keyframes newFeaturePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 107, 107, 0.7);
  }
}

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

@keyframes noticeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Hide notice after first visit */
.new-feature-notice.dismissed {
  display: none;
}

.sound-button:hover {
  background: #5a41e8;
  transform: scale(1.05);
}

.slow-sound-button:hover {
  background: #e55a3e;
  transform: scale(1.05);
}

.syllable-sound-button:hover {
  background: #3eb8e8;
  transform: scale(1.05);
}

.featured-new:hover {
  background: #3eb8e8 !important;
  transform: scale(1.1) !important;
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.7) !important;
}

.sound-button:active {
  transform: scale(0.95);
}

.question-text {
  font-size: clamp(20px, 4vw, 24px);
  margin-bottom: 30px;
  color: #2b2246;
  line-height: 1.4;
  text-align: center;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.input-container {
  margin: 30px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.attempts-container {
  margin: 20px 0;
}

.attempt-section {
  margin: 20px 0;
}

.attempt-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  font-weight: 600;
}

.word-boxes {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: 16px auto;
  flex-wrap: nowrap;
  max-width: 100%;
}

.letter-slot {
  width: 55px;
  height: 60px;
  border: 3px solid #6b4eff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  background: white;
  transition: all 0.2s ease;
  cursor: pointer;
  margin: 2px;
}

.letter-box {
  width: 50px;
  height: 50px;
  border: 3px solid #d3d6da;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  background: white;
  transition: all 0.2s ease;
}

.letter-box.filled {
  border-color: #878a8c;
  background: #f8f9fa;
}

.letter-box.current {
  border-color: #6b4eff;
  animation: pulse 1s infinite;
}

.letter-box.correct {
  background: #6aaa64 !important;
  color: white !important;
  border-color: #6aaa64 !important;
}

.letter-box.correct-position {
  background: #4caf50 !important;
  color: white !important;
  border-color: #4caf50 !important;
  animation: flipTile 0.5s ease forwards;
}

.letter-box.wrong-position {
  background: #ffd700 !important;
  color: #333 !important;
  border-color: #ffd700 !important;
  animation: flipTile 0.5s ease forwards;
}

.letter-box.incorrect {
  background: #808080 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  border-color: #808080 !important;
  animation: flipTile 0.5s ease forwards;
}

.letter-box.disabled {
  background: #f5f5f5;
  border-color: #ddd;
  color: #888;
}

@keyframes flipTile {
  0% {
    transform: rotateX(0);
  }
  50% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0);
  }
}

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

.keyboard {
  margin: 20px 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  margin: 6px 0;
  gap: 4px;
}

.key {
  background: #d3d6da;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  height: 40px;
  cursor: pointer;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  color: #000;
}

.key:hover {
  background: #bbbfc3;
}

.key:active {
  transform: scale(0.95);
}

.key.letter {
  width: 35px;
}

.key.wide {
  width: 60px;
  font-size: 12px;
}

.key.space {
  width: 40px;
}

.key.correct {
  background: #4caf50 !important; /* Green */
  color: white;
}

.key.present {
  background: #ffd700 !important; /* Orange/Gold */
  color: #333;
}

.key.absent {
  background: #808080 !important; /* Grey */
  color: rgba(255, 255, 255, 0.7);
}

.word-input {
  display: none;
}

.options-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 30px auto;
  width: 100%;
  max-width: 600px;
}

.options-row {
  display: flex;
  gap: 20px;
  width: 100%;
  justify-content: center;
  align-items: center;
}

/* Override for 4-option layout - keep container properties */
.options-container.options-4 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 30px auto;
  width: 100%;
  max-width: 500px;
}

/* Override for 2-option layout - keep container properties */
.options-container.options-2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 30px auto;
  width: 100%;
  max-width: 400px;
}

/* Vertical spacing between option rows */
.options-container > .options-row:not(:last-child) {
  margin-bottom: 10px;
}

.option-btn {
  background: white;
  border: 3px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.option-btn:hover {
  border-color: #58cc02;
  background: #f8fff8;
}

.option-btn.selected {
  border-color: #58cc02;
  background: #58cc02;
  color: white;
}

.option-btn.correct {
  border-color: #58cc02;
  background: #58cc02;
  color: white;
  font-size: 22px;
  font-weight: 700;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(88, 204, 2, 0.3);
  transition: all 0.3s ease;
}

.option-btn.incorrect {
  border-color: #ff6b6b;
  background: #ff6b6b;
  color: white;
}

.feedback {
  margin: 20px 0;
  padding: 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.feedback.correct {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.feedback.incorrect {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.buttons-container {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* Special positioning for 2-option game buttons */
.options-2-active .buttons-container {
  margin-top: 15px;
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
}

/* Letter Scramble Styles - Click to Place */
.letter-scramble-container {
  margin: 20px 0;
  text-align: center;
}

.scramble-instruction {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  font-weight: 500;
}

.word-display {
  font-size: 32px;
  font-weight: bold;
  color: #333;
  margin: 30px 0;
  min-height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.letter-slot {
  width: 55px;
  height: 60px;
  border: 3px solid #58cc02;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 3px;
  background: #f9f9f9;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 32px;
  font-weight: bold;
}

/* Smaller letter slots for mobile */
@media (max-width: 480px) {
  .letter-slot {
    width: 40px;
    height: 45px;
    border: 2px solid #6b4eff;
    font-size: 18px;
  }
}

/* Even smaller for very small phones */
@media (max-width: 360px) {
  .letter-slot {
    width: 35px;
    height: 40px;
    border-radius: 6px;
    margin: 1px;
    font-size: 20px;
  }
}

.letter-slot:hover {
  background: rgba(107, 78, 255, 0.1);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(107, 78, 255, 0.3);
}

.letter-slot.filled {
  background: rgba(107, 78, 255, 0.1);
  color: #2b2246;
}

.letter-slot.filled:hover {
  background: #ffebee;
  border-color: #ff4757;
}

.letter-slot.selected {
  background: #fff3cd;
  border-color: #ffc107;
  box-shadow: 0 0 15px rgba(255, 193, 7, 0.5);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

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

.tiles-label {
  font-size: 18px;
  color: #666;
  margin-bottom: 15px;
  font-weight: 500;
}

.letter-tiles-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.tile-slot {
  width: 55px;
  height: 60px;
  border: 2px dashed #ccc;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
  transition: all 0.3s ease;
}

.tile-slot.has-letter {
  border: 2px solid #58cc02;
  background: #f0fff0;
}

.click-letter-tile {
  width: 50px;
  height: 55px;
  background: #6b4eff;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(107, 78, 255, 0.3);
}

/* Smaller click-letter-tiles for mobile */
@media (max-width: 480px) {
  .click-letter-tile {
    width: 38px;
    height: 42px;
    border-radius: 6px;
    font-size: 20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  }
}

/* Even smaller for very small phones */
@media (max-width: 360px) {
  .click-letter-tile {
    width: 32px;
    height: 36px;
    border-radius: 5px;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
}

.click-letter-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(107, 78, 255, 0.4);
  background: #5a41e8;
}

.click-letter-tile:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Scramble attempts display */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 30px auto;
  width: 100%;
  max-width: 600px;
  align-items: center;
}

.attempt-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.scramble-attempt-box {
  min-width: 200px;
  min-height: 50px;
  border: 3px solid #e9ecef;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  color: #333;
  transition: border-color 0.2s, background 0.2s;
}

.scramble-attempt-box.active {
  border-color: #007bff;
  background: #e3f2fd;
}

.scramble-attempt-box.correct {
  border-color: #28a745;
  background: #d4edda;
  color: #155724;
}

.scramble-attempt-box.wrong {
  border-color: #dc3545;
  background: #f8d7da;
  color: #721c24;
}

.tutorial-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  border-radius: 12px;
}

.tutorial-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  max-width: 300px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tutorial-demo {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}

.demo-tile {
  width: 40px;
  height: 40px;
  background: linear-gradient(145deg, #d4a574, #b8935f);
  border: 3px solid #8b6914;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: #2d1810;
  position: relative;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.demo-tile.demo-dragging {
  animation: demoMove 2s ease-in-out infinite;
  background: linear-gradient(145deg, #f0c895, #d4b480);
  color: #2d1810;
  transform: rotate(3deg) scale(1.05);
  z-index: 10;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}

@keyframes demoMove {
  0% {
    transform: translateX(0) rotate(3deg) scale(1.05);
  }
  50% {
    transform: translateX(50px) rotate(3deg) scale(1.05);
  }
  100% {
    transform: translateX(0) rotate(3deg) scale(1.05);
  }
}

.tutorial-text {
  font-size: 16px;
  color: #333;
  margin-bottom: 15px;
  line-height: 1.4;
}

.tutorial-button {
  background: #58cc02;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.tutorial-button:hover {
  background: #46a302;
}

.letter-tiles {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  margin: 20px 0;
  overflow: visible;
  padding: 0 5px;
  width: 100%;
  box-sizing: border-box;
}

.drag-placeholder {
  background: rgba(180, 147, 95, 0.3);
  border-radius: 12px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(0.95);
  animation: placeholderPulse 1s ease-in-out infinite alternate;
}

@keyframes placeholderPulse {
  0% {
    opacity: 0.4;
    transform: scale(0.95);
  }
  100% {
    opacity: 0.7;
    transform: scale(1.02);
  }
}

/* Word Parts Game Styles */
.word-parts-container {
  margin: 20px 0;
}

.combined-word-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.combined-word-input {
  min-width: 200px;
  min-height: 50px;
  border: 3px solid #e9ecef;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  color: #333;
  transition: border-color 0.2s, background 0.2s;
}

.combined-word-input.filled {
  border-color: #007bff;
  background: #e3f2fd;
}

.combined-word-input.correct {
  border-color: #28a745;
  background: #d4edda;
  color: #155724;
}

.combined-word-input.wrong {
  border-color: #dc3545;
  background: #f8d7da;
  color: #721c24;
}

.word-parts-lots {
  display: flex;
  gap: 8px;
  margin: 0 auto 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow: visible;
}

.word-part-lot {
  flex: 0 0 auto;
  min-width: 110px;
  max-width: 150px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 15px 10px;
  margin: 0 8px;
  border: 2px solid #c0c0c0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.word-part-lot:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border-color: #a0a0a0;
}

.lot-title {
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 14px;
}

.part-option {
  display: block;
  width: 100%;
  padding: 10px 5px;
  margin: 6px 0;
  text-align: center;
  background: #ffffff;
  border: 2px solid #d0d0d0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.part-option:hover {
  background: #f8f8f8;
  border-color: #bbbbbb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.part-option.selected {
  border-color: #4caf50;
  background-color: #f0fff0;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.part-option.correct {
  background: #28a745;
  color: #fff;
  border-color: #1e7e34;
}

.part-option.wrong {
  background: #dc3545;
  color: #fff;
  border-color: #c82333;
}

.word-parts-attempts {
  text-align: center;
  margin: 15px 0;
  font-size: 14px;
  color: #666;
}

.combined-word-boxes {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.attempt-label {
  font-size: 12px;
  font-weight: bold;
  color: #666;
  margin-bottom: 5px;
  text-align: center;
}

.combined-word-input.active {
  border: 2px solid #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Mobile layout for word parts - single row */
@media (max-width: 768px) {
  .word-parts-lots {
    flex-direction: row;
    gap: 5px;
    padding: 5px 0;
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  .word-parts-lots::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari and Opera */
  }

  .word-part-lot {
    flex: 1;
    min-width: 100px;
    max-width: 120px;
  }

  .lot-title {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .part-option {
    padding: 8px 5px;
    font-size: 16px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 4px 0;
    border-radius: 8px;
    border: 2px solid #d0d0d0;
    background-color: #ffffff;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    font-weight: 600;
    color: #333333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Smaller sizes for phones */
@media (max-width: 480px) {
  .word-part-lot {
    min-width: 85px;
    max-width: 100px;
  }

  .lot-title {
    font-size: 11px;
    margin-bottom: 6px;
  }

  .part-option {
    padding: 6px 4px;
    font-size: 14px;
    min-height: 32px;
    margin: 3px 0;
    border-radius: 6px;
    border-width: 1px;
  }
}

/* Even smaller for very small phones */
@media (max-width: 360px) {
  .word-part-lot {
    min-width: 75px;
    max-width: 90px;
  }

  .lot-title {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .part-option {
    padding: 5px 3px;
    font-size: 12px;
    min-height: 28px;
    margin: 2px 0;
    border-radius: 5px;
  }
}

.part-option:hover {
  background: #f8f8f8;
  border-color: #bbbbbb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.part-option.selected {
  border-color: #4caf50;
  background-color: #f0fff0;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.part-option.correct {
  background: #28a745 !important;
  color: #fff !important;
  border-color: #1e7e34 !important;
}

.part-option.wrong {
  background: #dc3545 !important;
  color: #fff !important;
  border-color: #c82333 !important;
}

.combined-word-input {
  min-width: 150px;
  min-height: 40px;
  font-size: 16px;
}

.combined-word-boxes {
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.combined-word-box {
  padding: 10px;
  margin-bottom: 5px;
}

.letter-tile {
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #d4a574, #b8935f);
  border: 3px solid #8b6914;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: #2d1810;
  cursor: grab;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  user-select: none;
  flex-shrink: 0;
  position: relative;
  transform-origin: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* Responsive sizing for smaller screens */
@media (max-width: 480px) {
  .letter-tile {
    width: 30px;
    height: 30px;
    font-size: 14px;
    border-radius: 8px;
    border-width: 2px;
  }

  .letter-tiles {
    gap: 4px;
    padding: 0 2px;
  }

  /* Make the formed-word area smaller too */
  .formed-word {
    min-height: 40px;
    padding: 10px;
    margin: 10px 0;
  }
}

@media (max-width: 360px) {
  .letter-tile {
    width: 26px;
    height: 26px;
    font-size: 12px;
    border-radius: 6px;
    border-width: 2px;
  }
}

.letter-tile:hover {
  background: linear-gradient(145deg, #e0b885, #c4a470);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.letter-tile.dragging {
  opacity: 0.3;
  transform: rotate(3deg) scale(0.9);
  cursor: grabbing;
  z-index: 1000;
  background: linear-gradient(145deg, #f0c895, #d4b480);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

/* Enhanced touch clone styling */
.touch-clone {
  background: linear-gradient(145deg, #4caf50, #45a049) !important;
  color: white !important;
  border: 3px solid #2e7d32 !important;
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4), 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  font-weight: bold !important;
  transform-origin: center !important;
}

.formed-word {
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: #495057;
  gap: 4px;
}

.formed-word.has-letters {
  border-color: #58cc02;
  background: #f8fff8;
}

.formed-word.empty {
  font-size: 16px;
  color: #999;
  font-weight: normal;
}

.formed-letter {
  background: #58cc02;
  color: white;
  border-radius: 6px;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.formed-letter:hover {
  background: #46a302;
  transform: scale(1.1);
}

.drop-zone {
  width: 8px;
  height: 35px;
  background: transparent;
  border: 2px dashed transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.drop-zone:hover {
  border-color: #58cc02;
  background: rgba(88, 204, 2, 0.1);
}

.drop-zone.active {
  border-color: #58cc02;
  background: rgba(88, 204, 2, 0.2);
  width: 12px;
}

.shuffle-controls {
  margin: 15px 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.shuffle-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shuffle-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.clear-btn {
  background: #dc3545;
}

.clear-btn:hover {
  background: #c82333;
}

.btn {
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-check {
  background: #6b4eff;
  color: white;
  min-height: 48px;
  min-width: 180px;
  margin: 0 auto;
  display: block;
}

.btn-check:hover {
  background: #5a41e8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 78, 255, 0.3);
}

.btn-check:active {
  transform: scale(0.98);
}

.btn-check:disabled {
  background: rgba(107, 78, 255, 0.3);
  cursor: not-allowed;
  transform: none;
}

.btn-continue {
  background: #6b4eff;
  color: white;
  min-height: 48px;
  min-width: 180px;
  margin: 0 auto;
  display: block;
}

.btn-continue:hover {
  background: #5a41e8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 78, 255, 0.3);
}

.btn-continue:active {
  transform: scale(0.98);
}

.btn-continue:disabled {
  background: rgba(107, 78, 255, 0.3);
  cursor: not-allowed;
  transform: none;
}

.mode-indicator {
  background: #ff9500;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
  display: inline-block;
  text-transform: uppercase;
}

.practice-mode {
  background: #e74c3c;
  color: white;
}

.word-display {
  font-size: 32px;
  font-weight: bold;
  color: #58cc02;
  margin: 20px 0;
  letter-spacing: 2px;
}

.completion-screen {
  text-align: center;
}

.completion-title {
  font-size: 28px;
  color: #58cc02;
  margin-bottom: 20px;
  font-weight: bold;
}

.completion-stats {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  font-size: 16px;
}

.restart-btn {
  background: #58cc02;
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: 12px;

  .failed-words-title {
    font-weight: bold;
    color: #856404;
    margin-bottom: 10px;
  }

  .failed-word-item {
    background: #fd79a8;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
    margin: 3px;
    font-size: 14px;
  }
  margin-bottom: 10px;
}

.failed-word-item {
  background: #fd79a8;
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  display: inline-block;
  margin: 3px;
  font-size: 14px;
}

.review-button {
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  margin-left: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.review-button:hover {
  background: #ff5252;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.review-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.letter-tile.dragging {
  transform: scale(1.1) rotate(3deg) translateZ(0);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transition: none;
  cursor: grabbing;
  opacity: 0.9;
}

/* Chain reaction animation styles */
@keyframes superBounce {
  0% {
    transform: scale(1) translateY(0px);
  }
  25% {
    transform: scale(1.2) translateY(-8px) rotateZ(3deg);
  }
  50% {
    transform: scale(1.1) translateY(-12px) rotateZ(-2deg);
  }
  75% {
    transform: scale(1.15) translateY(-6px) rotateZ(1deg);
  }
  100% {
    transform: scale(1) translateY(0px) rotateZ(0deg);
  }
}

@keyframes shockwave {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@keyframes pageShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-1px) translateY(1px);
  }
  50% {
    transform: translateX(1px) translateY(-1px);
  }
  75% {
    transform: translateX(-1px) translateY(1px);
  }
}

.letter-box.chain-animate {
  animation: superBounce 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.shockwave-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: inherit;
  transform: translate(-50%, -50%);
  animation: shockwave 0.4s ease-out;
  pointer-events: none;
}

.app-container.shake {
  animation: pageShake 0.15s ease-in-out;
}

/* Card Display Styles */
.card-display {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  color: white;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.card-subtitle {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.reward-card {
  max-width: 300px;
  max-height: 450px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.reward-card:hover {
  transform: scale(1.05);
}

.card-points {
  font-size: 20px;
  font-weight: bold;
  margin: 20px 0;
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Word Hint Styles - No Box */
.word-hint {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 20px auto 15px !important;
  max-width: 95% !important;
  display: block;
  text-align: center;
}

.hint-label {
  font-size: 16px;
  font-weight: 600;
  color: #6c757d;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.hint-text {
  font-size: 24px; /* Increased base size for phones */
  line-height: 1.4;
  font-weight: 500;
  color: #000000;
  margin: 0;
  padding: 0 !important;
  word-break: break-word;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  display: inline !important;
  letter-spacing: 0.5px;
}

/* Phone devices (default) */
@media (max-width: 374px) {
  .hint-label {
    font-size: 18px;
    margin-bottom: 12px;
  }
  .hint-text {
    font-size: 28px;
  }
}

/* Small phones (320px and below) */
@media (max-width: 320px) {
  .hint-label {
    font-size: 16px;
  }
  .hint-text {
    font-size: 26px;
  }
}

/* Small tablets and large phones (375px and up) */
@media (min-width: 375px) and (max-width: 767px) {
  .hint-label {
    font-size: 20px;
    margin-bottom: 15px;
  }
  .hint-text {
    font-size: 32px;
  }
}

/* Tablets (768px and up) */
@media (min-width: 768px) {
  .hint-label {
    font-size: 22px;
    margin-bottom: 12px;
  }
  .hint-text {
    font-size: 36px;
  }
}

/* Desktops (1024px and up) */
@media (min-width: 1024px) {
  .hint-label {
    font-size: 18px;
  }
  .hint-text {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  .word-hint {
    margin: 18px auto 12px;
  }
  
  .hint-label {
    font-size: 14px;
    letter-spacing: 1.5px;
    padding: 0 15px;
  }
  
  .hint-label:before,
  .hint-label:after {
    width: 40px;
  }
  
  .hint-text {
    font-size: 18px;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .word-hint {
    margin: 15px auto 10px;
  }
  
  .hint-label {
    font-size: 13px;
    letter-spacing: 1px;
    padding: 0 12px;
  }
  
  .hint-label:before,
  .hint-label:after {
    width: 25px;
  }
  
  .hint-text {
    font-size: 16px;
    line-height: 1.4;
    padding: 0 10px;
  }
}


/* Tablet portrait Mode (768px - 1024px) */
@media (min-width: 481px) and (max-width: 1024px) and (orientation: portrait) {
  .app-container {
    font-size: 20px;
    margin: 20px 0;
  }

  .word-hint {
    margin: 20px auto 10px;
    max-width: 90%;
  }

  .hint-label {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .word-boxes {
    gap: 8px;
    margin: 20px 0;
  }

  .letter-box {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  .keyboard {
    max-width: 90%;
    margin: 25px auto;
  }

  .key {
    min-width: 35px;
    height: 45px;
    font-size: 16px;
    margin: 2px;
  }

  .key.wide {
    min-width: 60px;
  }

  .options-container {
    margin: 25px 0;
  }

  .options-4 {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-width: 90%;
  }

  .options-2 {
    max-width: 70%;
    gap: 15px;
  }

  .option-btn {
    padding: 15px 20px;
    font-size: 16px;
    min-height: 60px;
  }

  .buttons-container {
    margin: 25px 0;
    gap: 15px;
  }

  .btn {
    padding: 12px 25px;
    font-size: 16px;
    min-height: 50px;
  }

  .completion-screen {
    padding: 25px;
    max-width: 90%;
  }

  .card-display {
    padding: 30px 20px;
    max-width: 90%;
  }

  .reward-card {
    max-width: 180px;
    max-height: 270px;
  }
}

/* Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
  .app-container {
    padding: 15px;
  }

  .review-button {
    font-size: 12px;
    padding: 5px 10px;
    margin-left: 8px;
  }

  .sound-buttons-container {
    gap: 10px;
    margin: 15px auto;
  }

  .sound-button {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  .slow-sound-button {
    font-size: 18px;
    width: 50px;
    height: 50px;
  }

  .syllable-sound-button {
    font-size: 18px;
    width: 50px;
    height: 50px;
  }

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

  .word-hint {
    margin: 15px auto 5px;
    max-width: 95%;
  }

  .hint-label {
    font-size: 14px;
    margin-bottom: 5px;
  }

  .hint-text {
    font-size: 16px;
  }
  
  .hint-label:before,
  .hint-label:after {
    width: 20px;
  }
  
  .hint-label:before {
    left: -25px;
  }
  
  .hint-label:after {
    right: -25px;
  }

  .letter-box {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .key {
    min-width: 28px;
    height: 38px;
    font-size: 14px;
  }

  .key.wide {
    min-width: 50px;
  }

  .options-4 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .option-btn {
    padding: 12px 15px;
    font-size: 14px;
    min-height: 50px;
  }

  .buttons-container {
    flex-direction: column;
    gap: 10px;
  }

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

  .completion-screen {
    padding: 20px;
  }

  .card-display {
    padding: 25px 15px;
  }

  .reward-card {
    max-width: 150px;
    max-height: 225px;
  }
}

/* Laptop/Desktop Screens (1025px and above) */
@media (min-width: 1025px) {
  .word-hint {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 15px;
    margin: 15px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 500px;
    width: fit-content;
    display: block;
  }
}

/* Words-Meaning Game Sticky Note Styles */
.words-meaning-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 25px 50px;
  padding: 30px;
  max-width: 750px;
  margin: 0 auto;
  min-height: 400px;
  grid-template-areas: 
    "left-top right-top"
    "left-bottom right-bottom";
}

.sticky-note-option {
  background: #FFE4B5;
  border: none;
  border-radius: 8px;
  padding: 25px 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15), 
              0 3px 6px rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  transform: rotate(-1deg);
  border-left: 6px solid rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: 
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0, 0 0;
}

.sticky-note-option:nth-child(1) {
  grid-area: left-top;
  transform: rotate(-1deg);
}

.sticky-note-option:nth-child(2) {
  grid-area: left-bottom;
  transform: rotate(1.5deg);
  background: #E6E6FA;
  background-image: 
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 18px 18px;
  border-left: 6px solid rgba(138, 43, 226, 0.15);
}

.sticky-note-option:nth-child(3) {
  grid-area: right-top;
  transform: rotate(-0.8deg);
  background: #F0F8FF;
  background-image: 
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  border-left: 6px solid rgba(70, 130, 180, 0.15);
}

.sticky-note-option:nth-child(4) {
  grid-area: right-bottom;
  transform: rotate(0.8deg);
  background: #F5F5DC;
  background-image: 
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 19px 19px;
  border-left: 6px solid rgba(218, 165, 32, 0.15);
}

.sticky-note-option:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), 
              0 6px 15px rgba(0, 0, 0, 0.15),
              inset 0 2px 0 rgba(255, 255, 255, 0.4);
  z-index: 10;
  border-left: 6px solid rgba(0, 0, 0, 0.2);
}

.sticky-note-option.selected {
  transform: rotate(0deg) translateY(-3px) scale(1.01);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4), 
              0 4px 12px rgba(0, 0, 0, 0.15),
              inset 0 2px 0 rgba(255, 255, 255, 0.3);
  border-left: 6px solid #007bff;
  border-top: 2px solid rgba(0, 123, 255, 0.3);
}

.sticky-note-option.correct {
  transform: rotate(0deg) translateY(-3px) scale(1.01);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4), 
              0 4px 12px rgba(0, 0, 0, 0.15),
              inset 0 2px 0 rgba(255, 255, 255, 0.4);
  border-left: 6px solid #28a745;
  border-top: 2px solid rgba(40, 167, 69, 0.3);
  animation: correctPulse 0.6s ease-out;
}

.sticky-note-option.incorrect {
  transform: rotate(0deg) translateY(-3px) scale(1.01);
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4), 
              0 4px 12px rgba(0, 0, 0, 0.15),
              inset 0 2px 0 rgba(255, 255, 255, 0.3);
  border-left: 6px solid #dc3545;
  border-top: 2px solid rgba(220, 53, 69, 0.3);
  animation: incorrectShake 0.5s ease-out;
}

.sticky-note-text {
  font-size: 15px;
  font-weight: 500;
  color: #2b2246;
  text-align: center;
  line-height: 1.5;
  font-family: "Georgia", "Times New Roman", serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.3px;
}

.correct-indicator {
  color: #28a745;
  font-size: 18px;
  font-weight: bold;
}

@keyframes correctPulse {
  0% { transform: rotate(0deg) translateY(-2px) scale(1); }
  50% { transform: rotate(0deg) translateY(-2px) scale(1.05); }
  100% { transform: rotate(0deg) translateY(-2px) scale(1); }
}

@keyframes incorrectShake {
  0%, 100% { transform: rotate(0deg) translateY(-2px) translateX(0); }
  25% { transform: rotate(0deg) translateY(-2px) translateX(-5px); }
  75% { transform: rotate(0deg) translateY(-2px) translateX(5px); }
}

/* Mobile responsive adjustments for sticky notes */
@media (max-width: 768px) {
  .words-meaning-container {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px 35px;
    padding: 20px;
    max-width: 600px;
    min-height: 350px;
    grid-template-areas: 
      "left-top right-top"
      "left-bottom right-bottom";
  }
  
  .sticky-note-option {
    padding: 20px 15px;
    min-height: 100px;
  }
  
  .sticky-note-text {
    font-size: 14px;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  .words-meaning-container {
    gap: 15px 25px;
    padding: 15px;
    max-width: 480px;
    min-height: 300px;
    grid-template-areas: 
      "left-top right-top"
      "left-bottom right-bottom";
  }
  
  .sticky-note-option {
    padding: 15px 12px;
    min-height: 80px;
  }
  
  .sticky-note-text {
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 0.2px;
  }
}

/* Context Choice Game Styles */
.context-choice-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.context-sentence {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.context-sentence p {
  font-size: 18px;
  line-height: 1.6;
  color: #2b2246;
  margin-bottom: 15px;
  font-family: "Georgia", "Times New Roman", serif;
  text-align: center;
}

.context-sentence p:last-child {
  margin-bottom: 0;
}

.context-question {
  font-weight: 700;
  color: #4facfe !important;
  font-size: 18px !important;
  margin-top: 25px !important;
  text-align: center;
  padding: 10px;
  background: rgba(79, 172, 254, 0.1);
  border-radius: 8px;
  border: 2px solid rgba(79, 172, 254, 0.3);
}

.context-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.context-option-btn {
  background: white;
  border: 3px solid #e0e0e0;
  border-radius: 12px;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #2b2246;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.context-option-btn:hover {
  border-color: #58cc02;
  background: #f8fff8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.context-option-btn.selected {
  border-color: #58cc02;
  background: #58cc02;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 204, 2, 0.3);
}

.context-option-btn.correct {
  border-color: #58cc02;
  background: #58cc02;
  color: white;
  animation: correctPulse 0.6s ease-out;
  box-shadow: 0 4px 12px rgba(88, 204, 2, 0.4);
}

.context-option-btn.incorrect {
  border-color: #ff6b6b;
  background: #ff6b6b;
  color: white;
  animation: incorrectShake 0.5s ease-out;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* Mobile responsive adjustments for context choice */
@media (max-width: 768px) {
  .context-choice-container {
    padding: 15px;
  }
  
  .context-sentence {
    padding: 20px;
    margin-bottom: 25px;
  }
  
  .context-sentence p {
    font-size: 16px;
  }
  
  .context-options-grid {
    gap: 12px;
    max-width: 500px;
  }
  
  .context-option-btn {
    padding: 12px 15px;
    font-size: 15px;
    min-height: 50px;
  }
}

@media (max-width: 480px) {
  .context-options-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  
  .context-sentence p {
    font-size: 15px;
  }
  
  .context-option-btn {
    padding: 15px;
    font-size: 14px;
  }
}

/* Correct Sentence Game Styles */
.correct-sentence-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.sentence-question {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 2px solid #2196f3;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
  text-align: center;
}

.sentence-question p {
  font-size: 20px;
  font-weight: 600;
  color: #1565c0;
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

.sentence-option-btn {
  background: white;
  border: 3px solid #4c4545;
  border-radius: 12px;
  padding: 20px 25px;
  font-size: 16px;
  font-weight: 500;
  color: #2b2246;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  min-height: 80px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 15px;
  line-height: 1.5;
  width: 100%;
}

.sentence-option-btn .option-letter {
  font-weight: 700;
  color: #4facfe;
  margin-right: 12px;
  flex-shrink: 0;
  font-size: 18px;
}

.sentence-option-btn:hover {
  border-color: #58cc02;
  background: #f8fff8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sentence-option-btn.selected {
  border-color: #58cc02;
  background: #58cc02;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 204, 2, 0.3);
}

.sentence-option-btn.selected .option-letter {
  color: white;
}

.sentence-option-btn.correct {
  border-color: #58cc02;
  background: #58cc02;
  color: white;
  animation: correctPulse 0.6s ease-out;
  box-shadow: 0 4px 12px rgba(88, 204, 2, 0.4);
}

.sentence-option-btn.correct .option-letter {
  color: white;
}

.sentence-option-btn.incorrect {
  border-color: #ff6b6b;
  background: #ff6b6b;
  color: white;
  animation: incorrectShake 0.5s ease-out;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.sentence-option-btn.incorrect .option-letter {
  color: white;
}

/* Mobile responsive adjustments for correct sentence */
@media (max-width: 768px) {
  .correct-sentence-container {
    padding: 15px;
    max-width: 100%;
  }
  
  .sentence-question {
    padding: 20px;
    margin-bottom: 25px;
  }
  
  .sentence-question p {
    font-size: 18px;
  }
  
  .sentence-option-btn {
    padding: 18px 20px;
    font-size: 15px;
    min-height: 70px;
    margin-bottom: 12px;
  }
  
  .sentence-option-btn .option-letter {
    font-size: 16px;
    margin-right: 10px;
  }
}

/* Correct Answer Section Styles */
#correctAnswerSection {
  margin-top: 20px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
  padding: 5px;
}

#correctAnswerSection .section-title {
  font-weight: 600;
  color: #4a4a4a;
  margin-bottom: 10px;
  font-size: 16px;
  text-align: center;
}

#correctAnswerBoxes {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2px;
}

#correctAnswerBoxes .letter-box {
  width: 44px;
  padding: 4px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  background: #f0f4ff;
  border: 2px solid #d0d8ff;
  border-radius: 8px;
  color: #4a4a4a;
  transition: all 0.3s ease;
}

#correctAnswerBoxes .incorrect-letter {
  background: #4CAF50;
  color: white;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  border: 2px solid #b9f6ca;
  position: relative;
  z-index: 1;
  animation: pop 0.3s cubic-bezier(0.25, 0.1, 0.25, 1.5) forwards,
             glow 1s ease-in-out infinite alternate;


@keyframes pop {
  0% { transform: scale(0.9); opacity: 0.8; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 10px rgba(200, 255, 200, 0.8),
                0 0 20px rgba(100, 255, 100, 0.8),
                0 0 30px rgba(76, 255, 76, 0.8);
  }
  100% {
    box-shadow: 0 0 15px rgba(200, 255, 200, 1),
                0 0 30px rgba(100, 255, 100, 1),
                0 0 45px rgba(76, 255, 76, 0.9),
                0 0 60px rgba(76, 255, 200, 0.6);
  }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .sentence-question {
    padding: 18px;
    margin-bottom: 20px;
  }
  
  .sentence-question p {
    font-size: 16px;
  }
  
  .sentence-option-btn {
    padding: 15px 18px;
    font-size: 14px;
    min-height: 60px;
    margin-bottom: 10px;
    line-height: 1.4;
  }
  
  .sentence-option-btn .option-letter {
    font-size: 15px;
    margin-right: 8px;
  }
}
}


.header-wrapper {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: center;
  width: 100%;
  margin-bottom: 24px;
  gap: 12px;
}

.emoji {
  font-size: 48px;
}

.emoji img {
  width: 48px;
  height: 48px;
}


.zoomIn {
  animation: zoomIn var(--animation-speed, 0.2s) cubic-bezier(0.4, 0, 0.2, 1)
    forwards;
}


@keyframes zoomIn {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0);
    opacity: 0;
  }
}

.zoomOut {
  animation: zoomOut var(--animation-speed, 0.2s) cubic-bezier(0.4, 0, 0.2, 1)
    forwards;
}

@keyframes zoomOut {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.emoji .none {
  display: none;
}