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

:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-tertiary: #0f3460;
  --accent-primary: #667eea;
  --accent-secondary: #764ba2;
  --success: #4ade80;
  --error: #f87171;
  --warning: #fbbf24;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg,
      var(--bg-primary),
      var(--bg-secondary),
      var(--bg-tertiary));
  min-height: 100vh;
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 80px;
  /* Space for bottom nav */
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 20px;
}

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

/* Header */
.header {
  text-align: center;
  padding: 40px 0 30px;
}

.title {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.subtitle {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 0.95rem;
}

.coin-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass);
  padding: 8px 16px;
  border-radius: 50px;
  margin-top: 16px;
  font-weight: 600;
}

.coin-display.small {
  padding: 6px 12px;
  font-size: 0.9rem;
  margin: 0;
}

.coin-icon {
  font-size: 1.1rem;
}

/* Difficulty Tabs */
.difficulty-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.tab {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tab.active {
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-secondary));
  color: white;
  border-color: transparent;
}

.tab.active[data-difficulty="easy"] {
  background: rgba(74, 222, 128, 0.3);
  color: var(--success);
}

.tab.active[data-difficulty="medium"] {
  background: rgba(251, 191, 36, 0.3);
  color: var(--warning);
}

.tab.active[data-difficulty="hard"] {
  background: rgba(248, 113, 113, 0.3);
  color: var(--error);
}

/* Level Grid */
.level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  flex: 1;
}

.level-card {
  aspect-ratio: 1;
  background: linear-gradient(135deg,
      rgba(102, 126, 234, 0.2),
      rgba(102, 126, 234, 0.05));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.level-card:hover:not(.locked) {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.level-card.locked {
  background: rgba(156, 163, 175, 0.1);
  cursor: not-allowed;
  opacity: 0.6;
}

.level-card.completed {
  border-color: rgba(74, 222, 128, 0.5);
  border-width: 2px;
}

.level-number {
  font-size: 1.8rem;
  font-weight: 800;
}

.level-card.completed .level-number {
  color: var(--success);
}

.level-words {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.lock-icon {
  font-size: 1.5rem;
  opacity: 0.5;
}

.review-badge {
  font-size: 0.65rem;
  color: var(--accent-primary);
  background: rgba(102, 126, 234, 0.2);
  padding: 3px 8px;
  border-radius: 50px;
  margin-top: 2px;
  font-weight: 600;
  display: inline-block;
}


/* Game Header */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 20px;
}

.icon-btn {
  background: var(--glass);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.level-info {
  text-align: center;
}

#level-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.difficulty-badge {
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 50px;
  background: rgba(74, 222, 128, 0.2);
  color: var(--success);
}

/* Word Chain */
.word-chain {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.word-row {
  display: flex;
  margin-bottom: 8px;
}

.word-indent {
  flex-shrink: 0;
}

.word-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.word-box {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: "SF Mono", "Consolas", monospace;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.word-box.starting {
  background: rgba(74, 222, 128, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.word-box.revealed {
  background: rgba(102, 126, 234, 0.2);
  border: 1px solid rgba(102, 126, 234, 0.4);
}

.word-box.correct {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--success);
}

.word-box.wrong {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--error);
  font-size: 0.95rem;
}

.word-box.skipped {
  background: rgba(251, 191, 36, 0.2);
  border: 2px solid rgba(251, 191, 36, 0.5);
  color: var(--warning);
  animation: revealSkip 0.6s ease-out;
}

@keyframes revealSkip {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.1);
  }

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

.word-box.placeholder {
  background: var(--glass);
  border: 1px solid var(--accent-primary);
  animation: pulse 2s infinite;
}

.word-box.locked {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  opacity: 0.5;
  font-size: 0.9rem;
}

.highlight {
  color: var(--accent-primary);
}

/* Individual Letter Styles (Wordle-style) */
.word-box.attempt {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  gap: 4px;
}

.word-box.placeholder {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: transparent;
  border: none;
  animation: none;
}

.letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 40px;
  border-radius: 6px;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
}

/* Correct position - GREEN */
.letter-correct {
  background: var(--success);
  color: white;
  border: 2px solid var(--success);
  box-shadow: 0 2px 8px rgba(74, 222, 128, 0.4);
}

/* Present but wrong position - ORANGE/YELLOW */
.letter-present {
  background: var(--warning);
  color: #1a1a2e;
  border: 2px solid var(--warning);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

/* Absent - GRAY */
.letter-absent {
  background: rgba(156, 163, 175, 0.3);
  color: var(--text-secondary);
  border: 2px solid rgba(156, 163, 175, 0.3);
}

/* Prefix letters (always shown) */
.letter-prefix {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border: 2px solid var(--accent-primary);
}

/* Revealed letters (from hints or correct guesses) */
.letter-revealed {
  background: var(--success);
  color: white;
  border: 2px solid var(--success);
}

/* Unknown letters (question marks) */
.letter-unknown {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Review Mode Banner */
.review-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 16px 0;
}

.review-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.review-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.review-text strong {
  font-size: 0.95rem;
  color: var(--accent-primary);
}

.review-text span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Input Area */
.input-area {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  margin: 0 -20px -20px;
  padding: 16px 20px 30px;
  border-top: 1px solid var(--glass-border);
}

.hint-display {
  text-align: center;
  font-family: "SF Mono", monospace;
  font-size: 1.3rem;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  min-height: 24px;
}

.prefix-indicator {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.prefix-indicator span {
  color: var(--accent-primary);
  font-weight: 700;
}

.error-message {
  text-align: center;
  color: var(--error);
  font-size: 0.85rem;
  margin-bottom: 8px;
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}

.error-message.show {
  opacity: 1;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hint-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.2s;
}

.hint-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

#guess-input {
  flex: 1;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1.1rem;
  color: white;
  outline: none;
  transition: all 0.2s;
}

#guess-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

#guess-input::placeholder {
  color: var(--text-secondary);
}

.submit-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-secondary));
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 30px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  position: relative;
}

