/* Submarine Commando — HotelsCasa */

.lc-submarine-wrap {
    max-width: 820px;
    margin: 0 auto;
    background: #0a1628;
    border-radius: 16px;
    padding: 10px;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.lc-sub-ad-top,
.lc-sub-ad-bottom {
    margin: 8px 0;
}

.lc-sub-game {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #0a1628;
}

.lc-sub-game canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #0a1628;
}

/* UI поверх канваса */
.lc-sub-ui {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.lc-sub-score,
.lc-sub-lives,
.lc-sub-level,
.lc-sub-status {
    position: absolute;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    font-size: 16px;
}

.lc-sub-score { top: 12px; left: 16px; }
.lc-sub-lives { top: 12px; left: 120px; }
.lc-sub-level { top: 12px; right: 16px; }
.lc-sub-status {
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    text-align: center;
    background: rgba(0,0,0,0.6);
    padding: 8px 20px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    max-width: 90%;
}

/* Si el mensaje está vacío, desaparece (no tapa la zona de juego). */
.lc-sub-status:empty {
    display: none;
}

/* Botones de control (móvil) */
.lc-sub-controls {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

/* Cruceta de dirección (arriba / izquierda / abajo / derecha) */
.lc-sub-dpad {
    display: grid;
    grid-template-columns: repeat(3, 50px);
    grid-template-rows: repeat(2, 50px);
    gap: 6px;
}
.lc-sub-dpad .lc-sub-btn-up    { grid-column: 2; grid-row: 1; }
.lc-sub-dpad .lc-sub-btn-left  { grid-column: 1; grid-row: 2; }
.lc-sub-dpad .lc-sub-btn-down  { grid-column: 2; grid-row: 2; }
.lc-sub-dpad .lc-sub-btn-right { grid-column: 3; grid-row: 2; }

.lc-sub-controls .lc-sub-btn {
    pointer-events: all;
    touch-action: none; /* evita scroll/zoom al mantener pulsado el control */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lc-sub-controls .lc-sub-btn:active {
    transform: scale(0.9);
    background: rgba(255,255,255,0.25);
}

.lc-sub-btn-fire {
    background: rgba(231, 76, 60, 0.6) !important;
    font-size: 28px;
}

/* Кнопка старта */
.lc-sub-start-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 40px;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(241, 196, 15, 0.4);
    transition: transform 0.2s;
    z-index: 10;
    letter-spacing: 1px;
}

.lc-sub-start-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
}
.lc-sub-start-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* Adaptable */
@media (max-width: 600px) {
    .lc-sub-controls .lc-sub-btn {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }
    .lc-sub-dpad {
        grid-template-columns: repeat(3, 46px);
        grid-template-rows: repeat(2, 46px);
        gap: 5px;
    }
    .lc-sub-score,
    .lc-sub-lives,
    .lc-sub-level {
        font-size: 13px;
    }
    .lc-sub-score { top: 8px; left: 10px; }
    .lc-sub-lives { top: 8px; left: 90px; }
    .lc-sub-level { top: 8px; right: 10px; }
    .lc-sub-start-btn {
        padding: 12px 24px;
        font-size: 18px;
    }
}