/* 
 * Fake Screens Pro - Public Styles
 * Version: 1.0.0
 */

/* Base styles for fake screens */
.fake-screen-wrapper {
    position: relative;
    display: block;
    width: 100%;
    min-height: 400px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.fake-screen {
    width: 100%;
    height: 100%;
    min-height: inherit;
    position: relative;
    overflow: hidden;
}

/* Fullscreen styles */
.fake-screen-wrapper.fake-screen-fullscreen-enabled {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.fake-screen-wrapper.fake-screen-fullscreen-enabled:hover {
    transform: scale(1.02);
}

.fake-screen-fullscreen-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.fake-screen-wrapper:hover .fake-screen-fullscreen-btn {
    opacity: 1;
}

.fake-screen-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 1);
    transform: scale(1.1);
}

.fake-screen-wrapper.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: #000;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Error styles */
.fake-screen-error {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #f39c12;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Color screen styles */
.fake-screen.black-screen {
    background: #000;
}

.fake-screen.blue-screen {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
}

.fake-screen.white-screen {
    background: #fff;
}

.fake-screen.green-screen {
    background: linear-gradient(135deg, #00d084 0%, #00a86b 100%);
}

.fake-screen.red-screen {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.fake-screen.yellow-screen {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
}

.fake-screen.orange-screen {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.fake-screen.pink-screen {
    background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%);
}

.fake-screen.purple-screen {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

/* Blue Screen of Death styles */
.fake-screen.bsod-windows {
    background: #0078d4;
    color: white;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 40px;
}

.bsod-content {
    max-width: 800px;
    width: 100%;
}

.bsod-face {
    font-size: 150px;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.9;
}

.bsod-message h1 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 40px;
    line-height: 1.4;
}

.bsod-progress {
    margin-bottom: 60px;
}

.progress-text {
    font-size: 18px;
    opacity: 0.9;
}

.bsod-qr {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.qr-code {
    width: 120px;
    height: 120px;
    background: white;
    flex-shrink: 0;
    border-radius: 4px;
}

.qr-text p {
    margin: 8px 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Windows Update styles */
.fake-screen.windows-update {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
    color: white;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.update-content h1 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 20px;
}

.update-content p {
    font-size: 16px;
    margin: 10px 0;
    opacity: 0.9;
}

.progress-ring {
    margin: 40px auto;
    animation: spin 2s linear infinite;
}

.progress-circle {
    animation: progressUpdate 10s linear infinite;
}

/* Loading spinner styles */
.fake-screen.loading-spinner {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.spinner-container {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.spinner-container p {
    font-size: 18px;
    color: #333;
    margin: 0;
}

/* Matrix screen styles */
.fake-screen.matrix-screensaver {
    background: #000;
    overflow: hidden;
    position: relative;
}

.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.matrix-column {
    position: absolute;
    top: -100%;
    color: #0f0;
    font-family: "Courier New", monospace;
    font-size: 14px;
    line-height: 1;
    animation: matrixFall linear infinite;
}

/* DVD Screensaver styles */
.fake-screen.dvd-screensaver {
    background: #000;
    position: relative;
    overflow: hidden;
}

.dvd-logo {
    position: absolute;
    width: 120px;
    height: 60px;
    background: linear-gradient(45deg, #ff0080, #8000ff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    border-radius: 8px;
    animation: dvdBounce 10s linear infinite;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes progressUpdate {
    0% { stroke-dashoffset: 339.292; }
    100% { stroke-dashoffset: 0; }
}

@keyframes matrixFall {
    0% { top: -100%; opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@keyframes dvdBounce {
    0% { left: 0; top: 0; }
    25% { left: calc(100% - 120px); top: 0; }
    50% { left: calc(100% - 120px); top: calc(100% - 60px); }
    75% { left: 0; top: calc(100% - 60px); }
    100% { left: 0; top: 0; }
}

/* No scroll when fullscreen is active */
body.fake-screen-no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Responsive design */
@media (max-width: 768px) {
    .fake-screen-wrapper {
        min-height: 300px;
        border-radius: 4px;
    }
    
    .bsod-content {
        padding: 20px;
    }
    
    .bsod-face {
        font-size: 100px;
        margin-bottom: 20px;
    }
    
    .bsod-message h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .bsod-qr {
        flex-direction: column;
        gap: 20px;
    }
    
    .qr-code {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
    
    .update-content h1 {
        font-size: 24px;
    }
    
    .progress-ring {
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .fake-screen-wrapper {
        min-height: 250px;
    }
    
    .fake-screen-fullscreen-btn {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
        font-size: 14px;
    }
    
    .bsod-face {
        font-size: 80px;
    }
    
    .bsod-message h1 {
        font-size: 18px;
    }
    
    .update-content h1 {
        font-size: 20px;
    }
}

/* Shortcode iframe styles */
.fake-screen-iframe-wrapper {
    position: relative !important;
    display: inline-block !important;
    margin: 20px auto !important;
    text-align: center !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.fake-screen-iframe {
    border: 2px solid #ddd !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    background: #fff !important;
    transition: all 0.3s ease !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    position: relative !important;
}

.fake-screen-iframe:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Responsive iframe */
@media (max-width: 768px) {
    .fake-screen-iframe {
        width: 100% !important;
        height: 400px !important;
    }
}

@media (max-width: 480px) {
    .fake-screen-iframe {
        width: 100% !important;
        height: 300px !important;
        border-radius: 8px;
    }
}

/* Error message styles for shortcode */
.fake-screen-iframe-wrapper .fake-screen-error {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #f39c12;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
    max-width: 400px;
}

/* Fullscreen Controls for Iframe Wrapper - FIXED VERSION */
.fake-screen-iframe-wrapper .fake-screen-controls {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    z-index: 1000 !important;
    display: flex !important;
    gap: 5px !important;
    opacity: 0.9 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: auto !important;
}

.fake-screen-iframe-wrapper:hover .fake-screen-controls {
    opacity: 1 !important;
}

.fake-screen-iframe-wrapper .fake-screen-fullscreen-btn {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    padding: 8px 10px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: normal !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1001 !important;
    min-width: 32px !important;
    height: 32px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    text-align: center !important;
    line-height: 1 !important;
    transition: all 0.2s ease !important;
}

.fake-screen-iframe-wrapper .fake-screen-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.fake-screen-iframe-wrapper .fake-screen-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    transform: scale(1.05) !important;
}

.fake-screen-iframe-wrapper .fake-screen-fullscreen-btn:active {
    transform: scale(0.95) !important;
}

.fake-screen-iframe-wrapper .fullscreen-icon {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
}

/* Fullscreen Mode Styles */
.fake-screen-iframe-wrapper.fake-screen-fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    transform: none !important;
    background: #000;
}

.fake-screen-iframe-wrapper.fake-screen-fullscreen-active .fake-screen-iframe {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Hide controls in fullscreen mode for authenticity */
.fake-screen-iframe-wrapper.fake-screen-fullscreen-active .fake-screen-controls {
    display: none !important;
}

/* Body modifications when in fullscreen */
body.fake-screen-body-fullscreen {
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

/* Force normal state when NOT in fullscreen */
body:not(.fake-screen-body-fullscreen) {
    overflow: visible !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
    margin: auto !important;
    padding: auto !important;
}

/* Mobile-specific improvements for fullscreen */
@media screen and (max-width: 768px) {
    /* Enhanced mobile fullscreen styles */
    .fake-screen-iframe-wrapper.fake-screen-fullscreen-active {
        /* Ensure it covers everything, including mobile browsers' UI */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        /* Use mobile viewport units for better coverage */
        width: 100dvw !important;
        height: 100dvh !important;
        z-index: 2147483647 !important; /* Maximum z-index */
        background: #000;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }
    
    .fake-screen-iframe-wrapper.fake-screen-fullscreen-active .fake-screen-iframe {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transform: none !important;
        display: block !important;
    }
    
    /* Mobile body adjustments */
    body.fake-screen-body-fullscreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        /* Prevent scrolling and zooming */
        touch-action: none !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        -webkit-touch-callout: none !important;
        /* Hide mobile browser UI */
        -webkit-appearance: none !important;
    }
    
    /* Hide everything else when in fullscreen */
    body.fake-screen-body-fullscreen > *:not(.fake-screen-iframe-wrapper.fake-screen-fullscreen-active) {
        display: none !important;
    }
    
    /* Mobile fullscreen button adjustments */
    .fake-screen-iframe-wrapper .fake-screen-fullscreen-btn {
        /* Make button larger for better touch interaction */
        width: 48px !important;
        height: 48px !important;
        font-size: 18px !important;
        top: 10px !important;
        right: 10px !important;
        /* Better visibility on mobile */
        background: rgba(0, 0, 0, 0.8) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        /* Ensure it's always tappable */
        pointer-events: auto !important;
        touch-action: manipulation !important;
        /* Show by default on mobile for better accessibility */
        opacity: 0.7 !important;
    }
    
    .fake-screen-iframe-wrapper:hover .fake-screen-fullscreen-btn,
    .fake-screen-iframe-wrapper .fake-screen-fullscreen-btn:focus {
        opacity: 1 !important;
        background: rgba(0, 0, 0, 0.9) !important;
    }
}

/* CSS-based fullscreen fallback styles */
.fake-screen-iframe-wrapper.fake-screen-css-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483647 !important;
    background: #000 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

.fake-screen-iframe-wrapper.fake-screen-css-fullscreen .fake-screen-iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Landscape orientation optimization for mobile */
@media screen and (orientation: landscape) and (max-width: 896px) {
    .fake-screen-iframe-wrapper.fake-screen-fullscreen-active,
    .fake-screen-iframe-wrapper.fake-screen-css-fullscreen {
        /* Account for notches and browser UI in landscape */
        width: 100vw !important;
        height: 100vh !important;
        /* Use safe area insets if available */
        width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right)) !important;
        height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        left: env(safe-area-inset-left) !important;
        top: env(safe-area-inset-top) !important;
    }
}

/* iOS-specific adjustments */
@supports (-webkit-appearance: none) {
    @media screen and (max-width: 768px) {
        .fake-screen-iframe-wrapper.fake-screen-fullscreen-active,
        .fake-screen-iframe-wrapper.fake-screen-css-fullscreen {
            /* iOS viewport height fix */
            height: 100vh !important;
            height: -webkit-fill-available !important;
        }
        
        body.fake-screen-body-fullscreen {
            height: 100vh !important;
            height: -webkit-fill-available !important;
            /* Prevent iOS bounce scrolling */
            position: fixed !important;
            overflow: hidden !important;
            -webkit-overflow-scrolling: none !important;
        }
    }
}

/* Android-specific adjustments */
@media screen and (max-width: 768px) {
    .fake-screen-iframe-wrapper.fake-screen-fullscreen-active,
    .fake-screen-iframe-wrapper.fake-screen-css-fullscreen {
        /* Android viewport adjustments */
        min-height: 100vh !important;
        min-height: 100dvh !important;
    }
}

/* Print styles */
@media print {
    .fake-screen-wrapper {
        border: 1px solid #000;
        background: #fff !important;
    }
    
    .fake-screen-fullscreen-btn {
        display: none;
    }
    
    .fake-screen {
        color: #000 !important;
    }
    
    .fake-screen-iframe-wrapper {
        display: none !important;
    }
} 