.modal-header {
  margin-bottom: 24px;
}

.modal-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.modal-header h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.modal-coins {
  color: var(--text-secondary);
}

.hint-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.hint-option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.hint-option:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.hint-option:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hint-option span:nth-child(2) {
  flex: 1;
  font-weight: 500;
}

.hint-cost {
  font-weight: 700;
  color: var(--warning);
}

.divider {
  height: 1px;
  background: var(--glass-border);
  margin: 20px 0;
}

.get-coins-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.watch-ad-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(74, 222, 128, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--success);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.watch-ad-btn:hover {
  background: rgba(74, 222, 128, 0.3);
}

.close-modal {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.95rem;
}

.close-modal:hover {
  color: white;
}

/* Level Complete */
.modal-content.celebrate {
  animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  70% {
    transform: scale(1.05);
  }

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

.celebrate-icon {
  font-size: 5rem;
  display: block;
  margin-bottom: 16px;
  animation: spin 1s ease-out;
}

@keyframes spin {
  from {
    transform: rotate(-20deg) scale(0);
  }

  to {
    transform: rotate(0deg) scale(1);
  }
}

.reward {
  font-size: 1.5rem;
  color: var(--warning);
  font-weight: 700;
  margin: 16px 0 24px;
}

.continue-btn {
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-secondary));
  border: none;
  color: white;
  padding: 14px 48px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.continue-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Shake animation for errors */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-8px);
  }

  40%,
  80% {
    transform: translateX(8px);
  }
}

.shake {
  animation: shake 0.4s ease;
}

/* ============================================
   NEW STYLES - NAVIGATION & HOME SCREEN
   ============================================ */

/* Sparkle Animations */
.sparkles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: sparkle 3s infinite;
  opacity: 0;
}

@keyframes sparkle {

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

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Top Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.settings-btn {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

/* Home Screen Content */
.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
  text-align: center;
}

/* Game Title - Keep existing style */
.game-title {
  margin-bottom: 60px;
}

.game-title h1 {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.game-title p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Level Button */
.level-btn {
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-secondary));
  border: none;
  border-radius: 50px;
  padding: 20px 50px;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.level-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.level-btn:hover::before {
  left: 100%;
}

.level-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.level-label {
  font-size: 0.9rem;
  opacity: 0.9;
  letter-spacing: 2px;
}

#current-level-number {
  font-size: 2rem;
  font-weight: 900;
}

/* Themes Button */
.themes-btn {
  position: absolute;
  bottom: 100px;
  left: 20px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 1;
}

