/* ========================================
    Modelando a eatrutura dos cards
    =======================================*/
body {
    flex-direction: column;
    margin: 0;
}

/* ========================================
   HEADER - Usando Flexbox
   ======================================== */
   h2 {
    text-align: center;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    padding: 20px;
   }
.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========================================
   MAIN - Área principal de conteúdo
   ======================================== */
.main {
    flex: 1;
    padding: 18px 20px;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
}
.main-header {
width: 100%;
background-color: #3D2364;
padding: 20px 0;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}

.header-inner {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}

.header-logo {
height: 100px;
object-fit: contain;
user-select: none;
}

.intro {
    text-align: center;
    margin-bottom: 40px;
}

.intro h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.intro p {
    font-size: 1.1rem;
    color: #666;
}

/* ========================================
   GRID CONTAINER - Cards com Grid Layout
   ======================================== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 3fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* ========================================
   CARD FLIP - Efeito de virar o card
   ======================================== */
.card-flip {
    perspective: 1000px;
    height: 450px;
}

.card-flip.flipped .card-front {
    transform: rotateY(180deg);
}

.card-flip.flipped .card-back {
    transform: rotateY(0deg);
}

/* ========================================
   CARDS - Frente e Verso
   ======================================== */
.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.card-front {
    transform: rotateY(0deg);
}

.card-back {
    transform: rotateY(-180deg);
    background-color:  #662bc5;
    color: white;
    justify-content: center;

}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}


/* Ícone decorativo */
.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Imagem do card */
.card img {
    width: 100%;
    height: auto;
    max-width: 150px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 4px solid #662bc5;
}

/* Título do card */
.card h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 12px;
}

.card-back h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.6rem;
}

/* Descrição do card */
.card p {
    font-size: 20px;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

/* Lista no verso do card */
.card-back ul {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
    width: 100%;
    max-width: 250px;
}

.card-back ul li {
    padding: 8px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.card-back ul li:last-child {
    border-bottom: none;
}

/* Botão do card */
.btn {
    background-color: #3D2364;
    color: rgb(255, 255, 255);
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background-color: rgb(248, 151, 42);
    color: black;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.card-back .btn {
    background: white;
    color: #000000;
}

.card-back .btn:hover {
    background: #f5f7fa;
}

/* ========================================
   SEÇÃO DE ESTATÍSTICAS - Usando Flexbox
   ======================================== */
.subtitle-niveis {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}
.text-niveis {
    text-align: center;
    font-size: 1.1rem;
    color: #000000;
    margin-bottom: 30px;
}

.stats {
    display: flex;
    flex-direction: column;
    background-color: #Ffff;
    justify-content: space-around;
    gap: 30px;
    padding: 50px 20px;
    border-radius: 12px;
    margin-bottom: 40px;
}
.content-itens {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background-color: #3d23645d;
    border: 3px solid  white;
    border-radius: 10px;
    padding: 20px;
    width: 250px;
    color: black;
    font-family: Arial, Helvetica, sans-serif;
    box-shadow: 0 4px 12px rgba(221, 212, 212, 0.814);
}
/* Centraliza o texto dentro de cada card de estatística */
.stat-item h3 {
    margin-bottom: 10px;
    text-align: center;
}

/* Posiciona o botão "próximo" à direita */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/*Avaliações*/
h1 {
    border-bottom: 6px solid #3D2364; /* cor da linha */
    padding-bottom: 2px;
    text-align: center;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    margin-bottom: 20px;
    color: #000000;
    width: 100%;
}
/*Cardes de avaliação*/
.cards {
    background: #fff;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    font-family: 'Inter', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 600px;
    margin: 0 auto;
}
.cards h3 {
    margin-top: 20px;
    font-size: 24px;
    color: #333;
}
/* Estrelas de avaliação */
.star {
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
    margin: 0 3px;
}

.star:hover,
.star.selected {
    color: #ffcc00;
    transform: scale(1.2);
}
/* Area de texto dos cardes de avaliações */
textarea {
    width: 80%;
    min-height: 80px;
    max-height: 200px;
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    align-items: center;
}

textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}
/* Botão de enviar avaliação */
.btns {
    display: inline-block;
    margin-top: 15px;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.1s, box-shadow 0.2s;
    margin-bottom: 19px;
}
/* Efeitos do botão */
.btns:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btns:active {
    transform: scale(0.97);
}
/* Container das avaliações horizontais */
.avaliacoes-container {
    width: 90%;
    padding: 10px 0;
}

.avaliacoes {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 400px;
    margin: 0 auto;
    margin-bottom: 50px;
}
.avaliacao {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    min-width: 220px;
    flex: 0 0 auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s;
}
/* Efeito hover na avaliação */
.avaliacao-stars {
    color: #ffcc00;
    font-size: 18px;
}

.avaliacao-texto {
    margin-top: 8px;
    color: #333;
    font-size: 14px;
    text-align: left;
}

.avaliacao-info {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    text-align: left;
}

/* Scroll styling */
.avaliacoes-container::-webkit-scrollbar {
    height: 6px;
}

.avaliacoes-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.avaliacoes-container::-webkit-scrollbar-track {
    background: #f5f6fa;
}


/* Estilos para os seletores de casa */
.house-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
}
/* Botões de seleção de casa */
.house-btn {
    width: 30px;
    height: 30px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.house-btn:hover {
    transform: scale(1.1);
    border-color: #fff;
}

.house-btn.active {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Cores das casas */
.house-btn.gryffindor {
    background: #740001;
}

.house-btn.ravenclaw {
    background: #0e1a40;
}

.house-btn.hufflepuff {
    background: #ecb939;
}

.house-btn.slytherin {
    background: #1a472a;
}

/* Cores de fundo dos cards por casa */
.stat-item {
    transition: all 0.5s ease;
    position: relative;
}

.stat-item.house-gryffindor {
    background: linear-gradient(135deg, #740001 0%, #ae0001 100%);
    color: #eeba30;
}

.stat-item.house-ravenclaw {
    background: linear-gradient(135deg, #0e1a40 0%, #222f5b 100%);
    color: #946b2d;
}

.stat-item.house-hufflepuff {
    background: linear-gradient(135deg, #ecb939 0%, #f0c75e 100%);
    color: #372e29;
}

.stat-item.house-slytherin {
    background: linear-gradient(135deg, #1a472a 0%, #2a623d 100%);
    color: #aaa;
}

/* Ajuste de texto para melhor contraste */
.stat-item.house-gryffindor h3,
.stat-item.house-ravenclaw h3,
.stat-item.house-slytherin h3 {
    color: #fff;
}

.stat-item.house-gryffindor p,
.stat-item.house-ravenclaw p,
.stat-item.house-slytherin p {
    color: rgba(255, 255, 255, 0.9);
}
/* ========================================
   RESPONSIVE DESIGN - Ajustes para telas menores
   ======================================== */
@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .stat-item {
        width: 100%;
    }
    .cards {
        width: 100%;
    }
    .avaliacoes {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
    .avaliacao {
        width: 80%;
    }
}
