
    :root { --card: #f8f9fa; --border: #b4b4b4;; --muted: #cccccc; }
    * { box-sizing: border-box; }
    body {
      font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
      margin: 12px;
      background-color: #1a1a2e; /* Fallback color while loading */
      background-size: cover;
      background-position: center;
      background-attachment: fixed;
      background-repeat: no-repeat;
      min-height: 100vh;
      transition: background-image 0.8s ease-in-out;
    }
    
    /* Backdrop overlay for better readability */
    .backdrop-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.3);
      z-index: -1;
      pointer-events: none;
      transition: opacity 0.5s ease-in-out;
    }
    
    .backdrop-overlay.hidden {
      opacity: 0;
    }


#app { max-width: 860px; min-width: 350px; margin: auto; }
    .card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
    .row { display: flex; gap: 8px; align-items: center; }
    .row input { flex: 1; padding: 10px 12px; font-size: 16px;}
    button { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: white; cursor: pointer; }
    button:hover { background: #fffef7; }
    button:disabled { opacity: 0.5; cursor: not-allowed; }
    #micBtn {
      font-size: 18px;
      padding: 10px 12px;
      transition: all 0.3s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    #micBtn svg {
      display: block;
      transition: all 0.3s ease;
    }
    #micBtn.recording {
      background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
      color: white;
      animation: pulse 1.5s ease-in-out infinite;
      border-color: #ee5a5a;
    }
      
      #micBtn.processing {
        background: linear-gradient(135deg, #4CAF50, #45a049);
        color: white;
        border-color: #45a049;
        pointer-events: none; /* Disable all clicks */
        opacity: 0.8;
      }
      
    #micBtn.recording svg {
      stroke: white;
      animation: micPulse 1.5s ease-in-out infinite;
    }
    #micBtn.processing {
      background: linear-gradient(135deg, #4CAF50, #45a049);
      color: white;
      border-color: #45a049;
    }
    #micBtn.processing svg {
      stroke: white;
    }
    @keyframes micPulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.15); }
    }
    select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); }
    .muted { color: var(--muted); font-size: 0.9em; }
    #log { min-height: 160px; }
    #log > div { padding: 6px 0; }
    #log strong { display: inline-block; min-width: 64px; }
    .hints button { margin: 6px 6px 0 0; }
    .narr { color: #444; font-style: italic; margin-top: 4px; }
    .small { font-size: 12px; color: var(--muted); }
    
      .toolbar {
          display: flex;
          flex-wrap: wrap;
          gap: 8px;
          align-items: center;
      }

        .game-color {
            background: #6c81a8 !important;
            border: 1px solid #465780;
            
        }
      
      .toolbar select,
      .toolbar button,
      .toolbar .muted {
        font-size: 12px;
      }

    .toolbar > * {
      display: inline-block;
      margin-bottom: 8px;
    }
    
    /* WORLD TITLE STYLES */
    .world-header {
      color: white;
      padding: 16px;
      border-radius: 12px;
      margin-bottom: 12px;
      text-align: center;
    }
    .world-title {
      font-size: 1.4em;
      font-weight: bold;
      margin: 0 0 4px 0;
    }
    .scene-title {
      font-size: 1em;
      opacity: 0.9;
      margin: 0;
      font-weight: normal;
    }
      
      .initial-loading {
        position: relative;
        width: 100%;
        height: 200px; /* Set a specific height for the card content area */
        overflow: hidden;
        border-radius: 12px; /* Match the card's border-radius */
      }

      .startup-image {
        width: 100%;
        height: 100%;
        object-fit: cover; /* This fills the entire space, cropping if needed */
        object-position: center; /* Centers the crop area */
        display: block;
        border-radius: 12px; /* Match the card's border-radius */
      }

      .loading-text {
        position: absolute;
        bottom: 12px;
        left: 50%;
        transform: translateX(-50%);
        color: white;
        background: rgba(0,0,0,0.7);
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.9em;
        font-weight: 500;
        backdrop-filter: blur(5px);
        text-shadow: 0 1px 2px rgba(0,0,0,0.5);
      }
      
    /* DISCOVERY STYLES */
    .discovery {
      background: #e8f5e8 !important;
      border: 1px solid #4CAF50;
      border-radius: 8px;
      padding: 8px 12px;
      margin: 8px 0;
      animation: slideIn 0.5s ease-out;
      display: none; /* Hidden by default */
    }
    
    .discovery.visible {
      display: block;
    }
    
    /* Toggle button styles */
.discovery-toggle {
  background: linear-gradient(135deg, #4CAF50, #45a049); /* Changed to green */
  color: white;
  border: 1px solid #2E7D32; /* Changed to green border */
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.2s ease;
}

.discovery-toggle:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40); /* Changed to green hover */
  transform: translateY(-1px);
}

