body {
    background-color: #ffd1dc; /* Pastel Pink */
    color: #333;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

.game-container {
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 600px;
}

h1 {
    margin-bottom: 20px;
    color: #d147a3;
    text-shadow: none;
}

.score-board {
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #555;
}

canvas {
    border: 8px solid #fff;
    background-color: #2e8b57; /* Table Green */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    cursor: none; /* Hide cursor over game */
    max-width: 90vw;
    max-height: 70vh;
}

.instructions {
    margin-top: 10px;
    font-size: 14px;
    color: #aaa;
}

/* Modal Styling */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8); 
    animation: fadeIn 0.5s;
}

.modal-content {
    background-color: #fefefe;
    color: #333;
    margin: 10% auto; 
    padding: 20px;
    border: 5px solid #ffcc00;
    width: 80%; 
    max-width: 500px;
    text-align: center;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 0 50px #ffcc00;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.pixel-art-cake {
    font-size: 60px;
    margin: 20px 0;
}

.birthday-message {
    font-size: 18px;
    line-height: 1.6;
}

#restartBtn {
    background-color: #0033cc;
    color: white;
    padding: 10px 20px;
    border: none;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    border-radius: 5px;
}

#restartBtn:hover {
    background-color: #0055ff;
}

@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

/* Envelope Styles */
.envelope-container {
    cursor: pointer;
    padding: 20px;
}

.pixel-envelope {
    font-size: 80px;
    margin-bottom: -20px;
}

.pixel-heart {
    font-size: 50px;
    animation: heartBeat 1.2s infinite;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.click-hint {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
}