body {
    font-family: 'Arial', sans-serif;
    background-color: #fff0f5;
    text-align: center;
    margin: 0;
    padding: 0;
}

h1 {
    color: #d14c8b;
    margin-top: 20px;
}

.game-area {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    /* space between game and side widgets */
    margin-top: 20px;
    flex-wrap: wrap;
}

#game-container {
    position: relative;
    width: 400px;
    height: 600px;
    background: linear-gradient(to top, #ffeef6, #ffffff);
    border: 4px solid pink;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.start-box h2 {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    color: #d14c8b;
    margin-bottom: 20px;
    text-shadow: 1px 1px #fff;
}
#lives-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fce9f4;
    border: 2px solid #f3c2e5;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 1.2rem;
    color: #d14c8b;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(209, 76, 139, 0.2);
    min-width: 100px;
    height: 40px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1;
    padding-bottom: 6px;
}

#queenie {
    position: absolute;
    bottom: 10px;
    left: 170px;
    width: 80px;
    height: 80px;
    background-image: url('head.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.falling-item {
    position: absolute;
    width: 60px;
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.info-bar {
    margin-top: 10px;
    font-size: 18px;
}

#backToGameBtn {
    background-color: #8e44ad;
    color: white;
    font-weight: bold;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(142, 68, 173, 0.6);
    transition: background-color 0.3s ease, transform 0.15s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    user-select: none;
    z-index: 10;
}

#backToGameBtn:hover {
    background-color: #6c3483;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(108, 52, 131, 0.8);
}

#backToGameBtn:active {
    background-color: #5b2c6f;
    transform: scale(0.97);
    box-shadow: 0 2px 5px rgba(91, 44, 111, 0.7);
}

#start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    background: rgba(255, 240, 250, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.start-box {
    text-align: center;
    background: linear-gradient(to bottom right, #fff0f5, #f9e0ff);
    padding: 40px 50px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(209, 76, 139, 0.2);
    border: 2px dashed #eec9f5;
    max-width: 320px;
}

.start-box h2 {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    color: #d14c8b;
    margin-bottom: 20px;
    text-shadow: 1px 1px #fff;
}

#startGameBtn {
    font-size: 1.1rem;
    padding: 12px 24px;
    background: linear-gradient(to right, #d14c8b, #f3b2e7);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(209, 76, 139, 0.4);
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.4s ease;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
}

#startGameBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(209, 76, 139, 0.5);
    background: linear-gradient(to right, #c03b7e, #eba3db);
}

#startGameBtn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(160, 45, 105, 0.6);
    background: linear-gradient(to right, #b13473, #e28fcf);
}

.status-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0 0;
}

.score-box,
.lives-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fce9f4;
    border: 2px solid #f3c2e5;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 1.1rem;
    color: #d14c8b;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(209, 76, 139, 0.2);
    min-width: 100px;
    height: 40px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 240, 250, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-box {
    background: linear-gradient(to bottom right, #fff0f5, #fbe4f9);
    padding: 40px 50px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(209, 76, 139, 0.25);
    border: 2px dashed #eec9f5;
    text-align: center;
    max-width: 320px;
    animation: fadeInScale 0.5s ease;
}

.game-over-box h2 {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    color: #d14c8b;
    margin-bottom: 24px;
    text-shadow: 1px 1px #fff;
}

.game-over-buttons {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    margin-top: 10px;
}

.game-over-buttons button {
    font-size: 1.05rem;
    padding: 12px 28px;
    background: linear-gradient(to right, #d14c8b, #f3b2e7);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(209, 76, 139, 0.35);
    transition: all 0.25s ease;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
    width: 220px;
    max-width: 80%;
}


.game-over-buttons button:hover {
    transform: translateY(-3px) scale(1.04);
    background: linear-gradient(to right, #c03b7e, #eba3db);
    box-shadow: 0 8px 20px rgba(209, 76, 139, 0.45);
}

.game-over-buttons button:active {
    transform: scale(0.96);
    background: linear-gradient(to right, #b13473, #e28fcf);
    box-shadow: 0 4px 10px rgba(160, 45, 105, 0.4);
}

.side-widget {
    width: 140px;
    background: #fff0f5cc;
    border: 2px solid #eec9f5;
    border-radius: 12px;
    padding: 12px;
    font-size: 0.9rem;
    color: #d14c8b;
    box-shadow: 0 4px 8px rgba(209, 76, 139, 0.1);
    user-select: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
}

#legend h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: center;
}

.legend-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

#info {
    line-height: 1.3;
}

/* Responsive stacking for smaller screens */
@media (max-width: 600px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }

    .side-widget {
        margin-top: 12px;
    }
}

