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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    min-height: 100vh;
    color: #333;
}

.hidden {
    display: none !important;
}

/* Tela Splash */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.splash-content {
    text-align: center;
    color: white;
    animation: fadeInUp 1s ease-out;
}

.leaf-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.app-name {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.slogan {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 300px;
    line-height: 1.4;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* App Principal */
.main-app {
    min-height: 100vh;
    background: #f5f5f5;
}

.app-header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Scanner Section */
.scanner-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.scanner-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.scanner-header h2 {
    color: #4CAF50;
    margin-bottom: 0.5rem;
}

.scanner-header p {
    color: #666;
    font-size: 0.9rem;
}

.camera-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto 1.5rem;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
}

.camera-feed, .capture-canvas {
    width: 100%;
    height: auto;
    display: block;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.scan-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 3px solid #4CAF50;
    border-radius: 15px;
    animation: pulse 2s infinite;
}

.camera-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botões */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Resultado */
.result-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.result-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-header h2 {
    color: #4CAF50;
}

.fruit-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.fruit-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.quality-score {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    justify-content: center;
}

.score-bar {
    width: 200px;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ffaa00, #4CAF50);
    border-radius: 10px;
    transition: width 1s ease;
}

.fruit-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.fruit-details h4 {
    color: #4CAF50;
    margin-bottom: 0.5rem;
}

.fruit-details ul {
    list-style: none;
    padding-left: 0;
}

.fruit-details li {
    padding: 0.25rem 0;
    color: #666;
}

.fruit-details li:before {
    content: "✓ ";
    color: #4CAF50;
    font-weight: bold;
}

/* Frutas Suportadas */
.supported-fruits {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.supported-fruits h3 {
    text-align: center;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.fruits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.fruit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.fruit-item:hover {
    background: #e8f5e8;
    transform: translateY(-2px);
}

.fruit-item .emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.fruit-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .scanner-section, .result-section, .supported-fruits {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .app-name {
        font-size: 2rem;
    }
    
    .slogan {
        font-size: 0.9rem;
    }
    
    .camera-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .quality-score {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .score-bar {
        width: 100%;
        max-width: 250px;
    }
    
    .fruits-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .fruit-item {
        padding: 0.75rem;
    }
    
    .fruit-item .emoji {
        font-size: 1.5rem;
    }
    
    .fruit-item span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .scan-frame {
        width: 150px;
        height: 150px;
    }
    
    .leaf-icon .emoji {
        font-size: 3rem;
    }
    
    .app-name {
        font-size: 1.8rem;
    }
    
    .fruits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Estilos para Emojis */
.emoji {
    font-style: normal;
    font-size: inherit;
    display: inline-block;
}

.leaf-icon .emoji {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

.header-icon.emoji {
    font-size: 1.5rem;
}

.fruit-icon .emoji {
    font-size: 4rem;
}

.fruit-item .emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.btn .emoji {
    font-size: 1rem;
}
