@font-face {
  font-family: 'MyGameFont';
  src: url('../fonts/Milkyway.ttf') format('truetype'); 
}

@font-face {
  font-family: 'MyGameFont2';
  src: url('../fonts/Montserrat-Regular.ttf') format('truetype'); 
}

body {
    margin: 0;
    padding: 0;
    align-items: center;
    background: #141D22;
    font-family: 'MyGameFont2', sans-serif;
    font-size: 16px;
}

.game-container-div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    max-width: 100vw;
    position: relative;
    background-color: #141D22;
    background-image: 
        linear-gradient(to right, rgba(74, 74, 143, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(74, 74, 143, 0.1) 1px, transparent 1px),
        linear-gradient(45deg, 
            rgba(74, 74, 143, 0.15) 25%, 
            transparent 60%, 
            transparent 90%, 
            rgba(74, 74, 143, 0.15) 75%);
    background-size: 
        20px 20px,  
        20px 20px,  
        40px 40px;  
    background-position: 0 0, 0 0, 0 0;
}

.game-container {
    position: relative;
    border: 3px solid #2c1b4a;
    border-radius: 0px;
    overflow: hidden; 
}

#gameCanvas {
    background: transparent; 
}

#videoElement {
    display: none; 
}

.stats {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #f2c2a4;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: 'MyGameFont', sans-serif;
    font-size: 1.5rem;
}

.stats div {
    background: rgba(12, 8, 22, 0.3);
    padding: 5px 8px;
    border-radius: 5px;
}

#livesElement {
    letter-spacing: 3px;   
}

.modal, .game-over-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 8, 22, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-modal {
    display: none;
}

.modal-content {
    background: #2c1b4a;
    padding: 25px 40px;
    border-radius: 10px;
    max-width: 450px;
    color: white;
    text-align: center;
    border: 2px solid #ff8a00;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ffcc00;
    font-family: 'MyGameFont', sans-serif;
    font-size: 2.5rem;
}

.modal-content p {
    margin: 15px 0;
    line-height: 1.6;
    font-size: 1.1rem;
}

.start-button, .restart-button {
    background: #1e112d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    font-family: 'MyGameFont', sans-serif;
    font-size: 1.5rem;
    transition: background-color 0.2s;
}

.start-button:hover, .restart-button:hover {
  background: #1e112d;
}

.stats-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 10px 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    text-align: left;
    font-size: 1.2rem;
}

.stats-grid .label {
    font-weight: bold;
    color: #f8e1f4;
}

#finalScore {
    color: #ff8a00;
    font-weight: bold;
}


.game-over-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  color: black;
}

.restart-button {
  margin-top: 1rem;
  padding: 10px 20px;
  background-color: #ffcc00;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
