/* =========================================================
   BLACKWING ASCENT 1.0.0
   Game-specific styles for Above Interactive Engine 1.1.4+
   ========================================================= */

.aie-blackwing-ascent {
    background: #06111d;
    font-family: Arial, Helvetica, sans-serif;
    touch-action: none;
    outline: none;
}

/* Portrait 3:4 playfield. In normal page flow it shrinks to fit both the
   content column and the available browser height, so content below remains
   below the game instead of being covered by it. */
.aie-blackwing-ascent.aie-root--inline {
    display: block;
    width: min(100%, 75svh, 900px);
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    margin-inline: auto;
    overflow: hidden;
}

.aie-blackwing-ascent .aie-canvas {
    position: absolute;
    inset: 0;
}

.aie-blackwing-ascent:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(67, 170, 255, 0.78);
}

.aie-blackwing-ascent__toolbar {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 7px;
    padding: 0 10px 10px;
    pointer-events: none;
}

.aie-blackwing-ascent__toolbar .aie-button {
    min-height: 34px;
    padding: 0 9px;
    border-color: rgba(67, 170, 255, 0.26);
    background: rgba(4, 14, 24, 0.76);
    font-size: 9px;
    letter-spacing: 0.07em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}

.aie-blackwing-ascent__toolbar .aie-button:hover,
.aie-blackwing-ascent__toolbar .aie-button:focus-visible {
    background: rgba(0, 100, 183, 0.86);
}

.aie-blackwing-ascent__toolbar .aie-button:disabled {
    opacity: 0.42;
    cursor: default;
    transform: none;
}

.aie-blackwing-ascent__touch {
    position: absolute;
    inset: 0;
    z-index: 35;
    display: none;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 18px 52px;
    pointer-events: none;
}

.aie-blackwing-ascent__dpad {
    position: relative;
    width: 154px;
    height: 154px;
    pointer-events: auto;
}

.aie-blackwing-ascent__dpad button,
.aie-blackwing-ascent__burst {
    position: absolute;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    padding: 0;
    color: #fff;
    background: rgba(4, 14, 24, 0.74);
    border: 1px solid rgba(67, 170, 255, 0.45);
    border-radius: 14px;
    box-shadow: inset 0 0 18px rgba(0, 128, 255, 0.08);
    font: 900 18px/1 Arial, Helvetica, sans-serif;
    touch-action: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.aie-blackwing-ascent__dpad button:active,
.aie-blackwing-ascent__burst:active {
    background: rgba(0, 100, 183, 0.9);
    border-color: #43aaff;
    transform: scale(0.96);
}

.aie-blackwing-ascent__dpad [data-touch-control="up"] {
    left: 50px;
    top: 0;
}

.aie-blackwing-ascent__dpad [data-touch-control="left"] {
    left: 0;
    top: 50px;
}

.aie-blackwing-ascent__dpad [data-touch-control="right"] {
    right: 0;
    top: 50px;
}

.aie-blackwing-ascent__dpad [data-touch-control="down"] {
    left: 50px;
    bottom: 0;
}

.aie-blackwing-ascent__burst {
    position: relative;
    width: 94px;
    height: 94px;
    margin-bottom: 12px;
    border-radius: 50%;
    color: #06111d;
    background: rgba(67, 170, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 0 28px rgba(67, 170, 255, 0.28);
    font-size: 13px;
    letter-spacing: 0.06em;
}

.aie-blackwing-ascent--touch-active .aie-blackwing-ascent__touch {
    display: flex;
}

@media (hover: none) and (pointer: coarse) {
    .aie-blackwing-ascent__touch {
        display: flex;
    }
}

@media (max-width: 620px), (max-height: 720px) {
    .aie-blackwing-ascent__toolbar {
        gap: 4px;
        padding: 0 6px 6px;
    }

    .aie-blackwing-ascent__toolbar .aie-button {
        min-height: 29px;
        padding: 0 6px;
        font-size: 8px;
    }

    .aie-blackwing-ascent__touch {
        padding: 0 10px 40px;
    }

    .aie-blackwing-ascent__dpad {
        width: 128px;
        height: 128px;
        transform: scale(0.88);
        transform-origin: left bottom;
    }

    .aie-blackwing-ascent__burst {
        width: 78px;
        height: 78px;
        margin-bottom: 8px;
        font-size: 11px;
    }
}

.aie-blackwing-ascent:fullscreen,
.aie-blackwing-ascent:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    aspect-ratio: auto !important;
}

@media (prefers-reduced-motion: reduce) {
    .aie-blackwing-ascent__toolbar .aie-button,
    .aie-blackwing-ascent__dpad button,
    .aie-blackwing-ascent__burst {
        transition-duration: 1ms !important;
    }
}
