/* ===================================================================================
// ZERODEX - FOLHA DE ESTILOS PRINCIPAL (style.css)
// ===================================================================================
//
// DESCRIÇÃO:
// Este arquivo contém todos os estilos do projeto. A estrutura foi organizada de
// forma lógica para facilitar a manutenção e a escalabilidade.
//
// ESTRUTURA DO ARQUIVO:
// 1.  CONFIGURAÇÕES GLOBAIS (Fontes e Variáveis CSS)
// 2.  ESTILOS DE BASE E RESET
// 3.  COMPONENTES DE LAYOUT (Header, Main, Footer)
// 4.  COMPONENTES REUTILIZÁVEIS (Botões, Cards, Formulários)
// 5.  ESTILOS ESPECÍFICOS POR PÁGINA
//     5.1. Página Inicial (index.html)
//     5.2. Página do Catálogo (jogos.html)
//     5.3. Página Sobre (sobre.html)
//     5.4. Página Adicionar (adicionar.html)
// 6.  ESTILOS PARA O TEMA CLARO (Light Mode)
// 7.  CLASSES UTILITÁRIAS E ANIMAÇÕES
// 8.  RESPONSIVIDADE (Media Queries)
//
// =================================================================================== */


/* =================================================================================== */
/* --- 1. CONFIGURAÇÕES GLOBAIS ------------------------------------------------------ */
/* =================================================================================== */

/* --- 1.1. Importação de Fontes --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* --- 1.2. Variáveis de Cor (CSS Variables) --- */
:root {
    /* Tema Escuro (Padrão) */
    --color-background-dark: #141518;
    --color-background-light: #1F2125;
    --color-border: #2C2E33;
    --color-text-primary: #E1E1E1;
    --color-text-secondary: #888;
    --color-accent: #28a745;
    --color-surprise: #F9A825;
}


/* =================================================================================== */
/* --- 2. ESTILOS DE BASE E RESET ---------------------------------------------------- */
/* =================================================================================== */

/* --- 2.1. Reset Básico --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- 2.2. Estilos do Corpo da Página (Body) --- */
body {
    background-color: var(--color-background-dark);
    color: var(--color-text-primary);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}


/* =================================================================================== */
/* --- 3. COMPONENTES DE LAYOUT ------------------------------------------------------ */
/* =================================================================================== */

/* --- 3.1. Cabeçalho (Header) --- */
header {
    padding: 20px 0;
    background-color: var(--color-background-light);
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-container h1 {
    font-size: 1.5em;
    color: var(--color-accent);
}

/* --- 3.2. Navegação Principal (Nav) --- */
.header-container nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.header-container nav a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease-in-out;
}

.header-container nav a:hover {
    color: var(--color-accent);
}

/* --- 3.3. Conteúdo Principal (Main) --- */
main {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

section {
    margin-bottom: 40px;
}

h2 {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: var(--color-text-primary);
}

p {
    line-height: 1.7;
    max-width: 720px;
}

/* --- 3.4. Rodapé (Footer) --- */
footer {
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-secondary);
    transition: border-color 0.3s ease;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-container p {
    max-width: none;
}


/* =================================================================================== */
/* --- 4. COMPONENTES REUTILIZÁVEIS -------------------------------------------------- */
/* =================================================================================== */

/* --- 4.1. Botões --- */
.cta-button,
#add-game-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    background-color: var(--color-accent);
    color: #fff !important;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover,
#add-game-btn:hover {
    background-color: #2fbf4f;
    border-color: #2fbf4f;
    transform: translateY(-2px);
}

.secondary-btn {
    padding: 8px 15px;
    margin-top: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: transparent;
    color: var(--color-text-secondary);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background-color: var(--color-border);
    color: var(--color-text-primary);
    border-color: var(--color-text-secondary);
}

/* --- 4.2. Grid de Jogos --- */
.game-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    padding: 10px;
}

.game-grid.reloading {
    opacity: 0.5;
    transition: opacity 0.2s ease-out;
}

/* --- 4.3. Card de Jogo --- */
.game-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-background-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s 0.3s, background-color 0.3s ease, border-color 0.3s ease;
}

.game-card.hidden {
    display: none;
}

.card-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--color-border);
}

