/* Styles extracted from index.html — main stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Fundo em tela cheia consistente entre navegadores. */
:fullscreen, :-webkit-full-screen, :-moz-full-screen, :-ms-fullscreen {
    background: #05040f !important;
}

.scene {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.scene::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(26, 10, 46, 0.7) 0%, rgba(10, 5, 32, 0.85) 50%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 1;
}

.neon-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: neonFloat 8s ease-in-out infinite;
    z-index: 2;
}

.light-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.6) 0%, transparent 70%);
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.light-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.5) 0%, transparent 70%);
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
}

@keyframes neonFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

.laptop-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: smoothAppear 1.8s ease-out 1s forwards;
    z-index: 3;
    perspective: 2000px;
}

@keyframes smoothAppear {
    0% {
        opacity: 0;
        transform: scale(1.2) rotateX(20deg) rotateY(-10deg) translateZ(80px);
    }
    60% {
        opacity: 0.9;
        transform: scale(1.02) rotateX(10deg) rotateY(-4deg) translateZ(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateX(8deg) rotateY(-2deg) translateZ(0);
    }
}

.laptop {
    position: relative;
    width: 1000px;
    max-width: 90vw;
    transform-style: preserve-3d;
}

.laptop-screen {
    width: 100%;
    height: 600px;
    background: linear-gradient(135deg, rgba(15, 15, 20, 0.98) 0%, rgba(8, 8, 12, 1) 100%);
    border-radius: 8px 8px 0 0;
    border: 12px solid #1a1a1a;
    border-bottom: 0;
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.9),
        0 0 100px rgba(138, 43, 226, 0.2);
    overflow: hidden;
    position: relative;
    transform-origin: center center;
    transform-style: preserve-3d;
}

.laptop-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
}

.screen-glare {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.03) 0%,
        transparent 30%,
        transparent 70%,
        rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
    z-index: 10;
}

.laptop-base {
    width: 100%;
    height: 25px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%);
    border-radius: 0 0 8px 8px;
    position: relative;
    box-shadow: 
        0 1px 0 rgba(255, 255, 255, 0.1),
        0 25px 50px rgba(0, 0, 0, 0.9),
        inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.laptop-base::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 8px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.laptop-keyboard {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    opacity: 0.3;
}

.screen-content {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    animation: fadeInContent 2.2s cubic-bezier(0.22, 0.61, 0.36, 1) 3.2s forwards;
    position: relative;
    z-index: 5;
}

@keyframes fadeInContent {
    0% { opacity: 0; }
    70% { opacity: 0.9; }
    100% { opacity: 1; }
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(139, 92, 246, 0.7);
    border-radius: 50%;
    animation: float 15s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* === Estilos — Expansão em tela cheia === */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #05040f;
    z-index: 9400;
    pointer-events: none;
    overflow: hidden;
    filter: blur(25px);
    transform: scale(1.5);
    opacity: 0;
    transition: clip-path 3s cubic-bezier(0.55, 0.06, 0.32, 1), opacity 2s ease, filter 2.2s ease, transform 2.2s cubic-bezier(0.55, 0.06, 0.32, 1);
    -webkit-transition: -webkit-clip-path 3s cubic-bezier(0.55, 0.06, 0.32, 1), opacity 2s ease, filter 2.2s ease, transform 2.2s cubic-bezier(0.55, 0.06, 0.32, 1);
    -webkit-clip-path: inset(0 round 24px);
    clip-path: inset(0 round 24px);
}

.fullscreen-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160vw;
    height: 160vh;
    background: radial-gradient(circle, rgba(141, 92, 246, 0.071) 0%, rgba(37, 12, 58, 0.063) 45%, rgba(5,4,15,0) 70%);
    filter: blur(200px);
    opacity: 0;
    transition: opacity 4s ease;
}

.fullscreen-fog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 20%, rgba(255,255,255,0.15), rgba(255,255,255,0));
    filter: blur(120px);
    opacity: 0;
    transition: opacity 1.4s ease;
}

/* Placeholder para evitar flash branco durante animação em tela cheia. */
.iframe-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(200deg, rgba(39, 17, 82, 0.206) 10%, rgba(7, 6, 12, 0.203) 100%);
    box-shadow: 0 32px 32px rgba(0, 0, 0, 0.366);
    pointer-events: none;
    opacity: 0;
    transition: opacity 280ms ease;
}

/* Transição suave do iframe; usar will-change para otimização. */
.screen-content iframe {
    transform-origin: center center;
    transition: transform 1.8s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 220ms ease;
    will-change: transform, opacity;
}

/* Backdrop com blur para expansão em tela cheia. */
.fullscreen-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: auto; /* Permite clicar no backdrop para sair do modo tela cheia */
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    background: rgba(5,4,15,0.22); /* Fundo levemente escurecido para evidenciar o blur */
    z-index: 9005; /* Abaixo do overlay (9400) e acima da .scene */
    opacity: 0;
    transform: scale(1);
    transform-origin: center center;
    transition: opacity 420ms ease, transform 1.8s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

/* Botão de fechar removido; saída via ESC ou clique no backdrop. */

/* Garante que menus e overlays fiquem acima do backdrop/overlay. */
#fullscreenMenu, .fullscreen-menu, .menu, .topbar, .header, nav {
    z-index: 9600; /* acima do overlay (9400) */
    position: relative;
}

/* Fallback: navegadores sem suporte a backdrop-filter
   Aplicar blur explícito em .scene adicionando a classe 'blurry' no body. */
@supports not (backdrop-filter: blur(1px)) {
    body.blurry .scene {
        filter: blur(20px);
        transition: filter 420ms ease;
    }
    /* Sem escala no fallback: aplicar somente blur para evitar zoom do conteúdo. */
}

@media (max-width: 900px) {
    /* Reduz blurs e dimensões radiais para melhorar performance em mobile. */
    .fullscreen-backdrop { backdrop-filter: blur(10px) saturate(110%); -webkit-backdrop-filter: blur(10px) saturate(110%); }
    .fullscreen-glow { width: 100vw; height: 100vh; filter: blur(80px); }
    .fullscreen-fog { filter: blur(60px); }
    .neon-light { filter: blur(48px); }
    .fullscreen-overlay { filter: blur(6px); }
    .laptop { width: 95vw; }
    .laptop-screen { height: 360px; }
}

/* Respeita prefers-reduced-motion. */
@media (prefers-reduced-motion: reduce) {
    .fullscreen-backdrop, .fullscreen-overlay, .laptop, .laptop-screen, .screen-content iframe, .scene {
        transition: none !important;
        animation-duration: 0.001ms !important;
    }
}

body.show-full {
    overflow: auto;
    min-height: 100vh;
    touch-action: none;
}

@media (max-width: 1024px) {
    .laptop { width: 800px; }
    .laptop-screen { height: 500px; }
}

@media (max-width: 768px) {
    .laptop { width: 95vw; }
    .laptop-screen { height: 400px; }
}
