/* ============================================
   Game Embed Container - Godot Web Export
   ============================================ */

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    width: 100%;
    height: 100%;
}

#game-container {
    width: 100vw;
    height: 100vh;
    width: 100dvw;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
}

#canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
}

#canvas:focus {
    outline: none;
}

/* Loading screen */
#loading-screen {
    position: absolute;
    inset: 0;
    background: #0f0f1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.5s;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#loading-logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    color: #FFD911;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
    margin-bottom: 0.3rem;
}

#loading-logo span {
    color: #F2F2FF;
}

#loading-studio {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
    color: #8888AA;
    letter-spacing: 0.2em;
    margin-bottom: 3rem;
}

#loading-game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    color: #F2F2FF;
    margin-bottom: 2rem;
}

#loading-bar-container {
    width: 300px;
    max-width: 80%;
    height: 16px;
    background: #1a1a2e;
    border: 2px solid #B89A00;
    position: relative;
    overflow: hidden;
}

#loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FFD911, #FFF280);
    transition: width 0.2s;
}

#loading-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.55rem;
    color: #8888AA;
    margin-top: 1rem;
}

#loading-error {
    display: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.55rem;
    color: #FF4444;
    margin-top: 1.5rem;
    max-width: 400px;
    text-align: center;
    line-height: 1.6;
}

/* Toolbar */
#game-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(15, 15, 26, 0.7);
    z-index: 5;
    opacity: 0.8;
    transition: opacity 0.3s;
}

#game-container:hover #game-toolbar,
#game-toolbar:active {
    opacity: 1;
}

@media (pointer: coarse) {
    #game-toolbar {
        opacity: 0.7;
        padding: 0.4rem 0.75rem;
    }
    .toolbar-btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

.toolbar-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
    color: #8888AA;
    background: none;
    border: 1px solid #8888AA;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.toolbar-btn:hover {
    color: #FFD911;
    border-color: #FFD911;
}

/* Mobile landscape warning */
#orientation-warning {
    display: none;
    position: absolute;
    inset: 0;
    background: #0f0f1a;
    z-index: 20;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

#orientation-warning p {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    color: #FFD911;
    line-height: 1.8;
}

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