/*
  Froogs global page styles.
  Goal: a full-bleed canvas that Safari cannot scroll, pinch-zoom, or steal
  taps from. Phaser's Scale Manager (FIT + CENTER_BOTH) handles the canvas
  sizing inside #game-container; this file just locks down the page around it.
*/

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0f0f0f;
    color: rgba(255, 255, 255, 0.87);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    /* Pin the page so iOS Safari rubber-band scroll cannot move it. */
    position: fixed;
    inset: 0;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

#app {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Stop Safari from treating taps/drags on the canvas as scroll or pinch. */
#game-container canvas {
    touch-action: none;
    display: block;
}

/* ---- Rotate-to-landscape overlay ---- */

#rotate-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10;
    background-color: #0f0f0f;
    /* Center the prompt and keep it clear of the notch / home indicator. */
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
             env(safe-area-inset-bottom) env(safe-area-inset-left);
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Aspect-ratio based portrait detection (no JS orientation lock needed). */
@media (orientation: portrait) {
    #rotate-overlay {
        display: flex;
    }
}

.rotate-card {
    max-width: 70vw;
}

.rotate-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
    animation: rotate-hint 2s ease-in-out infinite;
}

.rotate-card p {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

@keyframes rotate-hint {
    0%, 100% { transform: rotate(-25deg); }
    50%      { transform: rotate(65deg); }
}
