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

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('../images/background11.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    font-family: "Montserrat", sans-serif;
}

.gameWrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.gameDiv {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.topperTopperHolder {
    width: 1080px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
}

.topperHolder {
    width: auto;
    flex: 1 1 auto;
    height: 57px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    border-radius: 5px;
    background-color: rgba(162, 177, 209, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.topperTopperHolder #helpBtn,
.topperTopperHolder #pauseBtn {
    width: 57px;
    height: 57px;
    border-radius: 5px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background-color: rgba(162, 177, 209, 0.3);
    color: rgb(255, 255, 255);
    font-weight: 700;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.topperTopperHolder #helpBtn .helpIcon,
.topperTopperHolder #pauseBtn .pauseIcon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.mainGameRow {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#canvasDiv {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 900px;
    height: 800px;
    background-color: rgba(162, 177, 209, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

canvas {
    display: block;
    background-color: transparent;
}

#canvasDiv.game-won {
    background-color: transparent !important;
    border: none !important;
}

/* top boxes */
#scoreDiv,
#bestScoreDiv,
#timerDiv {
    border-left: 2px solid rgba(255, 255, 255, 0.5);
    height: 55px;
    display: flex;
    align-items: center;
}

#heartDiv {
    height: 55px;
    display: flex;
    align-items: center;
    width: 195px;
    gap: 12px;
    padding: 0 10px;
}

#scoreDiv,
#bestScoreDiv,
#timerDiv {
    flex: 1;
    justify-content: center;
    gap: 10px;
    user-select: none;
}

#scoreDiv p,
#bestScoreDiv p,
#timerDiv p {
    text-transform: uppercase;
    font-size: 32px;
    font-weight: bold;
}

#scoreDiv p {
    color: yellow;
}

#bestScoreDiv p,
#timerDiv p {
    color: rgba(255, 255, 255, 0.55);
}

#sctxt {
    color: rgb(255, 255, 255) !important;
}

.heartIcon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* side panels */
.sidePanel {
    width: 70px;
    min-height: 180px;
    background-color: rgba(162, 177, 209, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 12px;
}

.sidePanel a {
    text-decoration: none;
    width: 100%;
    display: flex;
    justify-content: center;
}

.sidePanel button {
    width: 50px;
    height: 40px;
    background-color: rgb(212, 212, 212);
    border: 2px solid rgba(0, 0, 0, 0.5);
    cursor: pointer;
    font-weight: bold;
}

.activeLevelBtn {
    background-color: rgb(136, 136, 136) !important;
}

#musicDiv {
    position: absolute;
    bottom: 4px;
    right: 5px;
    color: rgb(113, 113, 113);
    font-size: 12px;
}


/* SWEET ALERT STYLING */
.my-swal-popup {
    position: absolute !important;
    bottom: 25px;
    top: auto !important;
    transform: none !important;
    background: rgba(255, 255, 255);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255);
    padding: 22px 26px !important;
    color: #111;
}

/* Content */
.win-title {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
}

.win-message {
    margin: 6px 0;
    font-size: 18px;
    opacity: 0.85;
}

.win-score {
    font-size: 24px;
    margin-top: 6px;
}

.win-score span {
    font-weight: 700;
}

/* Buttons row */
.win-actions {
    margin-top: 14px !important;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Shared button style (matches your game UI better) */
.retry-btn,
.next-btn,
.menu-btn {
    padding: 8px 16px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border: 2px solid rgba(255, 255, 255) !important;
    box-shadow: none !important;
    transition: 0.15s ease;
}

/* Retry (blue) */
.retry-btn {
    background: rgba(79, 160, 221) !important;
    color: rgb(0, 0, 0) !important;
}

.retry-btn:hover {
    background: rgba(79, 160, 221) !important;
}

.next-btn {
    background: rgba(220, 205, 94) !important;
    color: rgb(0, 0, 0) !important;
}

.next-btn:hover {
    background: rgba(220, 205, 94, 1) !important;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    color: black !important;
}

/* LOSE SWAL*/
.lose-swal {
    background: rgba(32, 50, 85, 0.78);
    backdrop-filter: blur(12px);
    color: white;
}

.lose-title {
    font-size: 36px;
    font-weight: bold;
}

.lose-message {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
}

.lose-stats {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
}

.lose-stats span {
    color: #ffffff;
    font-weight: bold;
}

.retry-btn {
    background: linear-gradient(120deg, #5db7ff, #3d8fe0);
    color: white;
    min-width: 110px;
    height: 40px;
    padding: 0 16px;
    font-weight: bold;
}

.retry-btn:hover {
    filter: brightness(1.05);
}

.menu-btn {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    min-width: 110px;
    height: 40px;
    padding: 0 16px;
    font-weight: bold;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* WIN SWAL */
.win-swal {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
    padding: 22px !important;
    color: #111 !important;
}

.win-swal .win-title {
    margin: 0;
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 0.6px;
}

.win-swal .win-message {
    margin: 8px 0;
    font-size: 20px;
    opacity: 0.85;
}

.win-swal .win-score {
    font-size: 24px;
    color: rgba(0, 0, 0, 0.7);
}

.win-swal .win-score span {
    color: #111;
    font-weight: bold;
}

.win-swal .win-actions {
    margin-top: 14px !important;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.win-swal .retry-btn,
.win-swal .next-btn,
.win-swal .menu-btn {
    min-width: 110px;
    height: 40px;
    padding: 0 16px !important;
    border: 2px solid rgba(0, 0, 0, 0.3) !important;
    font-weight: bold !important;
    box-shadow: none !important;
    transition: filter 0.2s ease, background-color 0.2s ease;
}

.win-swal .retry-btn {
    background: rgba(79, 160, 221, 0.8) !important;
    color: rgb(0, 0, 0) !important;
}

.win-swal .retry-btn:hover {
    filter: brightness(1.05);
}

.win-swal .menu-btn {
    background: rgba(220, 205, 94, 0.8) !important;
    color: rgb(0, 0, 0) !important;
}

.win-swal .menu-btn:hover {
    filter: brightness(1.05);
}

.win-swal .next-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    color: rgb(0, 0, 0) !important;
    border-color: rgba(0, 0, 0, 0.25) !important;
}

.win-swal .next-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

#levelPicker {
    height: 20px;
    width: 150px;
    position: absolute;
    bottom: 1px;
    left: 1px;

}

#levelPicker button {
    width: 45px;
    background-color: rgba(219, 219, 219, 0.431);
    border-color: rgba(219, 219, 219, 0.431);
    color: rgb(98, 98, 98);
    border-radius: 5px;
}