.game-card img {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* --- 4.3.1. Informações Padrão do Card (Visíveis) --- */
.game-info-default {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    transition: opacity 0.3s ease-in-out;
}

.game-info-default .game-title {
    font-size: 1.1em;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- 4.3.2. Badges (ID, Versão, Status) --- */
.game-number {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(20, 21, 24, 0.85);
    backdrop-filter: blur(2px);
    border-bottom-right-radius: 8px;
    font-size: 0.9em;
    font-weight: bold;
    transition: opacity 0.3s ease-in-out, background-color 0.3s ease, color 0.3s ease;
}

.game-version-badge {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 4px 8px;
    background-color: #9C27B0;
    color: #fff;
    font-size: 0.8em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    border-bottom-left-radius: 8px;
}

.status-badge {
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 5px;
    color: #fff;
    font-size: 0.8em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.status-completed-100 { background-color: #4CAF50; }
.status-completed     { background-color: #03A9F4; }
.status-playing       { background-color: #F9A825; }
.status-retired       { background-color: #607D8B; }
.status-archived      { background-color: #FF9800; }
.status-abandoned     { background-color: #f44336; }

/* --- 4.3.3. Overlay de Detalhes (Aparece no Hover) --- */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(4px);
    opacity: 0;
    overflow-y: auto;
    transition: opacity 0.3s ease-in-out, background-color 0.3s ease;
}

.game-overlay h3 { font-size: 1.3em; margin-bottom: 15px; }
.game-overlay p { font-size: 0.9em; margin-bottom: 10px; line-height: 1.4; }
.game-overlay p strong { color: #bbb; }
.game-overlay a { color: var(--color-accent); text-decoration: none; font-weight: bold; }
.game-overlay a:hover { text-decoration: underline; }

.review-trigger {
    width: 100%;
    margin-top: 15px;
}

/* --- 4.3.4. Efeitos de Interação do Card (Hover e Destaque) --- */
.game-card:hover {
    z-index: 10;
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.game-card.highlight {
    z-index: 5;
    box-shadow: 0 0 20px 5px var(--color-surprise);
}

.game-card.highlight:hover {
    z-index: 11;
    transform: scale(1.08);
    box-shadow: 0 0 25px 7px var(--color-surprise);
}

.game-card:hover .card-image-container img {
    transform: scale(1.1);
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.game-card:hover .game-number,
.game-card:hover .game-info-default,
.game-card:hover .game-version-badge {
    opacity: 0;
}

/* --- 4.4. Tooltip de Comentário --- */
.review-card {
    position: absolute;
    z-index: 20;
    width: 280px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-background-dark);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    overflow-wrap: break-word;
}

.review-card.active {
    opacity: 1;
    transform: scale(1);
}

.review-card::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 0;
    height: 0;
    border-style: solid;
    transition: border-color 0.3s ease;
}

.review-card.on-right::before {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--color-border) transparent transparent;
}

.review-card.on-left::before {
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--color-border);
}

.review-card h3 {
    font-size: 1.1em;
    color: var(--color-accent);
    margin-bottom: 10px;
}

.review-card p {
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--color-text-secondary);
    max-width: none;
}


/* =================================================================================== */
/* --- 5. ESTILOS ESPECÍFICOS POR PÁGINA --------------------------------------------- */
/* =================================================================================== */

/* --- 5.1. PÁGINA INICIAL (index.html) --- */
#hero {
    padding: 60px 30px;
    margin-bottom: 60px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(31, 33, 37, 0.5) 0%, rgba(20, 21, 24, 0.8) 100%), var(--color-background-dark);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.hero-subtitle span {
    display: block;
    margin-bottom: 1.5em;
}

.homepage-shelf {
    padding: 25px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background-color: var(--color-background-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.homepage-shelf:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.homepage-shelf h2 {
    display: inline-block;
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-size: 1.6em;
    border-bottom: 2px solid var(--color-accent);
}

#shelf-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px 20px;
    background-color: rgba(20, 21, 24, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.4s ease-in-out, background-color 0.3s ease, border-color 0.3s ease;
}

#shelf-nav.shelf-nav-hidden { transform: translateY(-100%); }
#shelf-nav.shelf-nav-visible { transform: translateY(0); }

#shelf-nav a {
    padding: 5px 10px;
    border-radius: 5px;
    color: var(--color-text-secondary);
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}
#shelf-nav a:hover {
    color: var(--color-accent);
    background-color: var(--color-border);
}


/* --- 5.2. PÁGINA DE CATÁLOGO (jogos.html) --- */
.catalog-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 30px;
    margin-bottom: 50px;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

#catalogo .catalog-header h2 {
    margin-bottom: 8px !important;
}

.catalog-header .catalog-note {
    margin: 0;
    font-size: 0.9em;
    color: var(--color-text-secondary);
}

.catalog-header .catalog-note a {
    color: var(--color-text-secondary);
    text-decoration: underline;
}

.catalog-header .catalog-note a:hover {
    color: var(--color-accent);
}

#controls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 960px;
    margin: 0 auto 50px auto;
}

#search-bar,
#sort-options {
    flex: 1;
    min-width: 200px;
    padding: 12px 18px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-background-light);
    color: var(--color-text-primary);
    font-size: 1.05em;
    outline: none;
    transition: all 0.3s ease;
}

#search-bar:focus,
#sort-options:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.3);
}

