/* Reset e estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Header */
header {
    background: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 2rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Busca */
.search-container {
    display: flex;
    border-radius: 25px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem;
}

#search-input {
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 25px 0 0 25px;
    width: 250px;
    font-size: 1rem;
    outline: none;
}

#search-button {
    background: white;
    border: none;
    color: #6a11cb;
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    border-radius: 0 25px 25px 0;
    transition: background 0.3s;
}

#search-button:hover {
    background: #f0f0f0;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.intro {
    text-align: center;
    margin-bottom: 2.5rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.intro h2 {
    color: #6a11cb;
    margin-bottom: 1rem;
}

.tarot-categories h2 {
    margin: 2rem 0 1rem;
    color: #2575fc;
    text-align: center;
    font-size: 1.8rem;
}

/* Grid de cartas */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

.card-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.card-name {
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
    color: #333;
}

.card-about {
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
    text-align: justify;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 25px;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    animation: modalFade 0.4s;
}

@keyframes modalFade {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-button:hover {
    color: #333;
}

/* Detalhes da carta */
#card-details {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    width: 100%;
}

.card-detail-image {
    width: 150px;
    height: auto;
    border-radius: 8px;
    margin-right: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.card-detail-title {
    flex: 1;
}

.card-detail-title h2 {
    color: #6a11cb;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.card-detail-title p {
    color: #666;
    font-style: italic;
}

.card-detail-content {
    width: 100%;
}

.interpretation {
    margin-bottom: 2rem;
}

.interpretation h3 {
    color: #2575fc;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.interpretation p {
    line-height: 1.8;
}

/* Abas de áreas */
.area-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.area-tab {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    background: transparent;
    border: none;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.area-tab.active {
    background: #2575fc;
    color: white;
}

.area-tab:hover:not(.active) {
    background: #e0e0e0;
}

.area-content {
    display: none;
}

.area-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    #search-input {
        width: 100%;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .card-detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .card-detail-image {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    
    .area-tabs {
        flex-wrap: wrap;
    }
}