/**
 * No Rotation Overlay System
 * Shows rotation prompt when mobile devices are in landscape mode
 * Theme-aware with dark/light mode support
 */

/* Rotation Overlay Container */
#rotation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

/* Show overlay when active */
#rotation-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

/* Dark Theme Styling (default) */
#rotation-overlay {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Light Theme Styling */
html.theme-light #rotation-overlay {
    background-color: rgba(255, 255, 255, 0.95);
}

/* Rotation Icon Container */
.rotation-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 80vw;
    max-height: 80vh;
    animation: rotationPulse 2s ease-in-out infinite;
}

/* Rotation Image */
.rotation-icon img {
    width: auto;
    height: auto;
    max-width: 120px;
    max-height: 120px;
    margin-bottom: 20px;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Dark theme - standard image */
.rotation-icon img {
    filter: none;
    opacity: 0.9;
}

/* Light theme - invert image colors for black overlay effect */
html.theme-light .rotation-icon img {
    filter: invert(1) brightness(0.8);
    opacity: 0.85;
}

/* Rotation Text */
.rotation-text {
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

/* Dark theme text */
.rotation-text {
    color: #00FF00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

/* Light theme text */
html.theme-light .rotation-text {
    color: #333333;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

/* Rotation Subtext */
.rotation-subtext {
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: 0.85em;
    font-weight: 400;
    line-height: 1.3;
    opacity: 0.8;
}

/* Dark theme subtext */
.rotation-subtext {
    color: #00CC00;
}

/* Light theme subtext */
html.theme-light .rotation-subtext {
    color: #666666;
}

/* Pulsing animation */
@keyframes rotationPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Responsive sizing for different screen sizes */
@media (max-width: 480px) {
    .rotation-icon img {
        max-width: 100px;
        max-height: 100px;
        margin-bottom: 15px;
    }
    
    .rotation-text {
        font-size: 1em;
    }
    
    .rotation-subtext {
        font-size: 0.8em;
    }
}

@media (max-width: 360px) {
    .rotation-icon img {
        max-width: 80px;
        max-height: 80px;
        margin-bottom: 12px;
    }
    
    .rotation-text {
        font-size: 0.9em;
    }
    
    .rotation-subtext {
        font-size: 0.75em;
    }
}

/* Landscape-specific adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .rotation-icon {
        max-height: 90vh;
        flex-direction: row;
        gap: 20px;
    }
    
    .rotation-icon img {
        margin-bottom: 0;
        max-width: 80px;
        max-height: 80px;
    }
    
    .rotation-text-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .rotation-text {
        font-size: 0.95em;
        margin-bottom: 8px;
    }
    
    .rotation-subtext {
        font-size: 0.75em;
    }
}

/* Ultra-wide landscape phones */
@media (orientation: landscape) and (max-height: 400px) {
    .rotation-icon {
        gap: 15px;
    }
    
    .rotation-icon img {
        max-width: 60px;
        max-height: 60px;
    }
    
    .rotation-text {
        font-size: 0.85em;
    }
    
    .rotation-subtext {
        font-size: 0.7em;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .rotation-icon img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #rotation-overlay {
        transition: none;
    }
    
    .rotation-icon {
        animation: none;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    #rotation-overlay {
        background-color: rgba(0, 0, 0, 1);
    }
    
    html.theme-light #rotation-overlay {
        background-color: rgba(255, 255, 255, 1);
    }
    
    .rotation-text {
        text-shadow: none;
        font-weight: 700;
    }
    
    html.theme-light .rotation-text {
        text-shadow: none;
        font-weight: 700;
    }
} 