#search-bar::placeholder {
    color: var(--color-text-secondary);
}

#sort-options { cursor: pointer; }
#sort-options:hover { background-color: var(--color-border); }
#sort-options option { background: var(--color-background-light); color: var(--color-text-primary); }

#filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 25px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    background-color: transparent;
    color: var(--color-text-secondary);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.filter-btn:hover {
    background-color: var(--color-border);
    color: var(--color-text-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
}

#surprise-btn {
    padding: 10px 25px;
    border: 1px solid var(--color-surprise);
    border-radius: 30px;
    background-color: transparent;
    color: var(--color-surprise);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

#surprise-btn:hover {
    background-color: var(--color-surprise);
    color: var(--color-background-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(249, 168, 37, 0.5);
}


/* --- 5.3. PÁGINA SOBRE (sobre.html) --- */
.about-section-card {
    padding: 30px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background-color: var(--color-background-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.about-section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.about-section-card h2,
#dynamic-stats .section-title {
    display: block;
    text-align: center;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.about-section-card h2::after,
#dynamic-stats .section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: var(--color-accent);
    margin: 10px auto 0;
}

main#about-page #sobre-mim p {
    font-size: 1.1em;
    color: var(--color-text-secondary);
    text-align: center;
    max-width: none;
}

.setup-container {
    display: flex;
    justify-content: space-around;
    gap: 40px;
    flex-wrap: wrap;
}

.setup-column {
    flex: 1;
    min-width: 280px;
    padding: 25px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-background-dark);
    text-align: left;
}

.setup-column h3 {
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-accent);
}

.setup-column ul { list-style: none; }
.setup-column li { margin-bottom: 15px; }
.setup-column li strong {
    display: block;
    font-size: 0.9em;
    color: var(--color-text-secondary);
}

.legend-list { list-style: none; max-width: none; }
.legend-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: var(--color-background-dark);
    text-align: left;
    transition: background-color 0.2s ease;
}

.legend-item:hover { background-color: var(--color-border); }
.legend-item .status-badge { margin-right: 15px; }

#stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 960px;
    margin: 0 auto 40px auto;
}

.stat-item {
    padding: 25px;
    border-radius: 8px;
    background-color: var(--color-background-light);
}

.stat-item h3 { color: var(--color-accent); margin-bottom: 20px; }
.stat-item p { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--color-text-secondary); }
.stat-item span { font-weight: bold; color: var(--color-text-primary); }
.stat-item a { text-decoration: none; color: inherit; display: block; margin: 0 -8px; padding: 0px 8px; border-radius: 4px; transition: background-color 0.2s ease; }
.stat-item a:hover { background-color: rgba(255, 255, 255, 0.05); }

.charts-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 960px;
    margin: 0 auto;
}

.chart-box {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    border-radius: 8px;
    background-color: var(--color-background-light);
}

.chart-box canvas { max-height: 250px; }

#links-externos ul { list-style: none; padding: 0; }
#links-externos li a {
    display: block;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-left: 4px solid transparent;
    border-radius: 8px;
    background-color: var(--color-background-dark);
    color: var(--color-text-primary);
    font-weight: bold;
    text-decoration: none;
    text-align: left;
    transition: all 0.2s ease-in-out;
}

#links-externos li a:hover {
    background-color: var(--color-border);
    color: var(--color-accent);
    transform: translateX(5px);
    border-left-color: var(--color-accent);
}


/* --- 5.4. PÁGINA ADICIONAR (adicionar.html) --- */
#add-game-section {
    max-width: 800px;
    margin: 40px auto;
}

#add-game-section h2 {
    text-align: center;
}

#add-game-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: var(--color-accent);
    margin: 10px auto 20px;
}

#search-container,
#steam-search-container {
    padding: 20px;
    margin-bottom: 0; /* Espaço controlado pelo separador */
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#search-container h4,
#steam-search-container h4 {
    margin: 0;
    color: var(--color-text-secondary);
    font-weight: normal;
}

.separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-text-secondary);
    margin: 25px 0;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border);
}

.separator:not(:empty)::before { margin-right: .5em; }
.separator:not(:empty)::after { margin-left: .5em; }

#api-search-bar,
#steam-search-bar {
    flex-grow: 1;
    padding: 12px 18px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-background-dark);
    color: var(--color-text-primary);
    font-size: 1.05em;
    outline: none;
    transition: all 0.3s ease;
}

#api-search-bar:focus,
#steam-search-bar:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.3);
}

#api-search-button,
#steam-search-button {
    padding: 12px 20px;
}

#api-results-container h3 { margin-bottom: 25px; color: var(--color-text-secondary); text-align: center; }
.results-grid { display: grid; gap: 15px; }

.api-result-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-background-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.api-result-item:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.api-result-item img { width: 80px; height: 107px; border-radius: 4px; flex-shrink: 0; object-fit: cover; }
.api-result-item h3 { margin: 0 0 5px 0; color: var(--color-text-primary); text-align: left; }
.api-result-item p { font-size: 0.9em; color: var(--color-text-secondary); text-align: left; }
.manual-entry-link { margin: 20px 0; text-align: center; }

#add-form-container { margin-top: 30px; }

.form-api-data {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: var(--color-background-dark);
}

.form-image-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#change-cover-btn {
    width: 100%;
    margin-top: 8px;
    font-size: 0.8em;
    padding: 6px 10px;
}

hr { border: none; height: 1px; background-color: var(--color-border); margin: 30px 0; }

.form-group {margin-bottom: 15px;}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-background-dark);
    color: var(--color-text-primary);
    font-size: 1em;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
    font-size: 0.9em;
    font-weight: bold;
}

.form-group-inline { display: flex; gap: 15px; align-items: flex-end; }
.form-group-grid-condensed {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.form-group-grid-condensed .form-group { margin-bottom: 0; }

#guides-list .guide-item {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    background-color: var(--color-background-dark);
    font-size: 0.9em;
}

#game-platform { height: 150px; }
#game-platform option { padding: 8px; cursor: pointer; }
#game-platform option:checked { background-color: var(--color-accent); color: #fff; }

#output-container {
    padding: 25px;
    margin-top: 30px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-background-dark);
}

#output-container h3 { margin-bottom: 8px; text-align: center; }
#output-container p { margin-bottom: 20px; font-size: 0.9em; color: var(--color-text-secondary); text-align: center; max-width: none; }
#output-code {
    width: 100%;
    padding: 15px;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #0d0d0d;
    color: #e0e0e0;
    font-family: 'Consolas', 'Menlo', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    resize: vertical;
}

#copy-code-btn,
.edit-btn {
    display: block;
    width: 100%;
    margin-top: 15px;
}

#copy-code-btn { background-color: #333; border-color: #444; }
#copy-code-btn:hover { background-color: #444; border-color: #555; }

/* -- 5.5. ESTILOS DA GALERIA DE ASSETS (MODAL) -- */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none; /* Inicia oculto para performance */
}

.gallery-overlay.visible {
    display: block;
    opacity: 1;
}

.asset-gallery-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 1001;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background-color: var(--color-background-dark);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none; /* Inicia oculto */
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.asset-gallery-modal.visible {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--color-accent);
}

.close-gallery-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.close-gallery-btn:hover {
    color: var(--color-text-primary);
    transform: rotate(90deg);
}

.modal-content {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}

.asset-category {
    margin-bottom: 30px;
}

.asset-category h4 {
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 1.1em;
}

.asset-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.asset-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background-color: var(--color-background-light);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.asset-item:hover {
    transform: scale(1.03);
    border-color: var(--color-accent);
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
}

.asset-item img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 4px;
    background-color: var(--color-border);
}

.asset-item figcaption {
    font-size: 0.8em;
    color: var(--color-text-secondary);
    text-align: center;
}

.asset-item figcaption span {
    display: block;
    font-family: 'Consolas', monospace;
    font-size: 0.9em;
    color: var(--color-text-primary);
}


/* =================================================================================== */
/* --- 6. ESTILOS PARA O TEMA CLARO (Light Mode) ------------------------------------- */
/* =================================================================================== */

body.light-mode {
    --color-background-dark: #f5f5f7;
    --color-background-light: #ffffff;
    --color-border: #d2d2d7;
    --color-text-primary: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-accent: #0071e3;
    --color-surprise: #ff9500;
}

