/* Splash Screen */
#loading-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    font-family: 'Luckiest Guy', cursive;
    transition: opacity 0.5s ease-out;
}
#loading-logo {
    width: 150px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
#loading-bar-container {
    width: 200px;
    height: 12px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #7BBE2D;
    box-shadow: 0 0 15px rgba(123, 190, 45, 0.4);
}
#loading-bar {
    width: 0%;
    height: 100%;
    background: #7BBE2D;
    transition: width 0.3s;
}
#loading-text {
    color: #fff;
    margin-top: 15px;
    letter-spacing: 2px;
    font-size: 18px;
    text-shadow: 2px 2px 0px #000;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    z-index: 9999;
}
#canvas-wrapper {
    position: relative;
    height: 100vh;
    aspect-ratio: 3 / 6;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #222;
}
#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {
    #canvas-wrapper {
        width: 100vw;
        height: 100vh;
        aspect-ratio: auto;
    }
    #gameCanvas {
        object-fit: fill;
    }
}

#scoreBoard {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-family: 'Luckiest Guy', cursive;
    color: white;
    font-size: 20px;
    text-shadow: 2px 2px 4px #000;
    z-index: 5;
    pointer-events: none;
    letter-spacing: 1px;
}
.score-left {
    display: flex;
    flex-direction: column;
    text-align: left;
}
#livesContainer {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    font-size: 14px;
    text-shadow: 1px 1px 2px #000;
}
.heart {
    margin-left: 3px;
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.5));
}
#overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10;
}
#overlay-text {
    font-family: 'Luckiest Guy', cursive;
    font-size: 50px;
    color: #FFD700;
    text-align: center;
    text-shadow: 3px 3px 6px #000;
    letter-spacing: 2px;
}
.game-btn {
    font-family: 'Luckiest Guy', cursive;
    font-size: 24px;
    padding: 10px 20px;
    cursor: pointer;
    color: #fff;
    position: relative;
    background-color: #7BBE2D;
    background-image: linear-gradient(to top, #6aab24 0%, #8bdd31 100%);
    border: none;
    border-radius: 10px;
    box-shadow: 
        inset 0px 1px 0px #bdf279, 
        0px 6px 0px 0px #4d7a1c, 
        0px 10px 5px rgba(0,0,0,0.3);
    text-transform: uppercase;
    margin: 5px;
    margin-bottom: 15px;
    transition: all 0.1s;
}

.game-btn:active {
    transform: translateY(4px);
    background-image: linear-gradient(to top, #6aab24 100%, #8bdd31 0%);
    box-shadow: 
        inset 0px 1px 0px #bdf279, 
        0px 2px 0px 0px #4d7a1c, 
        0px 4px 3px rgba(0,0,0,0.3);
}

.small-logo {
    width: 80px;
    margin-top: -10px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.control-btn {
    font-size: 20px;
    padding: 5px 15px;
    margin: 0;
}
.control-btn:active {
    transform: translateY(4px);
}

#overlay-buttons {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
