/* Block UI - Jogo logistico */
.block-game-logistica {
    width: min(1120px, calc(100vw - 72px));
    height: min(640px, calc(100vh - 84px));
    position: fixed;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 10px;
    background: rgba(239, 246, 255, 0.90);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    color: #1f2937;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    transform: translate(-50%, -50%);
    user-select: none;
}

.block-game-logistica-top,
.block-game-logistica-bottom {
    position: absolute;
    left: 20px;
    right: 20px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.30);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.64);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.block-game-logistica-top {
    top: 14px;
}

.block-game-logistica-bottom {
    bottom: 14px;
}

.block-game-logistica-loader {
    position: absolute;
    top: clamp(96px, 23%, 148px);
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    pointer-events: none;
}

.block-game-logistica-loader-logo {
    width: 142px;
    height: auto;
    display: block;
    animation: blockGameLogoPulse 1.25s ease-in-out infinite;
    filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.14));
}

.block-game-logistica-loader-text {
    font-size: 13px;
    font-weight: 800;
    color: #1d4ed8;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.86);
}

.block-game-logistica-title {
    font-size: 14px;
    font-weight: 700;
    color: #1d4ed8;
    line-height: 1.2;
}

.block-game-logistica-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.block-game-logistica-logo {
    width: 94px;
    height: auto;
    display: block;
    flex: 0 0 auto;
}

.block-game-logistica-score,
.block-game-logistica-status {
    min-width: 72px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    line-height: 1.2;
    text-align: right;
}

.block-game-logistica-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    border: none;
    border-radius: 0;
    background: transparent;
    outline: none;
    opacity: 0.92;
    touch-action: manipulation;
}

.block-game-logistica-canvas:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.block-game-logistica-lives {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 78px;
}

.block-game-logistica-lives span {
    width: 20px;
    height: 18px;
    display: inline-block;
    border: 1px solid #17468f;
    border-radius: 3px;
    background: linear-gradient(180deg, #67c7ed 0%, #2563eb 100%);
    box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.22);
    position: relative;
}

.block-game-logistica-lives span::before {
    content: '';
    width: 1px;
    height: 100%;
    position: absolute;
    top: 0;
    left: 50%;
    background: rgba(23, 70, 143, 0.55);
}

.block-game-logistica-lives span.is-lost {
    transform: translateY(3px) rotate(-8deg);
    opacity: 0.34;
    filter: grayscale(1);
}

.block-game-logistica-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.block-game-logistica-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.76);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.block-game-logistica-button:hover,
.block-game-logistica-button:focus {
    border-color: rgba(37, 99, 235, 0.55);
    background: rgba(239, 246, 255, 0.78);
    outline: none;
}

.block-game-logistica-button:active {
    transform: translateY(1px);
}

.block-game-logistica.is-finishing .block-game-logistica-top,
.block-game-logistica.is-finishing .block-game-logistica-bottom {
    border-color: rgba(34, 197, 94, 0.38);
    background: rgba(240, 253, 244, 0.68);
}

.block-game-logistica.is-finishing .block-game-logistica-loader {
    background: transparent;
}

.block-game-logistica.is-finishing .block-game-logistica-loader-text {
    color: #15803d;
}

.block-game-logistica-button:disabled,
.block-game-logistica-button:disabled:hover,
.block-game-logistica-button:disabled:focus {
    border-color: rgba(148, 163, 184, 0.30);
    background: rgba(241, 245, 249, 0.70);
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 575px) {
    .block-game-logistica {
        width: calc(100vw - 20px);
        height: min(620px, calc(100vh - 32px));
        border-radius: 8px;
    }

    .block-game-logistica-top,
    .block-game-logistica-bottom {
        left: 8px;
        right: 8px;
        padding: 8px;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .block-game-logistica-top {
        top: 8px;
    }

    .block-game-logistica-bottom {
        bottom: 8px;
    }

    .block-game-logistica-loader {
        top: clamp(92px, 24%, 136px);
        padding: 6px 10px;
    }

    .block-game-logistica-loader-logo {
        width: 110px;
    }

    .block-game-logistica-loader-text {
        font-size: 12px;
    }

    .block-game-logistica-title,
    .block-game-logistica-score,
    .block-game-logistica-status {
        width: auto;
        min-width: 0;
        text-align: left;
    }

    .block-game-logistica-logo {
        width: 76px;
    }

    .block-game-logistica-actions {
        margin-left: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .block-game-logistica-loader-logo,
    .block-game-logistica-button {
        transition: none;
        animation: none;
    }
}

@keyframes blockGameLogoPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.72;
        transform: scale(0.94);
    }
}