/* --- 6.1. Componentes de Layout no Tema Claro --- */
.light-mode #hero {
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
    border-color: #e5e5e5;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.light-mode .hero-title { text-shadow: none; }

.light-mode #shelf-nav {
    background-color: rgba(255, 255, 255, 0.85);
}

.light-mode #shelf-nav a:hover {
    background-color: #e9e9eb;
}

/* --- 6.2. Cards no Tema Claro --- */
.light-mode .game-card,
.light-mode .about-section-card,
.light-mode .homepage-shelf,
.light-mode .stat-item,
.light-mode .chart-box,
.light-mode .asset-item {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #e5e5e5;
}

.light-mode .game-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.light-mode .homepage-shelf:hover,
.light-mode .about-section-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.light-mode .game-info-default {
    background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
}

.light-mode .game-info-default .game-title {
    color: var(--color-text-primary);
}

.light-mode .game-number {
    background: rgba(255, 255, 255, 0.75);
    color: var(--color-text-primary);
}

.light-mode .game-overlay {
    background-color: rgba(255, 255, 255, 0.85);
}

.light-mode .game-overlay p strong { color: var(--color-text-secondary); }

.light-mode .review-card {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.light-mode .review-card.on-right::before {
    border-color: transparent var(--color-border) transparent transparent;
}

.light-mode .review-card.on-left::before {
    border-color: transparent transparent transparent var(--color-border);
}

.light-mode .asset-gallery-modal { background-color: var(--color-background-light); }
.light-mode .asset-item { background-color: var(--color-background-dark); }


/* --- 6.3. Controles e Formulários no Tema Claro --- */
.light-mode #search-bar,
.light-mode #sort-options,
.light-mode #api-search-bar,
.light-mode #steam-search-bar {
    background-color: #eff0f1;
}

.light-mode #search-bar:focus,
.light-mode #sort-options:focus,
.light-mode #api-search-bar:focus,
.light-mode #steam-search-bar:focus {
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.2);
    background-color: var(--color-background-light);
}

.light-mode .filter-btn:hover {
    background-color: #e9e9eb;
}

.light-mode .filter-btn.active {
    box-shadow: 0 0 15px rgba(0, 113, 227, 0.4);
}

.light-mode #surprise-btn:hover {
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 149, 0, 0.5);
}

.light-mode .cta-button:hover {
    background-color: #0077ed;
    border-color: #0077ed;
}

.light-mode .stat-item a:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.light-mode #links-externos li a:hover {
    background-color: #e9e9eb;
}

.light-mode .form-group input[type="text"],
.light-mode .form-group input[type="number"],
.light-mode .form-group select,
.light-mode .form-group textarea {
    background-color: #eff0f1;
}

.light-mode .form-group input:focus,
.light-mode .form-group select:focus,
.light-mode .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

.light-mode #output-container { background-color: #f5f5f7; }

.light-mode #copy-code-btn,
.light-mode .edit-btn {
    background-color: #e9e9eb;
    border-color: #d2d2d7;
    color: var(--color-text-primary);
}

.light-mode #copy-code-btn:hover,
.light-mode .edit-btn:hover {
    background-color: #d2d2d7;
    border-color: #c6c6c8;
}

/* =================================================================================== */
/* --- 7. CLASSES UTILITÁRIAS E ANIMAÇÕES -------------------------------------------- */
/* =================================================================================== */

/* --- 7.1. Botão de Tema --- */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.theme-toggle-btn:hover { background-color: var(--color-border); }
.theme-toggle-btn svg { width: 24px; height: 24px; fill: var(--color-text-primary); }

#sun-icon { display: block; }
#moon-icon { display: none; }
.light-mode #sun-icon { display: none; }
.light-mode #moon-icon { display: block; }

/* --- 7.2. Botão Voltar ao Topo --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: none;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: white;
    font-size: 24px;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.3s, background-color 0.3s ease;
}

#back-to-top:hover { opacity: 1; }

/* --- 7.3. Utilitários Diversos --- */
.no-results-message {
    grid-column: 1 / -1;
    padding: 40px;
    color: var(--color-text-secondary);
    font-size: 1.2em;
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- 7.4. Animação de Entrada --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-enter-animation {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}


/* =================================================================================== */
/* --- 8. RESPONSIVIDADE (Media Queries) --------------------------------------------- */
/* =================================================================================== */

@media (max-width: 700px) {
    #controls-container {
        flex-direction: column;
        align-items: stretch;
    }

    .form-group-grid-condensed {
        grid-template-columns: 1fr;
    }
}