/* Reset e estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #1ed760;
    --secondary-color: #1a3c40;
    --background-color: #0a0e17;
    --card-bg: #1a3c40;
    --text-color: #e0e0e0;
    --accent-color: #2a5c60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Cabeçalho */
header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--background-color) 100%);
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.header-content h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(30, 215, 96, 0.5);
}

.header-content h1 i {
    margin-right: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
}

/* Área principal */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
}

/* Controles */
.controls {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-box {
    position: relative;
    max-width: 400px;
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border-radius: 25px;
    border: 2px solid var(--accent-color);
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

label i {
    margin-right: 0.3rem;
}

select, input, button {
    padding: 0.7rem 1rem;
    border-radius: 5px;
    border: none;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover, input:hover, button:hover {
    background-color: var(--accent-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-color);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #17b850;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--text-color);
}

/* Estatísticas */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(145deg, var(--card-bg), var(--accent-color));
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card span {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Grid de cards */
.characters-section h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.characters-section h2 i {
    margin-right: 0.5rem;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Cards */
.character-card {
    background: linear-gradient(145deg, var(--card-bg), var(--background-color));
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    border: 1px solid var(--accent-color);
    cursor: pointer;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.5);
}

.character-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary-color);
}

.character-info {
    padding: 1.2rem;
}

.character-name {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.character-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-alive {
    background-color: var(--primary-color);
}

.status-dead {
    background-color: var(--danger-color);
}

.status-unknown {
    background-color: var(--warning-color);
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    display: none;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination-btn {
    padding: 0.7rem 1.2rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* === SEÇÕES PARALLAX MELHORADAS === */
.parallax-section {
    width: 100vw;
    min-height: 100vh;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* MAIS CLARO - de 0.85 para 0.5 */
    background: rgba(10, 14, 23, 0.5);
    z-index: 1;
}

.parallax-section > * {
    position: relative;
    z-index: 2;
}

/* Hero Section  */
#hero {
    background-image: url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    color: white;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #1ed760;
    font-weight: bold;
    /* SOMBRAS  */
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9), 
                 0 0 25px rgba(30, 215, 96, 0.8);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: #ffffff; 
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.cta-button {
    padding: 1.2rem 2.5rem;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #1ed760, #17b850);
    color: #0a0e17;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(30, 215, 96, 0.4);
    border: 2px solid transparent;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(30, 215, 96, 0.6);
    background: linear-gradient(135deg, #17b850, #1ed760);
    border-color: #ffffff;
}

.cta-button i {
    margin-right: 0.5rem;
}

/* Multiverse Section */
#multiverse {
    background-image: url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    color: white;
    padding: 4rem 2rem;
}

.multiverse-content {
    max-width: 1000px;
}

.multiverse-content h2 {
    color: #1ed760;
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 15px rgba(30, 215, 96, 0.5);
}

.multiverse-content h2 i {
    margin-right: 1rem;
}

.multiverse-content p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.multiverse-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.multiverse-stat {
    background: rgba(26, 60, 64, 0.7);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid #2a5c60;
    transition: transform 0.3s ease;
}

.multiverse-stat:hover {
    transform: translateY(-10px);
    border-color: #1ed760;
}

.multiverse-stat i {
    font-size: 3rem;
    color: #1ed760;
    margin-bottom: 1rem;
}

.multiverse-stat span {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #1ed760;
    margin-bottom: 0.5rem;
}

.multiverse-stat p {
    font-size: 1.1rem;
    color: #a0a0a0;
    margin: 0;
}

/* Rolagem suave */
html {
    scroll-behavior: smooth;
}

.characters-section {
    scroll-margin-top: 20px;
}

/* Ajuste do header original */
header {
    background: linear-gradient(135deg, #1a3c40 0%, #0a0e17 100%);
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 3px solid #1ed760;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .multiverse-content h2 {
        font-size: 2rem;
    }
    
    .multiverse-content p {
        font-size: 1.1rem;
    }
    
    .multiverse-stats {
        grid-template-columns: 1fr;
    }
    
    .parallax-section {
        background-attachment: scroll; /* Desativa parallax em mobile */
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(145deg, var(--card-bg), var(--background-color));
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-color);
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover {
    color: var(--primary-color);
}

#modal-body {
    padding: 2rem;
}

.modal-character {
    text-align: center;
}

.modal-character img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    margin-bottom: 1rem;
}

.modal-character h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-details {
    text-align: left;
    margin-top: 1.5rem;
}

.modal-details .detail-item {
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

/* Rodapé */
footer {
    background-color: var(--background-color);
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--accent-color);
    margin-top: 3rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.api-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.api-info a:hover {
    text-decoration: underline;
}

/* Responsividade */
@media (max-width: 768px) {
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .characters-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

/* 
🎯 SISTEMA RESPONSIVO - ESTRATÉGIA MOBILE FIRST

📱 BREAKPOINTS ESTRATÉGICOS:
- Mobile:  < 480px  (base - single column)
- Tablet:  481px - 768px (2 columns + filter row)  
- Desktop: 769px - 1200px (adaptive grid + 4 col stats)
- Large:   > 1201px (expanded container)

⚡ ESTRATÉGIA DE DESENVOLVIMENTO:
- Mobile-first: Estilos base para mobile, enhance para telas maiores
- Progressive enhancement: Funcionalidades adicionais em telas maiores
- Performance: Otimizações específicas por viewport

🎨 COMPONENTES RESPONSIVOS:
- Grid de personagens: 1 → 2 → auto-fill columns
- Sistema de filtros: Vertical → Horizontal com wrap
- Estatísticas: Stack → 4 columns
- Navegação: Compact → Expanded

🌟 ACESSIBILIDADE:
- Reduced motion support
- Touch targets otimizados (min 44px)
- Focus states visíveis
- Contrastes WCAG compliant
*/