/* Global Styles */
body {
    margin: 0;
    overflow: hidden;
    background-color: #1e272e; /* Dark Slate/Space Blue for modern depth */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Inter', 'Roboto', sans-serif; /* Modern, clean font stack */
    color: #ecf0f1;
}

#game-container {
    position: relative;
    border: 6px solid #3498db; /* Bright Blue Border */
    box-shadow: 0 0 40px rgba(52, 152, 219, 0.8), 0 0 15px rgba(0, 0, 0, 0.5) inset;
    border-radius: 15px;
    overflow: hidden; 
    transition: transform 0.3s ease-out;
}

#gameCanvas {
    display: block;
    background-color: #87ceeb; /* Sky blue background for the game world */
}

/* HUD Styling */
#hud {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 30px;
    border-radius: 12px;
    z-index: 10;
    font-size: 1.3em;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hud-item {
    padding: 0 10px;
    border-right: 1px solid rgba(236, 240, 241, 0.3);
}

.hud-item:last-child {
    border-right: none;
}

.hud-item span {
    font-weight: 700;
    color: #f1c40f; /* Gold accent for stats */
    transition: color 0.2s ease;
}

/* Screen Overlays (Start, Game Over, Win) */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 39, 46, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.screen h1 {
    font-size: 4em;
    margin-bottom: 15px;
    color: #e74c3c; /* Strong Red/Orange */
    text-shadow: 5px 5px 0 #c0392b, 0 0 15px rgba(231, 76, 60, 0.7);
    transform: scale(1);
    animation: popIn 0.5s ease-out;
}

.screen p {
    font-size: 1.6em;
    margin-bottom: 15px;
    opacity: 0.9;
}

.screen p:last-child {
    margin-top: 25px;
    font-weight: bold;
    color: #f1c40f;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.screen p:last-child:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Animations */
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    #hud {
        gap: 20px;
        font-size: 1.1em;
        padding: 8px 20px;
    }
    .screen h1 {
        font-size: 3em;
    }
    .screen p {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    #hud {
        top: 8px;
        gap: 10px;
        padding: 6px 10px;
        font-size: 0.9em;
    }
    .screen h1 {
        font-size: 2.5em;
    }
    .screen p {
        font-size: 1.1em;
    }
}


/* Karbon Sites Branding */

  #karbon-promo-banner {
      position: fixed;
      bottom: 10px;
      right: 10px;
      background-color: rgba(0, 0, 0, 0.8);
      color: white;
      padding: 8px 16px;
      border-radius: 8px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      font-size: 14px;
      z-index: 10000;
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      transition: transform 0.2s ease-in-out;
  }
  #karbon-promo-banner:hover {
      transform: scale(1.05);
  }
