h1 {
    font-family: var(--heading-font);
    font-weight: 400;
    font-size: 3rem;
}

.game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    /* max-width: 1000px;  Removed to allow full width */
    margin: 0 auto;
    box-sizing: border-box;
    /* Ensure padding doesn't break width */
}

.game-area {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.scoreboard {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 15px;
    width: 100%;
    max-width: 600px;
    /* Increased max-width for tablet/mobile */
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
}

#scoreboard-reset-btn {
    margin-top: 10px;
    width: 100%;
    /* Full width button on mobile looks better usually, or keep auto */
    max-width: 200px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    flex: 1 1 20%;
    /* Allow 4 items in a row if space permits */
    color: white;
    font-family: var(--font-family);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    flex: 1 1 20%;
    color: white;
    font-family: var(--font-family);
    margin-top: 0;
    /* Remove top margin for flex row layout */
    box-sizing: border-box;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-family: var(--heading-font);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.target {
    position: absolute;
    background: radial-gradient(circle, #ff6b6b 30%, #ee5253 100%);
    border-radius: 50%;
    cursor: crosshair;
    transition: transform 0.1s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.target:active {
    transform: scale(0.9);
}

.target::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 3px solid white;
    border-radius: 50%;
    opacity: 0.5;
}

@keyframes popIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(142, 176, 198, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 10;
    border-radius: 20px;
}

.hidden {
    display: none !important;
}

.game-btn {
    font-family: var(--font-family);
    font-size: 1.2rem;
    border-radius: 5px;
    transition: all 0.2s;
    background-color: #ff6b6b;
    color: rgb(255, 255, 255);
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 0 #d35454;
    transform: translateY(0);
    margin-top: 1rem;
}

.game-btn:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #d35454;
}

.game-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #d35454;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    backdrop-filter: blur(5px);
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Layout for Large Screens */
@media (min-width: 1000px) {
    .game-content {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: start;
        gap: 20px;
        margin-top: 2rem;
        width: 100%;
        padding: 0 2rem;
        box-sizing: border-box;
    }

    .game-area {
        grid-column: 2;
        width: 800px;
        height: 600px;
    }

    .scoreboard {
        grid-column: 3;
        justify-self: end;
        margin-top: 0;
        width: 280px;
        max-width: 280px;
        /* Reset max-width for desktop sidebar */
        height: auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-content: flex-start;
        gap: 1rem;
    }

    #scoreboard-reset-btn {
        margin-top: auto;
        margin-left: auto;
        margin-right: auto;
        width: auto;
    }

    .stat-box {
        flex: 1 1 45%;
        width: auto;
    }

    .stat-item {
        flex: 1 1 100%;
        width: 100%;
        margin-top: 1rem;
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-20px);
        opacity: 0;
    }
}