/* ---- GERAL & VARIÁVEIS ---- */
:root {
    --bg-dark: #1e1e1e;
    --bg-medium: #2d2d2d;
    --bg-light: #3c3c3c;
    --text-light: #f0f0f0;
    --text-dark: #cccccc;
    --accent-gold: #D4AF37;
    --accent-blue: #4a90e2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    /* Ajuste para o menu fixo não cobrir o topo no mobile */
    padding-top: 0; 
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--accent-gold);
}

section {
    padding: 80px 5%;
}

/* ---- CABEÇALHO & NAVEGAÇÃO ---- */
header {
    background-color: rgba(30, 30, 30, 0.95); /* Mais opaco para leitura */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 5%;
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-decoration: none;
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap; /* Evita quebra de linha no texto do link */
}

nav a:hover {
    color: var(--accent-gold);
}

/* ---- SEÇÃO INÍCIO (HERO) ---- */
#inicio {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(30, 30, 30, 0.7), rgba(30, 30, 30, 0.7)), url(https://images.unsplash.com/photo-1580541832626-2a7131ee809f?q=80&w=2070) no-repeat center center/cover;
    padding-top: 100px; /* Compensar o menu fixo */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-gold);
    color: var(--bg-dark);
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* ---- SEÇÃO PROFESSORES ---- */
.teachers-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.teacher-card {
    background-color: var(--bg-medium);
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--bg-light);
}

.teacher-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--accent-gold);
}

.teacher-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

/* ---- SEÇÃO AULAS (PREÇOS) ---- */
#aulas {
    background-color: var(--bg-medium);
}
.pricing-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.pricing-card {
    background-color: var(--bg-dark);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--bg-light);
    display: flex;
    flex-direction: column;
}

.pricing-card h3 {
    font-size: 1.6rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.pricing-card .description {
    margin-bottom: 20px;
    flex-grow: 1;
    color: var(--text-dark);
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.price .per-month {
    font-size: 1rem;
    font-weight: 400;
}

.pricing-card .duration {
    margin-bottom: 30px;
    font-weight: 500;
}

.pricing-card.popular {
    border: 2px solid var(--accent-gold);
    transform: scale(1.05);
}

.availability {
    text-align: center;
    margin-top: 40px;
    font-style: italic;
}

/* ---- RODAPÉ ---- */
footer {
    background-color: #111;
    text-align: center;
    padding: 60px 5%;
}

.contact-info {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}
.contact-button {
    background-color: var(--bg-light);
    color: var(--text-light);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.contact-button:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
}

.copyright {
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* ---- SEÇÃO LICHESS ---- */
#lichess-widgets {
    background-color: var(--bg-medium);
}

.lichess-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.widget-card {
    background-color: var(--bg-dark);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--bg-light);
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.widget-card h3 {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.widget-card p {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.iframe-container {
    width: 100%;
    height: 0;
    padding-bottom: 121%;
    position: relative;
    overflow: hidden;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

/* ---- SEÇÃO DE VÍDEOS ---- */
#videos {
    background-color: var(--bg-medium);
    padding-top: 60px;
    padding-bottom: 60px;
}

#videos h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--accent-gold);
}

.video-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.video-card {
    background-color: var(--bg-dark);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--bg-light);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-card h4 {
    padding: 15px;
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    flex-grow: 1;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-channel-link {
    text-align: center;
}

/* ---- ANALISADOR ---- */
#analisador {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: var(--bg-dark);
}

.analyzer-layout {
    display: flex;
    flex-direction: column; 
    gap: 30px;
    max-width: 1200px; 
    margin: 0 auto; 
}

.board-column {
    width: 100%; 
    max-width: 480px;
    margin: 0 auto;
}

.analysis-column {
    width: 100%; 
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 900px) {
    .analyzer-layout {
        flex-direction: row; 
        gap: 40px;
        align-items: flex-start;
    }

    .board-column {
        flex: 0 0 480px;
        width: 480px; 
        margin: 0;
    }

    .analysis-column {
        flex: 1; 
        width: auto;
    }
}

.chessboard {
    width: 100%;
    margin-bottom: 20px;
}

.board-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; 
    gap: 10px;
}
.board-controls button {
    padding: 10px 15px;
    background-color: var(--bg-light);
    color: var(--text-light);
    border: 1px solid var(--bg-medium);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem; 
}
.board-controls button:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
}

.game-info-box {
    background-color: var(--bg-dark);
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid var(--bg-light);
    min-height: 50px; 
}

.engine-box, .gemini-box { 
    background-color: var(--bg-dark);
    padding: 20px;
    border-radius: 5px;
    border: 1px solid var(--bg-light);
    min-height: 150px; 
}

.analysis-column h3, .engine-box h4, .gemini-box h4 {
    color: var(--accent-gold);
    margin-top: 0; 
    margin-bottom: 15px;
    border-bottom: 1px solid var(--bg-light);
    padding-bottom: 10px;
}

#analyze-button {
    width: 100%;
    display: inline-block;
    background-color: var(--accent-gold);
    color: var(--bg-dark);
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}
#analyze-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}
#analyze-button:disabled {
    background-color: var(--bg-light);
    color: var(--text-dark);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#pgn-input { 
    width: 100%;
    min-height: 100px; 
    background-color: var(--bg-medium);
    border: 1px solid var(--bg-light);
    border-radius: 5px;
    padding: 15px;
    color: var(--text-light);
    font-family: monospace;
    font-size: 1rem;
    resize: vertical; 
}

/* ---- ESTILOS DAS NOVAS FUNÇÕES (Dropdowns, CTA, Flip) ---- */

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.options-grid > div {
    display: flex;
    flex-direction: column;
}

.options-grid label {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.options-grid select {
    padding: 10px;
    background-color: var(--bg-medium);
    border: 1px solid var(--bg-light);
    color: var(--text-light);
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
}

@media (min-width: 900px) {
    .options-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cta-analisador {
    background-color: var(--bg-medium);
    color: var(--text-light);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--bg-light);
    margin-top: 20px;
}

.cta-analisador h3 {
    color: var(--accent-gold);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.cta-analisador p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.cta-button-whatsapp {
    display: inline-block;
    background-color: #25D366;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.board-controls-secondary {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 20px;
}

.board-controls-secondary button {
    padding: 10px 20px;
    background-color: var(--bg-light);
    color: var(--text-light);
    border: 1px solid var(--bg-medium);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem; 
}

.board-controls-secondary button:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
}

/* ------------------------------------------- */
/* ---- RESPONSIVIDADE (MENU MOBILE) --------- */
/* ------------------------------------------- */

/* Para telas menores que 768px (Celulares) */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }

    /* Ajuste do Cabeçalho para Mobile */
    header {
        position: relative; /* Deixa de ser fixo para não cobrir o conteúdo ao abrir o menu */
        padding: 15px;
    }

    nav {
        flex-direction: column; /* Empilha a logo e o menu */
        gap: 15px;
    }

    /* FORÇAR O MENU A APARECER */
    nav ul {
        display: flex; /* Garante que apareça */
        flex-direction: column; /* Um link embaixo do outro */
        width: 100%;
        gap: 10px;
        padding-bottom: 10px;
    }

    /* Estilo de Botão para os Links no Mobile */
    nav a {
        display: block;
        padding: 12px;
        background-color: var(--bg-light); /* Fundo cinza claro */
        border-radius: 8px;
        text-align: center;
        border: 1px solid #444;
    }

    /* Ajuste do padding do corpo para não ter espaço branco no topo */
    #inicio {
        padding-top: 40px; 
    }
    
    .pricing-card.popular { transform: scale(1); }
}
