:root {
  --first-gradient-color: #87CEEB;
  --second-gradient-color: #98FB98;
  --third-gradient-color: #90EE90;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--first-gradient-color) 0%, var(--second-gradient-color) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    position: relative;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

#gameCanvas {
    display: block;
    background: linear-gradient(to bottom, var(--first-gradient-color) 0%, var(--second-gradient-color) 70%, var(--third-gradient-color) 100%);
    border: 3px solid #333;
}

/* Starting Screen */

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    pointer-events: all;
}

.screen h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.screen h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #FF6B6B;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.screen p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.instructions {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.instructions p {
    font-size: 1rem;
    margin-bottom: 5px;
}

/* Game Over Screen */

#restartBtn {
    margin-top: 20px;
    padding: 12px 24px;
    font-size: 1.1rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

#restartBtn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

#restartBtn:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

/* Playing Score */
#gameUI {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

#score {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}