* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: 'Segoe UI', sans-serif;
    text-align: center;
    background-color: #f4f4f4;
    color: #333;
    padding: 20px;
    transition: all 0.3s ease;
  }
  
  body.dark-mode {
    background-color: #121212;
    color: #eee;
  }
  
  h1 {
    margin-bottom: 10px;
    font-size: 2rem;
  }
  
  #controls {
    margin-bottom: 20px;
  }
  
  #controls button {
    padding: 10px 20px;
    margin: 5px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    transition: all 0.3s ease;
  }
  
  #controls button:hover {
    background-color: #0056b3;
  }
  
  #game {
    position: relative;
    width: 800px;
    height: 200px;
    margin: 30px auto;
    background-color: #e0e0e0;
    border: 2px solid #333;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    transition: background-color 0.3s ease;
  }
  
  body.dark-mode #game {
    background-color: #1e1e1e;
  }
  
  #ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: #333;
    z-index: 1;
  }
  
  #dino {
    position: absolute;
    bottom: 10px;
    left: 50px;
    width: 40px;
    height: 40px;
    background-color: green;
    border-radius: 5px;
    z-index: 2;
  }
  
  .obstacle {
    position: absolute;
    bottom: 10px;
    width: 15px;
    height: 40px;
    background-color: red;
    z-index: 2;
  }
  
  #score {
    font-size: 22px;
    font-weight: bold;
    margin-top: 10px;
  }
  
  /* Modal Styles */
  #gameOverModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
  }
  
  #gameOverModal.hidden {
    display: none;
  }
  
  .modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    text-align: center;
    width: 300px;
    color: #333;
  }
  
  .modal-content h2 {
    margin-top: 0;
  }
  
  .modal-content p {
    font-size: 18px;
    margin: 10px 0 20px;
  }
  
  #restartBtn {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #28a745;
    color: white;
    transition: background-color 0.3s ease;
  }
  
  #restartBtn:hover {
    background-color: #218838;
  }
  
  /* Dark mode modal override */
  body.dark-mode #gameOverModal .modal-content {
    background-color: #2c2c2c;
    color: #eee;
  }
  
  body.dark-mode #restartBtn {
    background-color: #28a745;
  }
  
  /* Footer */
  footer {
    margin-top: 40px;
    font-size: 14px;
    color: #777;
  }
  
  body.dark-mode footer {
    color: #aaa;
  }