/* AI Image Editor - Landing Page Styles */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #212529;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h1 {
    color: #007bff;
    font-size: 1.5rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: #212529;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #007bff;
}

/* Hero Section */
#hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #212529;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #6c757d;
}

.btn-primary {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Sections */
section {
    padding: 4rem 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #212529;
}

section p {
    font-size: 1.1rem;
    color: #6c757d;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feature h3 {
    color: #007bff;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: #212529;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

footer p {
    color: #adb5bd;
}

/* Responsivo */
@media (max-width: 768px) {
    #hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    nav ul {
        display: none; /* Simplificar para mobile */
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}


/* Conteúdo Principal */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.step-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
}

.card h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.8rem;
}

/* Botões */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
}

/* Passo 1: Upload de Imagem */
.upload-area {
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #764ba2;
    background-color: #f0f2ff;
}

.upload-area.dragover {
    border-color: #28a745;
    background-color: #f0fff4;
}

.upload-placeholder p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.upload-hint {
    font-size: 0.9rem;
    color: #6c757d;
}

.upload-options {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

#cameraVideo {
    max-width: 100%;
    border-radius: 8px;
    background-color: #000;
}

.camera-controls {
    display: flex;
    gap: 15px;
}



/* Passo 2: Seleção de Estilo */
.style-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.style-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.style-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.style-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.style-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.style-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Subopções de Estilo */
.style-suboptions {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.style-suboptions h3 {
    margin-bottom: 20px;
    text-align: center;
}

.monument-grid, .fantasy-grid, .effect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.monument-option, .fantasy-option, .effect-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.monument-option, .fantasy-option {
    position: relative;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.01); /* Ensure clickability */
}

.monument-option:hover, .fantasy-option:hover, .effect-option:hover {
    border-color: #667eea;
    transform: translateY(-3px);
}

.monument-option.selected, .fantasy-option.selected, .effect-option.selected {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

.monument-option.selected::after, .fantasy-option.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, 0.3);
    border-radius: 6px;
    z-index: 1;
}

.monument-option span, .fantasy-option span {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 8px;
    border-radius: 6px;
}

/* Passo 3: Processamento */
.processing-container {
    text-align: center;
    padding: 40px 0;
}

.loading-image-container {
    position: relative;
    display: inline-block;
    margin: 0 auto 20px;
}

.loading-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

@keyframes rotateAndPulse {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    25% {
        transform: rotate(90deg) scale(1.05);
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.7);
    }
    75% {
        transform: rotate(270deg) scale(1.05);
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
    }
}

.processing-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.processing-status {
    color: #6c757d;
    font-style: italic;
}

/* Passo 4: Resultado */
.result-container {
    text-align: center;
}

.result-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.image-comparison {
    text-align: center;
}

.image-comparison h3 {
    margin-bottom: 15px;
    color: #333;
}

.image-comparison img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Controles de Passo */
.step-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .card {
        padding: 20px;
    }

    .style-options {
        grid-template-columns: 1fr;
    }

    .result-images {
        grid-template-columns: 1fr;
    }

    .upload-options, .camera-controls, .step-controls, .result-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .monument-grid, .fantasy-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .upload-area {
        padding: 20px;
        min-height: 200px;
    }
}

/* Step Progress Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: #6c757d;
    background-color: #e9ecef;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.step-circle.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.saldo-display {
    position: absolute;
    top: 10px;
    left: 10px;
    font-weight: bold;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}