:root {
    --primary-color: #0077be;
    --secondary-color: #ffcc00;
    --text-color: #ffffff;
    --dark-blue: #0d2c54;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', sans-serif;
    background-color: var(--dark-blue);
}

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-image: url('background1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#game-area {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}

#stitch {
    position: absolute;
    width: 80px;
    height: 80px;
    transition: top 0.2s ease-out, left 0.2s ease-out;
    transform: translate(-50%, -50%);
    z-index: 10;
    user-select: none;
    -webkit-user-drag: none;
}

.sandwich {
    position: absolute;
    width: 50px;
    height: 50px;
    z-index: 5;
    animation: float 3s ease-in-out infinite;
    user-select: none;
    -webkit-user-drag: none;
}

.enemy {
    position: absolute;
    width: 70px;
    height: 70px;
    z-index: 8;
    user-select: none;
    -webkit-user-drag: none;
}

#ui-top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    text-shadow: 2px 2px 4px #000000;
    font-size: clamp(16px, 3vw, 24px);
    z-index: 20;
    padding: 5px 10px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 10px;
}

#lives-display {
    display: flex;
}

.life {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    background-image: url('stitch_life.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 44, 84, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 30;
    color: var(--text-color);
}

.screen-content {
    background-color: var(--primary-color);
    padding: 20px 40px;
    border-radius: 20px;
    border: 5px solid var(--secondary-color);
    max-width: 90%;
}

.screen h1 {
    font-size: clamp(28px, 5vw, 48px);
    color: var(--secondary-color);
    margin-top: 0;
    text-shadow: 3px 3px 5px #000;
}

.screen h2 {
    font-size: clamp(24px, 4vw, 40px);
}

.screen p {
    font-size: clamp(16px, 2.5vw, 22px);
}

.screen button {
    padding: 15px 30px;
    font-size: clamp(18px, 3vw, 24px);
    background-color: var(--secondary-color);
    color: var(--dark-blue);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    box-shadow: 0 5px #c79d00;
    transition: all 0.1s ease-in-out;
}

.screen button:active {
    transform: translateY(5px);
    box-shadow: 0 0 #c79d00;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