.discovery-toggle.active {
  background: linear-gradient(135deg, #d32f2f, #c62828); /* Changed to red */
  border: 1px solid #b71c1c; /* Changed to red border */
}

.discovery-toggle.active:hover {
  background: linear-gradient(135deg, #c62828, #b71c1c); /* Changed to red hover */
  transform: translateY(-1px);
}

      
    .discovery-item {
      display: flex;
      align-items: center;
      margin: 4px 0;
      font-weight: 500;
      color: #2E7D32 !important;
    }
    .discovery-icon {
      margin-left: 8px;
      display: inline-block;
      margin-right: 8px;
      font-size: 16px;
    }
    .clue-icon { color: #FF6B35; }
    .scene-icon { color: #4CAF50; }
    
    /* NEW SCENE SUGGESTION HIGHLIGHTING */
    .hint-new {
      background: linear-gradient(135deg, #4CAF50, #45a049) !important;
      color: white !important;
      font-weight: bold !important;
      border: 2px solid #2E7D32 !important;
      box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3) !important;
      animation: pulse 2s ease-in-out !important;
    }
    .hint-new:hover {
      background: linear-gradient(135deg, #45a049, #3d8b40) !important;
      transform: translateY(-1px) !important;
      box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4) !important;
    }
    
      @keyframes pulse {
        0%, 100% { transform: scale(1); opacity: 1; }
        50% { transform: scale(1.05); opacity: 0.8; }
      }

      #micBtn.recording {
        background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
        color: white;
        animation: pulse 1.5s ease-in-out infinite;
        border-color: #ee5a5a;
      }

    .scene-viewer-btn {
      display: inline-block;
      background: linear-gradient(135deg, #667eea, #764ba2);
      color: white;
      border: 1px solid #5a6fd8;
      border-radius: 6px;
      padding: 4px 8px;
      font-size: 11px;
      font-weight: bold;
      cursor: pointer;
      margin-right: 8px;
      margin-bottom: 4px;
      text-decoration: none;
      transition: all 0.2s ease;
    }
    .scene-viewer-btn:hover {
      background: linear-gradient(135deg, #5a6fd8, #6a4190);
      transform: translateY(-1px);
      box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    }
    .scene-header {
      display: flex;
      align-items: center;
      margin-bottom: 4px;
    }

    /* EMBEDDED PARALLAX VIEWER STYLES */
    .embedded-viewer {
      width: 100%;
      height: 200px;
      border-radius: 8px;
      overflow: hidden;
      position: relative;
      background: #000;
     // margin-bottom: 12px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
      cursor: pointer;
      transition: height 0.5s ease, box-shadow 0.3s ease;
    }
    
    .embedded-viewer:hover {
      box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    }
    
    .embedded-viewer.expanded {
      height: 650px;
      cursor: pointer;
    }
    
    .click-indicator {
      position: absolute;
      top: 10px;
      right: 10px;
      background: rgba(0,0,0,0.7);
      color: white;
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 10px;
      opacity: 0.7;
      backdrop-filter: blur(5px);
      pointer-events: none;
      transition: opacity 0.3s ease;
    }
    
    .embedded-viewer:hover .click-indicator {
      opacity: 1;
    }
    
    .embedded-layer {
      position: absolute;
      top: 0;
      left: 0;
      width: 120%;
      height: 120%;
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      transform-origin: center center;
      opacity: 0;
      transition: opacity 0.8s ease-in-out;
    }
    
    .embedded-layer.loaded {
      opacity: 1;
    }
    
    .embedded-layer-0 {
      z-index: 1;
      filter: blur(2px) brightness(0.8);
      animation: embedKenBurns1 15s ease-in-out infinite alternate;
    }
    
    .embedded-layer-1 {
      z-index: 2;
      filter: blur(1px) brightness(0.9);
      animation: embedKenBurns2 18s ease-in-out infinite alternate-reverse;
    }
    
    .embedded-layer-2 {
      z-index: 3;
      animation: embedKenBurns3 12s ease-in-out infinite alternate;
    }
    
    .embedded-layer-3 {
      z-index: 4;
      filter: drop-shadow(0 0 5px rgba(0,0,0,0.3));
      animation: embedKenBurns4 16s ease-in-out infinite alternate-reverse;
    }
    
    .embedded-layer-4 {
      z-index: 5;
      filter: drop-shadow(0 0 8px rgba(0,0,0,0.5));
      animation: embedKenBurns5 10s ease-in-out infinite alternate;
    }
    
    @keyframes embedKenBurns1 {
      0% { transform: scale(1.0) translateX(-4%) translateY(-3%); }
      100% { transform: scale(1.1) translateX(3%) translateY(2%); }
    }
    
    @keyframes embedKenBurns2 {
      0% { transform: scale(1.02) translateX(2%) translateY(-2%); }
      100% { transform: scale(1.12) translateX(-3%) translateY(3%); }
    }
    
    @keyframes embedKenBurns3 {
      0% { transform: scale(1.0) translateX(-2%) translateY(1%); }
      100% { transform: scale(1.08) translateX(4%) translateY(-2%); }
    }
    
    @keyframes embedKenBurns4 {
      0% { transform: scale(1.01) translateX(3%) translateY(2%); }
      100% { transform: scale(1.1) translateX(-2%) translateY(-1%); }
    }
    
    @keyframes embedKenBurns5 {
      0% { transform: scale(1.0) translateX(-1%) translateY(-2%); }
      100% { transform: scale(1.06) translateX(2%) translateY(1%); }
    }
    
    .embedded-loading {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: white;
      font-size: 12px;
      background: rgba(0,0,0,0.7);
      padding: 8px 12px;
      border-radius: 6px;
      backdrop-filter: blur(5px);
    }
    
    @keyframes slideIn {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    @keyframes pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.05); }
    }
      
      @media (max-width: 449px) {
        /* Make viewer look minimized by default */
        .embedded-viewer {
          height: 80px; /* Very small preview height */
          border-radius: 4px; /* Smaller border radius */
          margin-bottom: 8px; /* Less margin */
        }
        
        .embedded-viewer.expanded {
          height: 300px; /* Still allow expansion but smaller than desktop */
        }
        
        /* Style the layers to look like a preview */
        .embedded-layer.dynamic-embedded-layer {
          animation: none; /* No animation in minimized state */
          transform: scale(1.1); /* Slight zoom to show it's a preview */
          filter: brightness(0.8) blur(0.5px); /* Slight blur and darkening */
        }
        
        /* When expanded, restore normal appearance */
        .embedded-viewer.expanded .embedded-layer.dynamic-embedded-layer {
          animation-duration: 20s; /* Restore animations when expanded */
          filter: none; /* Remove blur/darkening */
          transform: none; /* Reset transform */
        }
        
        /* Make click indicator more prominent on mobile */
        .click-indicator {
          font-size: 10px;
          background: rgba(0,0,0,0.8);
          border: 1px solid rgba(255,255,255,0.3);
        }
        
        /* Add a subtle "preview" effect */
        .embedded-viewer::before {
          content: "";
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.3));
          z-index: 10;
          pointer-events: none;
        }
        
        .embedded-viewer.expanded::before {
          display: none; /* Remove preview overlay when expanded */
        }
      }
    /* TEST MODE STYLES */
    .test-mode-indicator {
      background: linear-gradient(135deg, #ff6b35, #f7931e);
      color: white;
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 10px;
      font-weight: bold;
      margin-left: 8px;
      animation: pulse 2s ease-in-out infinite;
    }

    .test-hint {
      background: linear-gradient(135deg, #ff6b35, #f7931e) !important;
      color: white !important;
      font-weight: bold !important;
      border: 2px solid #e55a2b !important;
    }

    .test-hint:hover {
      background: linear-gradient(135deg, #e55a2b, #d84315) !important;
      transform: translateY(-1px) !important;
    }

    .test-response {
      background: rgba(255, 107, 53, 0.1);
      border-left: 3px solid #ff6b35;
      padding: 8px 12px;
      margin: 4px 0;
      border-radius: 6px;
    }

    .compact-log .narr {
      display: none; /* Hide narration in test mode */
    }

    .compact-log .embedded-viewer {
      display: none; /* Hide parallax viewers in test mode */
    }
      
      /* SUCCESS VIEWER STYLES */
      .success-viewer {
        border: 3px solid #FFD700 !important;
        box-shadow: 0 8px 24px rgba(255, 215, 0, 0.6) !important;
        animation: successGlow 3s ease-in-out infinite alternate !important;
        position: relative !important;
      }

      .success-indicator {
        background: linear-gradient(135deg, #FFD700, #FFA500) !important;
        color: #8B4513 !important;
        font-weight: bold !important;
        border: 2px solid #FF8C00 !important;
        animation: celebrate 2s ease-in-out infinite alternate !important;
      }

      .success-layer {
        filter: brightness(1.2) saturate(1.3) !important;
      }

      .success-fallback {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        color: #FFD700;
        background: radial-gradient(circle, rgba(255,215,0,0.1), rgba(255,140,0,0.2));
        padding: 40px;
        border-radius: 20px;
        backdrop-filter: blur(10px);
      }

      .success-fallback h2 {
        font-size: 2.5em;
        margin-bottom: 20px;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        animation: bounce 2s ease-in-out infinite alternate;
      }

      .success-fallback p {
        font-size: 1.2em;
        margin-bottom: 20px;
        color: #FFF8DC;
      }

      .success-stars {
        font-size: 2em;
        animation: twinkle 1.5s ease-in-out infinite alternate;
      }

      @keyframes successGlow {
        0% {
          box-shadow: 0 8px 24px rgba(255, 215, 0, 0.6);
        }
        100% {
          box-shadow: 0 12px 32px rgba(255, 215, 0, 0.9);
        }
      }

      @keyframes celebrate {
        0% {
          transform: scale(1) rotateZ(0deg);
          background: linear-gradient(135deg, #FFD700, #FFA500);
        }
        50% {
          transform: scale(1.05) rotateZ(2deg);
          background: linear-gradient(135deg, #FFA500, #FF8C00);
        }
        100% {
          transform: scale(1.02) rotateZ(-2deg);
          background: linear-gradient(135deg, #FFD700, #FFA500);
        }
      }

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

      @keyframes twinkle {
        0% { opacity: 0.7; transform: scale(1); }
        100% { opacity: 1; transform: scale(1.1); }
      }
      
      /* Add the single image embedded Ken Burns animation */
      @keyframes embedKenBurnsSingle {
        0% { transform: scale(1.0) translateX(-1%) translateY(-0.5%); }
        25% { transform: scale(1.06) translateX(0.5%) translateY(1%); }
        50% { transform: scale(1.08) translateX(-0.5%) translateY(-1%); }
        75% { transform: scale(1.04) translateX(1%) translateY(0.5%); }
        100% { transform: scale(1.0) translateX(-1%) translateY(-0.5%); }
      }

      /* Dynamic layer styles for pausing */
      .dynamic-embedded-layer {
        animation-play-state: running;
      }

      .paused .dynamic-embedded-layer {
        animation-play-state: paused;
      }
      
      .action-message {
        color: #bbb; /* Light grey for entire Action message */
      }

      .action-message strong {
        color: #bbb;
      }
      
      .hints {
        background: linear-gradient(135deg, #2c3e50, #34495e);
        color: white;
      }

      .hints button {
        background: rgba(255, 255, 255, 0.1);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.2);
      }

      .hints button:hover {
        background: rgba(255, 255, 255, 0.2);
      }

      /* Style the hint note text */
      .hints .small {
        color: rgba(255, 255, 255, 0.8);
      }
      
      .case-description {
        display: none;
      }

      .case-description.visible {
        display: block;
      }
      
      .startup-viewer {
       // border: 2px solid #4CAF50 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
      }

      .startup-viewer .click-indicator {
        background: rgba(76, 175, 80, 0.8) !important;
        color: white !important;
      }
      
      .ui-card {
        transition: opacity 0.3s ease;
        //background: rgba(76, 175, 80, 0.3);
      }

      .ui-card.hidden {
        display: none !important;
      }
      
      .loading-indicator {
        background: #6c81a8;
 
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.9em;
        font-weight: 500;
        text-align: center;
        margin: 8px 0;
        animation: loadingPulse 1.5s ease-in-out infinite alternate;
      }

      @keyframes loadingPulse {
        0% { opacity: 0.6; transform: scale(0.9); }
        100% { opacity: 1; transform: scale(1.02); }
      }

    /* Embedded Victory Stats Styles */

    .victory-stats-embedded {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 10;
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 8px;
      overflow: hidden;
    }

    .victory-stats-content {
      text-align: center;
      max-width: 95%;
      width: 100%;
      padding: 1.5rem;
      background: rgba(0, 0, 0, 0.3);
      //border: 2px solid #ffd700;
      border-radius: 10px;
      box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
      max-height: 90%;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .victory-title-embedded {
      font-family: 'Courier New', monospace;
      font-size: clamp(1.2rem, 4vw, 2rem);
      font-weight: bold;
      color: #ffd700;
      text-shadow: 0 0 15px #ffd700;
      margin: 0;
      letter-spacing: 2px;
      flex-shrink: 0;
    }

    .stats-list-embedded {
      display: flex;
      flex-direction: column;
      //gap: 0.5rem;
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      //padding: 0.5rem;
      //background: rgba(255, 255, 255, 0.02);
      //border-radius: 8px;
      //border: 1px solid rgba(255, 215, 0, 0.2);
    }

      .stat-reveal-embedded {
        display: flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.03);
        //border-radius: 6px;
        opacity: 0;
        animation: statSlideInEmbedded 0.6s ease-out forwards;
        gap: 0; /* Changed from 1rem to 0 since no icon */
        min-height: 0.5rem;
      }

    @keyframes statSlideInEmbedded {
      from {
        opacity: 0;
        transform: translateY(10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .stat-icon-embedded {
      font-size: clamp(1rem, 3vw, 1.5rem);
      flex-shrink: 0;
      width: 2rem;
      text-align: center;
    }

    .stat-info-embedded {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      gap: 0.5rem;
    }

    .stat-label-embedded {
      font-family: 'Courier New', monospace;
      color: #ffffff;
      font-size: clamp(0.7rem, 2.5vw, 0.9rem);
      font-weight: bold;
      flex-shrink: 0;
    }

    .stat-value-embedded {
      font-family: 'Courier New', monospace;
      font-size: clamp(0.8rem, 3vw, 1.1rem);
      color: #00ff00;
      text-shadow: 0 0 8px #00ff00;
      font-weight: bold;
      text-align: right;
      min-width: 3rem;
    }

    .final-grade-embedded {
      text-align: center;
      transition: all 0.5s ease;
      flex-shrink: 0;
      //padding-top: 1rem;
      //border-top: 1px solid rgba(255, 215, 0, 0.3);
    }

    .grade-badge-embedded {
      font-size: clamp(2rem, 8vw, 4rem);
      font-weight: bold;
      color: #ffd700;
      text-shadow: 0 0 20px #ffd700;
      margin: 0.5rem 0;
      font-family: 'Courier New', monospace;
      line-height: 1;
    }

    .grade-title-embedded {
      font-size: clamp(1rem, 3vw, 1.5rem);
      color: #ffffff;
      margin: 0.5rem 0;
      font-family: 'Courier New', monospace;
      font-weight: bold;
    }

    /* success viewer has relative positioning to contain the absolute positioned stats */
    .success-viewer {
      position: relative !important;
    }
      /* END: Embedded Victory Stats Styles */
      
      /* Next Case Selector Styles */
      .next-case-selector {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 215, 0, 0.3);
        text-align: center;
        transition: opacity 0.5s ease, transform 0.5s ease;
      }
      
      .next-case-label {
        font-family: 'Courier New', monospace;
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
        color: #FFD700;
        margin-bottom: 0.75rem;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
      }
      
      .next-case-dropdown {
        background: linear-gradient(135deg, #FFD700, #FFA500);
        color: #333;
        font-weight: bold;
        font-family: 'Courier New', monospace;
        font-size: clamp(0.8rem, 2vw, 1rem);
        padding: 8px 12px;
        border: 2px solid #DAA520;
        border-radius: 8px;
        cursor: pointer;
        min-width: 200px;
        max-width: 90%;
        margin-bottom: 0.75rem;
      }
      
      .next-case-dropdown:hover {
        background: linear-gradient(135deg, #FFDF00, #FFB347);
      }
      
      .next-case-dropdown option {
        background: #333;
        color: #FFD700;
        padding: 8px;
      }
      
      .start-next-case-btn {
        background: linear-gradient(135deg, #4CAF50, #45a049);
        color: white;
        font-family: 'Courier New', monospace;
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
        font-weight: bold;
        padding: 10px 24px;
        border: 2px solid #2E7D32;
        border-radius: 8px;
        cursor: pointer;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
      }
      
      .start-next-case-btn:hover {
        background: linear-gradient(135deg, #45a049, #3d8b40);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(76, 175, 80, 0.6);
      }
      
      .start-next-case-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
      }
      
      /* Mobile adjustments for next case selector */
      @media (max-width: 449px) {
        .next-case-selector {
          padding-top: 0.75rem;
          margin-top: 0.75rem;
        }
        
        .next-case-dropdown {
          min-width: 150px;
          padding: 6px 10px;
        }
        
        .start-next-case-btn {
          padding: 8px 16px;
        }
      }
      
   .suggestions {
     background: #e8f5e8 !important;
     border: 1px solid #4CAF50;
     color: #2E7D32;
   }

   /* Style the "Suggestions:" label */
   .suggestions > div:first-child {
     color: #2E7D32;
     font-weight: 600;
   }

   /* Style the suggestion buttons */
   .suggestions button {
     background: rgba(76, 175, 80, 0.1);
     color: #2E7D32;
     border: 1px solid rgba(76, 175, 80, 0.3);
     margin: 6px 6px 0 0; /* Keep the existing button spacing */
   }

   .suggestions button:hover {
     background: rgba(76, 175, 80, 0.2);
     border-color: #4CAF50;
   }

   /* Style the hint note text at bottom */
   .suggestions .small {
     color: rgba(46, 125, 50, 0.8);
   }

   /* If you have any special button classes, update those too */
   .suggestions .hint-new {
     background: linear-gradient(135deg, #4CAF50, #45a049) !important;
     color: white !important;
     font-weight: bold !important;
     border: 2px solid #2E7D32 !important;
     box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3) !important;
   }

   .suggestions .hint-new:hover {
     background: linear-gradient(135deg, #45a049, #3d8b40) !important;
     transform: translateY(-1px) !important;
     box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4) !important;
   }

   .suggestions .test-hint {
     background: rgba(255, 193, 7, 0.1);
     color: #856404;
     border: 1px solid rgba(255, 193, 7, 0.3);
   }

   .suggestions .test-hint:hover {
     background: rgba(255, 193, 7, 0.2);
     border-color: #ffc107;
   }

#worldSelect {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #333;
  font-weight: bold;
  border: 2px solid #DAA520;
}
#worldSelect:hover {
  background: linear-gradient(135deg, #FFDF00, #FFB347);
}
      
      /* World Title Overlay on Startup Viewer */
    .world-title-overlay {
      position: absolute;
      bottom: 15px;
      left: 50%;
      transform: translateX(-50%);
      text-align: center;
      z-index: 20;
      padding: 1.5rem;
      animation: titleFadeIn 1.5s ease-out;
      width: 90%;           /* ADD: Makes it 90% of container width */
      max-width: 800px;     /* ADD: Caps it on very wide screens */
    }



      .world-title-text {
        font-family: 'Courier New', monospace;
        font-size: clamp(1.5rem, 4vw, 2.5rem);
        font-weight: bold;
        color: #FFD700;
        text-shadow: 0 0 20px #000000, 0 0 20px #000000;
        margin-bottom: 0.5rem;
        letter-spacing: 2px;
        line-height: 1.2;
      }

      .world-subtitle {
        font-family: 'Courier New', monospace;
        font-size: clamp(0.9rem, 2vw, 1.2rem);
        color: #FFD700;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
        opacity: 0.9;
        letter-spacing: 1px;
      }

      /* Responsive adjustments */
      @media (max-width: 449px) {
        .world-title-overlay {
          padding: 1.5rem 1rem;
          margin: 0 1rem;
          max-width: calc(100% - 2rem);
        }
        
        .world-title-text {
          font-size: 1.2rem;
          letter-spacing: 1px;
        }
        
        .world-subtitle {
          font-size: 0.8rem;
        }
      }

      /* Animation for title appearance */
      .world-title-overlay {
        animation: titleFadeIn 1.5s ease-out;
      }

    @keyframes titleFadeIn {
      0% {
        opacity: 0;
        transform: translate(-50%, 20px); /* start slightly lower */
      }
      100% {
        opacity: 1;
        transform: translate(-50%, 0);    /* end at bottom center */
      }
    }
      

