/* 
 * Main stylesheet - now font-independent!
 * Fonts are loaded via bundled @fontsource packages in src/styles/fonts.css
 * This ensures the stylesheet loads even if external font CDNs are blocked
 */

body {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.87);
    background-color: #000000;
    /* Use CSS variable for font family, defined in fonts.css with bundled fonts */
    font-family: var(--font-family-primary, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    /* Support for notch/safe areas on mobile */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#app {
    width: 100%;
    height: 100vh;
    /* Support for mobile viewport units that account for browser UI */
    height: 100dvh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Remove centering since we want canvas to fill entire space */
    position: relative;
}

#game-container canvas {
    /* With RESIZE mode, let canvas fill the entire container */
    width: 100% !important;
    height: 100% !important;
    display: block;
    
    /* CRITICAL: Counteract browser zoom using CSS transform */
    /* This will be dynamically updated via JavaScript */
    transform-origin: top left;
}

/* Landscape orientation warning for mobile */
#orientation-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    color: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    text-align: center;
    padding: 20px;
}

#orientation-warning .rotate-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: rotate 2s infinite ease-in-out;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}

@media (max-width: 1024px) and (orientation: portrait) {
    #orientation-warning {
        display: flex;
    }
    #app {
        display: none;
    }
}
