:root {
    --background-color: #0575E6;
    --background-secondary-color: #021B79;
    --canvas-color: #f0f0f0;
    --text-color: rgba(255, 255, 255, 0.87);
    --sidebar-color: #343457;
    --button-color: #0575E6; /* Assuming you want to keep this color for buttons */
    --hover-color: #7db3e3;
  }
  
  * {
    box-sizing: border-box;
  }
  
  body {
    background-color: var(--background-color);
    background: linear-gradient(
      to right,
      var(--background-color),
      var(--button-color),
      var(--background-secondary-color)
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }
  
  h1 {
    font-size: 2.75rem;
    color: var(--text-color);
    font-weight: bold;
  }
  
  canvas {
    background-color: var(--canvas-color);
    display: block;
    border-radius: 5px;
    width: 800px;
    max-width: 96%;
  }
  
  .btn {
    cursor: pointer;
    border: 0;
    padding: 0.625rem 1.25rem;
    background-color: var(--button-color);
    color: var(--text-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
  }
  
  .btn:focus {
    outline: 0;
  }
  
  .btn:hover {
    background-color: var(--hover-color);
  }
  
  .btn:active {
    transform: scale(0.98);
  }
  
  .rules-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  
  .rules-content {
    background-color:white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
  }
  
  .rules-content h2 {
    margin: 0 0 1rem;
  }
  
  .rules-content p {
    margin: 0.5rem 0;
  }
  
  .rules-container .btn {
    margin-top: 1rem;
  }
  @media (max-width: 840px) {
    body {
      padding: 1rem; 
      font-size: 14px;}
  
    h1 {
      font-size: 1.75rem;
    }
  
    canvas {
      width: 100%; 
      max-width: 100%;
    }
  
    .btn {
      padding: 0.5rem 1rem;
      font-size: 0.875rem; 
    }
  
    .rules-container {
      padding: 1rem;
    }
  
    .rules-content {
      width: 90%; 
      padding: 1rem; 
    }
  
    .rules-content h2 {
      font-size: 1.5rem; 
    }
  
    .rules-content p {
      font-size: 0.875rem; 
    }
  }