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

body {
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
}

#instructions {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    padding: 20px;
    background-color: black;
    border: 3px solid #d4af37;
    border-radius: 10px;
    color: white;
    text-align: center;
    z-index: 20;
}

#instruction-button {
    font-family: 'Tiny5', sans-serif;
    font-size: 1.5em;
    padding: 12px 24px;
    margin-top: 10px;
    border-radius: 8px;
    cursor: pointer;
}

#music-button {
    font-family: 'Tiny5', sans-serif;
    font-size: 1em;
    padding: 6px 18px;
    background-color: black;
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 8px;
}

#music-button:hover {
    background-color: white;
    color: black;
}

.gameScreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: rgba(32, 32, 79, 0.4);
    border: 3px solid #d4af37;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 0 20px #d4af37;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

canvas {
    background-color: rgba(0, 0, 0, 1);
    border: 3px solid #d4af37;
    border-radius: 8px;
    display: block;
    width: 100%;
    height: auto;
    max-width: 400px;
    margin: 0 auto;
}

#rules {
    margin-bottom: 15px;
    width: 100%;
    color: white;
}

h1 {
    font-family: 'Tiny5', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0 0 15px 0;
    letter-spacing: 2px;
    color: white;
}

#points {
    font-family: 'Tiny5', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0 0 15px 0;
    letter-spacing: 2px;
    color: white;
}

#coins {
    font-family: 'Tiny5', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0 0 15px 0;
    letter-spacing: 2px;
    color: white;
}

#scoreview {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
}

#heart-emoji {
    white-space: nowrap;
}

#game-start {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
}

#text {
    font-family: 'Tiny5', sans-serif;
    font-weight: 900;
    margin: 0 0 15px 0;
    letter-spacing: 2px;
    color: white;
}

#start-button {
    font-family: 'Tiny5', sans-serif;
    font-size: 1.5em;
    padding: 12px 24px;
    background-color: rgba(34, 139, 34, 1);
    color: rgba(255, 255, 255, 0.9);
    border: 3px solid rgba(0, 100, 0, 1);
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

#start-button:hover {
    background-color: rgba(50, 205, 50, 1);
}

#game-restart {
    position: absolute;
    left: 50%;
    bottom: 25%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#restart {
    font-family: 'Tiny5', sans-serif;
    font-size: 1.5em;
    padding: 12px 24px;
    background-color: rgba(34, 139, 34, 1);
    color: rgba(255, 255, 255, 0.9);
    border: 3px solid rgba(0, 100, 0, 1);
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

#restart:hover {
    background-color: rgba(50, 205, 50, 1);
}