* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    overflow: hidden;
    height: 100vh;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s ease-in-out;
    z-index: 1;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* Tela de Carregamento */
#loading-screen {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.loading-container {
    text-align: center;
    color: white;
}

.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: #00d4ff;
    animation-duration: 1.2s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: #ffffff;
    animation-duration: 0.8s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Tela da Câmera */
#camera-screen {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.camera-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
}

.camera-viewfinder {
    position: relative;
    width: 300px;
    height: 300px;
}

.camera-frame {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    animation: subtlePulse 3s infinite;
}

@keyframes subtlePulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(255, 255, 255, 0.1),
            inset 0 0 20px rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(255, 255, 255, 0.2),
            inset 0 0 30px rgba(255, 255, 255, 0.1);
    }
}

.camera-lens {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: subtleFocus 4s infinite;
}

@keyframes subtleFocus {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.8;
    }
}


.camera-text {
    margin-top: 30px;
    color: white;
}

.camera-text h2 {
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: textBlink 2s infinite;
    opacity: 0.8;
}

@keyframes textBlink {
    0%, 50% {
        opacity: 0.8;
    }
    51%, 100% {
        opacity: 0.4;
    }
}

/* Tela de Aguarde */
#waiting-screen {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.waiting-container {
    text-align: center;
    color: white;
}

.waiting-spinner {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
}

.pulse-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(0, 212, 255, 0.5);
    border-radius: 50%;
    animation: pulse-circle 2s infinite;
}

.pulse-circle:nth-child(2) {
    animation-delay: 0.5s;
}

.pulse-circle:nth-child(3) {
    animation-delay: 1s;
}

@keyframes pulse-circle {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.waiting-container h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Tela da Foto */
#photo-screen {
    background: #000;
}

.photo-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#main-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    box-shadow: none;
    animation: photoAppear 1s ease-out;
}

@keyframes photoAppear {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}


/* Responsividade */
@media (max-width: 768px) {
    .message-box {
        padding: 40px 20px;
        margin: 20px;
    }
    
    .message-box h1 {
        font-size: 2rem;
    }
    
    .message-box p {
        font-size: 1.2rem;
    }
    
    .loading-text h2 {
        font-size: 2rem;
    }
    
    .waiting-container h2 {
        font-size: 2rem;
    }
}
