/* Brick Break — viewport-adaptive 750×440 playfield */

@media screen and (max-height: 640px) {
    #brkPlayShell .container.container-single {
        padding-top: 3px !important;
    }
}

#brkPlayShell.game-worlds-play-shell {
    min-height: 0;
    box-sizing: border-box;
}

#brkPlayShell.game-worlds-play-shell:not([data-casual-sized]) {
    height: 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}

#brkPlayShell .casual-outer-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.game-worlds-body #brkPlayShell #gamebox.brk-gamebox,
#brkPlayShell #gamebox.brk-gamebox {
    --brk-scale: 1;
    --brk-ox: 0px;
    --brk-oy: 0px;
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #161c1c;
}

#brkPlayShell #scoreAndTime {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 8px 16px;
    box-sizing: border-box;
    z-index: 2;
}

#brkPlayShell #scoreBoard,
#brkPlayShell #remainRow,
#brkPlayShell #remain,
#brkPlayShell #timer {
    font-size: clamp(18px, 2.4vw, 24px);
    font-weight: bold;
    color: #fff;
    font-family: Arial, sans-serif;
}

#brkPlayShell #remainRow {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

#brkPlayShell #timer {
    color: #f87171;
}

#brkPlayShell .brk-playfield {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

#brkPlayShell #gameBox {
    position: absolute;
    left: 0;
    top: 0;
    width: 750px;
    height: 440px;
    margin: 0;
    background-color: #161c1c;
    border: none;
    overflow: hidden;
    box-sizing: border-box;
    transform: translate(var(--brk-ox, 0px), var(--brk-oy, 0px)) scale(var(--brk-scale, 1));
    transform-origin: top left;
}

#brkPlayShell #gameover {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    text-align: center;
    background-color: rgba(22, 28, 28, 0.95);
    z-index: 2;
}

#brkPlayShell #gameover #msg {
    font-family: Arial, sans-serif;
    font-size: clamp(20px, 3vw, 24px);
    color: #ccc;
    margin: min(150px, 22vh) auto 0;
}

#brkPlayShell #scoreGameOver {
    font-family: Arial, sans-serif;
    font-size: clamp(18px, 2.4vw, 22px);
    color: #fff;
    margin: 12px 0 8px;
}

#brkPlayShell #restartbtn {
    display: block;
    margin: 16px auto;
    width: 120px;
    padding: 6px;
    background-color: #00BB00;
    font-family: Arial, sans-serif;
    font-size: 24px;
    color: red;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
}

#brkPlayShell .brk-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 6;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: transparent;
    pointer-events: none;
    font-family: "DM Sans", system-ui, sans-serif;
}

#brkPlayShell .brk-overlay:not([hidden]) {
    display: flex;
}

#brkPlayShell .brk-overlay__panel {
    pointer-events: auto;
    width: min(100%, 340px);
    margin-top: 2rem;
    padding: 28px 24px 24px;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 20px 48px rgba(2, 6, 23, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    text-align: center;
}

#brkPlayShell .brk-overlay__title {
    margin: 0 0 8px;
    font-size: 1.375rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

#brkPlayShell .brk-overlay__hint {
    margin: 0 0 22px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #94a3b8;
}

#brkPlayShell .brk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #0f172a;
    cursor: pointer;
    background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 45%, #0ea5e9 100%);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#brkPlayShell .brk-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
