/* Orientation Lock Overlay */
.orientation-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a1a;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    text-align: center;
    padding: 20px;
}

.orientation-overlay .orientation-icon {
    width: 80px;
    height: 80px;
    color: #ffd700;
    animation: orientation-rotate 2s ease-in-out infinite;
}

.orientation-overlay .orientation-msg {
    font-family: 'Jua', sans-serif;
    font-size: 1.3rem;
    color: #00d4ff;
    line-height: 1.5;
}

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

/* Show "rotate to portrait" overlay on mobile landscape — for default (portrait) games */
@media (orientation: landscape) and (max-height: 500px) {
    .orientation-overlay:not(.orientation-overlay--landscape) {
        display: flex;
    }
}

/* Show "rotate to landscape" overlay on mobile portrait — for landscape-hint games */
@media (orientation: portrait) and (max-width: 600px) {
    .orientation-overlay--landscape {
        display: flex;
    }
}

/* Back button on the landscape-hint overlay (portrait CSS overlay) */
.orientation-back-btn {
    background: rgba(10, 10, 26, 0.7);
    color: #94a3b8;
    font-family: 'Jua', sans-serif;
    font-size: 0.875rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(100, 100, 150, 0.4);
    border-radius: 1.875rem;
    cursor: pointer;
    white-space: nowrap;
    touch-action: manipulation;
    backdrop-filter: blur(4px);
    margin-top: 0.5rem;
}

/* Landscape prompt container — shown programmatically when entering fullscreen in portrait */
.landscape-prompt {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
}

.landscape-prompt-btn {
    background: linear-gradient(135deg, #ff6b9d, #a855f7);
    color: #fff;
    font-family: 'Jua', sans-serif;
    font-size: 1rem;
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 1.875rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.5);
    white-space: nowrap;
    touch-action: manipulation;
}

.landscape-prompt-back {
    background: rgba(10, 10, 26, 0.7);
    color: #94a3b8;
    font-family: 'Jua', sans-serif;
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(100, 100, 150, 0.4);
    border-radius: 1.875rem;
    cursor: pointer;
    white-space: nowrap;
    touch-action: manipulation;
    backdrop-filter: blur(4px);
}
