/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: "Poppins", sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    background-color: #000;
  }
  
  /* Game container styles */
  #game-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, #87CEEB, #B3E5FC); /* Sky gradient */
  }
  
  /* Canvas styles - add specific styling for the THREE.js canvas */
  #game-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10; /* Ensure canvas appears above background but below UI controls */
  }
  
  /* Welcome screen styles */
  #welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 1000; /* Higher than canvas */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  }
  
  /* Add a hidden class for welcome screen */
  #welcome-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  
  .welcome-content {
    width: 90%;
    max-width: 900px;
    height: 500px;
    background-color: #9ddbd7; /* Mint/teal background */
    border-radius: 30px;
    position: relative;
    z-index: 2;
    border: 3px solid #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
  }
  
  .game-title {
    position: relative;
    z-index: 5;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 600px;
  }
  
  .game-title h1 {
    font-size: 4rem;
    color: #000;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1;
    text-align: center;
  }
  
  .subtitle {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.4;
    margin: 0 auto;
    max-width: 500px;
    text-align: center;
  }
  
  #start-game-btn {
    background-color: #d17b4f; /* Orange-brown */
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    position: relative;
    z-index: 5;
    text-transform: uppercase;
  }
  
  #start-game-btn:hover {
    background-color: #b86b43;
    transform: translateY(-2px);
  }
  
  .scene-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
  }
  
  /* Scene items - Construction themed */
  .scene-item {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.9;
  }
  
  .construction-crane {
    top: 10%;
    left: 10%;
    width: 120px;
    height: 150px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 150"><rect x="45" y="10" width="10" height="120" fill="%23F9A825"/><rect x="20" y="130" width="60" height="10" fill="%23F9A825"/><rect x="10" y="140" width="80" height="10" fill="%23F9A825"/><path d="M55,10 L90,40" stroke="%23F9A825" stroke-width="5" fill="none"/><path d="M90,40 L90,50" stroke="%23F9A825" stroke-width="5" fill="none"/><path d="M55,50 L90,50" stroke="%23F9A825" stroke-width="5" fill="none"/><path d="M55,70 L90,70" stroke="%23F9A825" stroke-width="3" fill="none"/><path d="M90,50 L90,70" stroke="%23F9A825" stroke-width="3" fill="none"/><path d="M90,70 L80,90" stroke="%23F9A825" stroke-width="2" fill="none"/><circle cx="80" cy="90" r="5" fill="%23555"/></svg>');
  }
  

  
  @keyframes digger-move {
    0%,
    100% {
      transform: translateX(0) rotate(0deg);
    }
    25% {
      transform: translateX(-20px) rotate(-2deg);
    }
    75% {
      transform: translateX(20px) rotate(2deg);
    }
  }
  
  .daisy-duck {
    top: 40%;
    left: 40%;
    width: 80px;
    height: 80px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="35" fill="%23FFEB3B"/><circle cx="40" cy="40" r="5" fill="%23333"/><circle cx="60" cy="40" r="5" fill="%23333"/><path d="M50,55 Q60,65 50,70 Q40,65 50,55" fill="%23FF9800"/><path d="M30,30 L20,20" stroke="%23FFEB3B" stroke-width="3"/><path d="M70,30 L80,20" stroke="%23FFEB3B" stroke-width="3"/><circle cx="50" cy="85" r="5" fill="%23FF9800"/><circle cx="40" cy="85" r="5" fill="%23FF9800"/><circle cx="60" cy="85" r="5" fill="%23FF9800"/><rect x="45" y="20" width="10" height="5" fill="%23FF9800"/></svg>');
    animation: duck-bounce 3s ease-in-out infinite;
  }
  
  @keyframes duck-bounce {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
  }
  
  .shape-square {
    top: 20%;
    right: 25%;
    width: 50px;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="20" y="20" width="60" height="60" fill="%23F44336" stroke="%23FFF" stroke-width="3"/></svg>');
    animation: rotate 10s linear infinite;
  }
  
  .shape-circle {
    bottom: 30%;
    left: 25%;
    width: 50px;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="%232196F3" stroke="%23FFF" stroke-width="3"/></svg>');
    animation: pulse 4s ease-in-out infinite;
  }
  
  .shape-triangle {
    top: 60%;
    right: 40%;
    width: 50px;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,10 90,90 10,90" fill="%23FFC107" stroke="%23FFF" stroke-width="3"/></svg>');
    animation: rotate 8s linear infinite reverse;
  }
  
  .shape-rectangle {
    top: 30%;
    left: 70%;
    width: 60px;
    height: 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 80"><rect x="10" y="20" width="100" height="40" fill="%234CAF50" stroke="%23FFF" stroke-width="3"/></svg>');
    animation: float 5s ease-in-out infinite;
  }
  
  .construction-cone-1 {
    bottom: 15%;
    left: 20%;
    width: 30px;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 100"><polygon points="30,10 50,90 10,90" fill="%23FF9800"/><rect x="10" y="90" width="40" height="10" fill="%23333"/><rect x="15" y="30" width="30" height="5" fill="%23FFF"/><rect x="15" y="50" width="30" height="5" fill="%23FFF"/><rect x="15" y="70" width="30" height="5" fill="%23FFF"/></svg>');
  }
  
  .construction-cone-2 {
    bottom: 15%;
    left: 60%;
    width: 30px;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 100"><polygon points="30,10 50,90 10,90" fill="%23FF9800"/><rect x="10" y="90" width="40" height="10" fill="%23333"/><rect x="15" y="30" width="30" height="5" fill="%23FFF"/><rect x="15" y="50" width="30" height="5" fill="%23FFF"/><rect x="15" y="70" width="30" height="5" fill="%23FFF"/></svg>');
  }
  
  .construction-barrier {
    bottom: 15%;
    left: 35%;
    width: 120px;
    height: 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 80"><rect x="10" y="20" width="220" height="20" fill="%23F44336"/><rect x="10" y="40" width="220" height="20" fill="%23FFF"/><rect x="20" y="10" width="10" height="60" fill="%23333"/><rect x="210" y="10" width="10" height="60" fill="%23333"/></svg>');
  }
  
  .construction-sign {
    top: 15%;
    right: 60%;
    width: 60px;
    height: 80px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 160"><rect x="50" y="100" width="20" height="60" fill="%23795548"/><polygon points="10,20 110,20 110,100 10,100" fill="%23FFEB3B"/><rect x="20" y="40" width="80" height="10" fill="%23333"/><rect x="20" y="60" width="80" height="10" fill="%23333"/><rect x="20" y="80" width="80" height="10" fill="%23333"/></svg>');
  }
  
  .ground {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 150"><path d="M0,0 L1000,0 L1000,100 C900,80 800,120 700,90 C600,60 500,100 400,80 C300,60 200,90 100,70 C50,60 0,80 0,100 Z" fill="%23795548"/><rect x="0" y="100" width="1000" height="50" fill="%23795548"/></svg>');
  }
  
  @keyframes rotate {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
  
  @keyframes pulse {
    0%,
    100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.1);
    }
  }
  
  @keyframes float {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
  }
  
  /* Existing game UI styles - Enhanced */
  #message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 100;
  }
  
  #message-overlay.hidden {
    display: none;
  }
  
  #message-text {
    font-size: 2rem;
    padding: 2rem;
    background-color: #9ddbd7;
    color: #000;
    border-radius: 15px;
    border: 3px solid #fff;
    max-width: 80%;
  }
  

  
  #progress-display {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-size: 1.2rem;
    z-index: 50;
  }
  
  #reset-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
  }
  
  #reset-dialog.hidden {
    display: none;
  }
  
  .reset-dialog-content {
    background-color: #9ddbd7;
    border-radius: 15px;
    padding: 1.5rem;
    border: 3px solid #fff;
    text-align: center;
  }
  
  #reset-dialog h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    color: #000;
  }
  
  .dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
  }
  
  .dialog-buttons button {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
  }
  
  #reset-yes {
    background-color: #d17b4f;
    color: white;
  }
  
  #reset-yes:hover {
    background-color: #ff5252;
    transform: translateY(-3px);
  }
  
  #reset-no {
    background-color: #4caf50;
    color: white;
  }
  
  #reset-no:hover {
    background-color: #43a047;
    transform: translateY(-3px);
  }
  
  #shape-display {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #9ddbd7;
    border-radius: 10px;
    padding: 10px;
    border: 2px solid #fff;
    z-index: 50;
  }
  
  #shape-display.hidden {
    display: none;
  }
  
  #shape-name {
    font-weight: bold;
    font-size: 1.2rem;
    color: #000;
  }
  
  /* Progress bar styling */
  #progress-container {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    z-index: 100;
    color: white;
    font-family: 'Arial', sans-serif;
    min-width: 200px;
  }
  
  #progress-bar {
    background-color: rgba(255, 255, 255, 0.3);
    height: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
  }
  
  #progress-bar-fill {
    background-color: #4CAF50;
    height: 100%;
    border-radius: 5px;
    width: 0%;
    transition: width 0.5s ease;
  }
  
  #checkpoint-text {
    font-size: 14px;
    text-align: center;
  }
  
  .checkpoint-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 50;
  }
  
  #shape-info-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    width: 80%;
    max-width: 500px;
    z-index: 200;
    display: none;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
  }
  
  .shape-info-header {
    padding: 15px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .shape-info-header h2 {
    margin: 0;
    font-size: 24px;
  }
  
  .shape-icon {
    width: 60px;
    height: 60px;
  }
  
  .shape-info-body {
    padding: 20px;
  }
  
  .shape-description {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  .shape-facts h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
  }
  
  .shape-facts ul {
    margin: 0;
    padding-left: 20px;
  }
  
  .shape-facts li {
    margin-bottom: 5px;
  }
  
  #continue-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
  
  #continue-button:hover {
    background-color: #45a049;
  }
  
  /* Save System Styles */
  #save-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 15px 25px;
    border-radius: 20px;
    font-family: 'Comic Neue', cursive;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    animation: savePopup 2s ease-in-out;
  }
  
  #save-indicator.hidden {
    display: none;
  }
  
  @keyframes savePopup {
    0% { 
        opacity: 0;
        transform: translateY(20px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
  }
  
  #continue-button:active {
    transform: translate(-50%, -50%) scale(0.98);
  }
  
  #continue-button.hidden {
    display: none;
  }
  
  .preview-info {
    font-size: 16px;
    opacity: 0.9;
    text-align: center;
  }
  
  /* Responsive styles */
  @media (max-width: 1024px) {
    .game-title h1 {
      font-size: 3.5rem;
    }
  
    .welcome-content {
      height: 450px;
    }
  
    .construction-crane {
      transform: scale(0.9);
    }
  }
  
  @media (max-width: 768px) {
    .game-title h1 {
      font-size: 3rem;
    }
  
    .subtitle {
      font-size: 1rem;
    }
  
    .welcome-content {
      height: 400px;
    }
  

  
    .construction-crane {
      transform: scale(0.8);
    }
  }
  
  @media (max-width: 480px) {
    .game-title h1 {
      font-size: 2.5rem;
    }
  
    .welcome-content {
      height: 350px;
      width: 95%;
    }
  

  
    #message-text {
      font-size: 1.5rem;
      padding: 1.5rem;
    }
  
    .construction-crane {
      transform: scale(0.7);
    }
  }
  
  /* Victory Screen Styles */
  #victory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease-in;
  }
  /* Allow JS to toggle visibility */
  #victory-screen.hidden {
    display: none;
  }
  
  .victory-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.6s ease-out;
  }
  
  .victory-title {
    font-family: 'Bubblegum Sans', cursive;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounce 1s ease-in-out infinite alternate;
  }
  
  .victory-message {
    font-family: 'Comic Neue', cursive;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 2rem;
    opacity: 0.9;
  }
  
  .victory-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(5px);
  }
  
  .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .stat-label {
    font-family: 'Comic Neue', cursive;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
  }
  
  .stat-item span:last-child {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
  }
  
  .victory-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .victory-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
  
  .victory-btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
  }
  
  .victory-btn.primary:hover {
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  }
  
  .victory-btn.secondary {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
  }
  
  .victory-btn.secondary:hover {
    background: linear-gradient(45deg, #0984e3, #74b9ff);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes slideUp {
    from { 
      opacity: 0;
      transform: translateY(50px) scale(0.9);
    }
    to { 
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  @keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
  }
  
  /* Responsive Victory Screen */
  @media (max-width: 768px) {
    .victory-content {
      padding: 2rem;
      margin: 1rem;
    }
    
    .victory-title {
      font-size: 2rem;
    }
    
    .victory-message {
      font-size: 1.1rem;
    }
    
    .victory-buttons {
      flex-direction: column;
      align-items: center;
    }
    
    .victory-btn {
      width: 100%;
      max-width: 250px;
    }
  }

  /* Enhanced Game Environment Styles */
  /* Styles added for improved landscape, duck, digger, and shapes */
  
  /* 3D Scene Environment Enhancements */
  .environment-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
  }
  
  /* Cloud elements */
  .cloud {
    position: absolute;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 50"><path d="M10,30 Q15,20 30,25 Q35,10 50,15 Q65,5 70,20 Q85,15 90,30 Q100,35 90,40 Q80,50 60,45 Q50,55 30,45 Q10,50 10,30" fill="%23ffffff" opacity="0.9"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
    animation: cloud-drift linear infinite;
  }
  
  .cloud-1 {
    top: 10%;
    left: -100px;
    width: 120px;
    height: 60px;
    animation-duration: 120s;
  }
  
  .cloud-2 {
    top: 20%;
    left: -150px;
    width: 180px;
    height: 90px;
    animation-duration: 150s;
    animation-delay: 10s;
  }
  
  .cloud-3 {
    top: 5%;
    left: -80px;
    width: 100px;
    height: 50px;
    animation-duration: 100s;
    animation-delay: 20s;
  }
  
  @keyframes cloud-drift {
    from {
        transform: translateX(-100px);
    }
    to {
        transform: translateX(calc(100vw + 200px));
    }
  }
  
  /* Sun element */
  .sun {
    position: absolute;
    top: 50px;
    right: 100px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #FFEB3B 30%, rgba(255, 235, 59, 0) 70%);
    border-radius: 50%;
    opacity: 0.9;
    animation: sun-glow 5s ease-in-out infinite;
  }
  
  @keyframes sun-glow {
    0%, 100% {
        box-shadow: 0 0 30px 10px rgba(255, 235, 59, 0.7);
    }
    50% {
        box-shadow: 0 0 40px 15px rgba(255, 235, 59, 0.8);
    }
  }
  
  /* Duck name tag enhancement */
  #duck-name {
    background: linear-gradient(to bottom, #ffebee, #ffcdd2);
    border: 2px solid #ffcdd2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    color: #d32f2f;
    font-family: 'Bubblegum Sans', cursive;
    font-size: 16px !important;
    padding: 8px 15px !important;
    border-radius: 15px !important;
    transition: all 0.3s ease;
  }
  
  #duck-name:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ffcdd2;
  }
  
  /* Enhanced checkpoint visualization */
  .checkpoint-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20" fill="%234CAF50" opacity="0.7"/><circle cx="25" cy="25" r="15" fill="%234CAF50" stroke="%23FFFFFF" stroke-width="2"/><path d="M18,25 L23,30 L32,20" stroke="%23FFFFFF" stroke-width="3" fill="none"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.9;
    transform-origin: center bottom;
    animation: checkpoint-bounce 2s ease-in-out infinite;
  }
  
  @keyframes checkpoint-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
  }
  
  /* Shape highlights for better visibility */
  .shape-highlight {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    opacity: 0.6;
    animation: shape-glow 2s ease-in-out infinite;
  }
  
  @keyframes shape-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
  }
  
  /* Enhanced excavator/digger styling */
  .digger-trail {
    position: absolute;
    height: 3px;
    background-color: #8d6e63;
    opacity: 0.6;
    transform-origin: left center;
    z-index: 2;
  }
  
  .digger-dust {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(139, 69, 19, 0.5) 0%, rgba(139, 69, 19, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: dust-fade 1.5s ease-out forwards;
  }
  
  @keyframes dust-fade {
    from {
        opacity: 0.7;
        transform: translate(0, 0) scale(0.5);
    }
    to {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(1.5);
    }
  }
  
  /* Dynamic lighting effects */
  .dynamic-lighting {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0) 40%, 
        rgba(0, 0, 0, 0.1) 100%);
    z-index: 15;
    opacity: 0.5;
  }
  
  
  