/* ==========================================
   GAME WRAPPER - Arcade Cabinet Frame
   For iframe-embedded retro games
   ========================================== */

.arcade-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

.arcade-hud {
    margin-bottom: 10px;
    padding: 10px 15px;
    flex-shrink: 0;
}

/* Arcade Cabinet */
.arcade-cabinet {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 10px;
    gap: 0;
}

.cabinet-top {
    display: flex;
    gap: 15px;
    padding: 10px 30px;
    background: var(--bg-medium);
    border: 3px solid var(--border-color);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 0 var(--bg-dark);
}

.cabinet-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-dim);
    animation: cabinet-blink 1.5s infinite alternate;
}

.cabinet-light:nth-child(1) {
    background: var(--accent);
    animation-delay: 0s;
}

.cabinet-light:nth-child(2) {
    background: var(--accent-green);
    animation-delay: 0.5s;
}

.cabinet-light:nth-child(3) {
    background: var(--accent-blue);
    animation-delay: 1s;
}

@keyframes cabinet-blink {
    0% { opacity: 0.3; box-shadow: none; }
    100% { opacity: 1; box-shadow: 0 0 10px currentColor; }
}

/* Screen Frame */
.arcade-screen-wrapper {
    position: relative;
    width: 100%;
    max-height: calc(100vh - 220px);
    background: #000;
    border: 4px solid var(--border-color);
    border-radius: 4px;
    box-shadow:
        0 0 0 2px var(--bg-dark),
        inset 0 0 50px rgba(0,0,0,0.8),
        0 0 30px rgba(233, 69, 96, 0.1);
    overflow: hidden;
}

/* Game-specific aspect ratios */
.arcade-screen-wrapper.flappybird {
    max-width: 420px;
    aspect-ratio: 288 / 512;
}

.arcade-screen-wrapper.galaga {
    max-width: 700px;
    aspect-ratio: 3 / 4;
}

.game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000;
}

/* Cabinet Bottom Panel */
.cabinet-bottom {
    padding: 10px 30px;
    background: var(--bg-medium);
    border: 3px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 0 var(--bg-dark);
    min-width: 200px;
}

.cabinet-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.cabinet-label {
    font-family: var(--font-pixel);
    font-size: 0.45rem;
    color: var(--accent);
    letter-spacing: 2px;
}

.cabinet-brand {
    font-family: var(--font-pixel);
    font-size: 0.45rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

/* Insert Coin Message */
.arcade-insert-coin {
    margin-top: 15px;
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: var(--accent-yellow);
    text-align: center;
}

/* Footer */
.arcade-footer {
    margin-top: 0;
    padding: 10px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    html, body {
        height: 100%;
        overflow: hidden;
    }

    .arcade-cabinet {
        padding: 5px;
        min-height: 0;
    }

    .arcade-screen-wrapper.flappybird,
    .arcade-screen-wrapper.galaga {
        max-width: 100%;
        aspect-ratio: auto;
        height: calc(100vh - 240px);
        height: calc(100dvh - 240px);
        max-height: calc(100dvh - 240px);
    }

    .cabinet-top,
    .cabinet-bottom {
        padding: 6px 16px;
    }

    .cabinet-panel {
        gap: 20px;
    }

    .arcade-insert-coin {
        font-size: 0.4rem;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .arcade-screen-wrapper.flappybird,
    .arcade-screen-wrapper.galaga {
        height: calc(100vh - 210px);
        height: calc(100dvh - 210px);
        max-height: calc(100dvh - 210px);
    }

    .cabinet-light {
        width: 8px;
        height: 8px;
    }

    .cabinet-panel {
        gap: 15px;
    }

    .cabinet-label,
    .cabinet-brand {
        font-size: 0.35rem;
    }
}