.themes-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.palette-icon {
  font-size: 1.2rem;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 80px;
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.nav-item {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
  padding: 8px;
  border-radius: 12px;
}

.nav-item:hover {
  background: var(--glass);
  color: white;
}

.nav-item.active {
  color: var(--accent-primary);
  background: rgba(102, 126, 234, 0.1);
}

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

.nav-label {
  font-size: 0.7rem;
  font-weight: 600;
}

/* Screen Header (for non-home screens) */
.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.screen-title {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.screen-content {
  flex: 1;
  padding: 20px;
  position: relative;
  z-index: 1;
  overflow-y: auto;
}

.placeholder-text {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 60px;
}

/* Update existing coin display */
.coin-display {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Daily Puzzle Locked State */
.daily-locked {
  text-align: center;
  padding: 40px 20px;
}

.lock-icon-large {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.daily-locked-text {
  font-size: 1.1rem;
  color: white;
  margin-bottom: 12px;
  font-weight: 600;
}

.daily-locked-hint {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Update level grid for better responsiveness */
.level-grid {
  padding: 0 20px 20px;
  position: relative;
  z-index: 1;
}

/* Game play screen - hide bottom nav */
#game-play.screen.active~.bottom-nav {
  display: none;
}

/* Hide title row elements (not needed anymore) */
.title-row,
.title-bubble {
  display: none;
}

/* Daily Puzzle Info Styles */
.daily-puzzle-info {
  text-align: center;
  padding: 40px 20px;
}

.daily-puzzle-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.daily-puzzle-date {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.daily-completed {
  color: var(--success);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 16px 0;
}

.daily-puzzle-info .level-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.daily-puzzle-info .level-btn:disabled:hover {
  transform: none;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* SVG Icon Styling */
.icon-svg {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  /* Make icons white */
}

.icon-svg-small {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.coin-icon-svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.5));
}

.nav-icon-svg {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: all 0.3s;
}

.nav-item.active .nav-icon-svg {
  opacity: 1;
  filter: brightness(0) invert(1) drop-shadow(0 0 8px var(--accent-primary));
}

.nav-item:hover .nav-icon-svg {
  opacity: 1;
}

.nav-item:hover .nav-icon-svg {
  opacity: 1;
}

/* Title Chain Icon */
.title-chain-icon {
  width: 48px;
  height: 48px;
  vertical-align: middle;
  filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.5));
  animation: sway 2s ease-in-out infinite;
}

@keyframes sway {

  0%,
  100% {
    transform: rotate(-5deg);
  }

  50% {
    transform: rotate(5deg);
  }
}

/* Level Icon Wrapper */
.level-icon-wrapper {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-icon-svg {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.4));
}

.level-number-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.6rem;
  font-weight: 900;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.level-card.completed .level-icon-svg {
  filter: drop-shadow(0 2px 8px rgba(74, 222, 128, 0.5));
}

/* Lock Icon SVG */
.lock-icon-svg {
  width: 48px;
  height: 48px;
  opacity: 0.5;
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.1));
}

/* Coin Shop Modal Styles */
.shop-section {
  margin-bottom: 20px;
}

.shop-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-align: left;
}

.watch-ad-btn-shop {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(74, 222, 128, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--success);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.watch-ad-btn-shop:hover:not(:disabled) {
  background: rgba(74, 222, 128, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.watch-ad-btn-shop:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.watch-ad-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ad-icon {
  width: 32px;
  height: 32px;
  filter: brightness(0) saturate(100%) invert(74%) sepia(74%) saturate(375%) hue-rotate(68deg);
}

.watch-ad-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.watch-ad-title {
  font-size: 1rem;
  font-weight: 700;
}

.watch-ad-subtitle {
  font-size: 0.75rem;
  color: rgba(74, 222, 128, 0.8);
  font-weight: 500;
}

.ad-reward {
  font-size: 1.1rem;
  font-weight: 700;
}

.pricing-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.pricing-option:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  border-color: var(--accent-primary);
}

.pricing-option.popular {
  border: 2px solid var(--accent-primary);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
}

.pricing-option.popular:hover {
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.popular-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0.5px;
}

.pricing-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.4));
}

.pricing-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.coin-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.price {
  font-size: 0.9rem;
  color: var(--accent-primary);
  font-weight: 600;
}

/* Make coin displays interactive */
.coin-display {
  transition: all 0.2s;
  user-select: none;
}

.coin-display:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.coin-display:active {
  transform: translateY(0);
}
/* Modal Close Icon */
.modal-close-icon {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  font-size: 1rem;
  line-height: 1;
}

.modal-close-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: scale(1.1);
}

/* Updates for new icons and animations */

/* Lightbulb fix */
.lightbulb-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

/* Close icon SVG */
.close-icon-svg {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.modal-close-icon:hover .close-icon-svg {
  opacity: 1;
}

/* Lottie Container */
.lottie-container {
  width: 150px;
  height: 150px;
  margin: 0 auto 16px;
}

/* Reward Container */
.reward-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 24px;
}

.reward-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--warning);
}

.reward-coin-icon {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Update Modal Icons */
.hint-option img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.watch-ad-btn img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

/* Hide old celebrate icon if present */
.celebrate-icon {
  display: none;
}

/* Replay Icon Updates */
.replay-icon-tiny {
  width: 10px;
  height: 10px;
  margin-right: 3px;
  vertical-align: middle;
  filter: opacity(0.8);
}

.review-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: opacity(0.8);
}

.lock-icon-large-svg {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.1));
}
