
/*
Theme Name: GameXWiki
Theme URI: https://gamexwiki.com.br
Author: GameXWiki
Description: Tema oficial do portal GameXWiki.
Version: 1.0.0
Text Domain: gamexwiki
*/

/* =========================
   IDENTIDADE VISUAL
========================= */

:root {
    --background: #0D0D0D;
    --surface: #1A1A24;
    --primary: #8000FF;
    --accent: #C026FF;
    --text: #E5E7EB;
    --muted: #A1A1AA;
    --border: #393044;
}

/* =========================
   CONFIGURAÇÕES GERAIS
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
}

button, input {
    font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.container {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto;
}

/* =========================
   CABEÇALHO
========================= */

.site-header {
    background: #0C0B12;
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-logo img {
    width: 230px;
    display: block;
}

.logo-text {
    font-size: 28px;
    font-weight: 900;
    font-style: italic;
}

.logo-text span {
    color: var(--accent);
}

.main-menu ul {
    display: flex;
    align-items: center;
    gap: 25px;
    list-style: none;
}

.main-menu a {
    font-size: 15px;
    font-weight: 600;
}

.main-menu a:hover {
    color: var(--accent);
}

/* =========================
   PÁGINA INICIAL
========================= */

.home-hero {
    flex: 1;
    padding: 90px 20px;
    text-align: center;

    background:
        radial-gradient(
            ellipse at top left,
            #8000ff26,
            transparent 45%
        ),
        radial-gradient(
            ellipse at bottom right,
            #8000ff26,
            transparent 45%
        ),
        #0D0B15;
}

.hero-logo {
    max-width: 650px;
    width: 90%;
    margin: 0 auto 20px;
}

.hero-logo img {
    width: 100%;
}

.hero-logo .logo-text {
    font-size: clamp(40px, 8vw, 90px);
}

.hero-description {
    font-size: 23px;
    color: var(--text);
    margin-bottom: 35px;
}

/* =========================
   PESQUISA
========================= */

.wiki-search {
    display: flex;
    width: 100%;
    max-width: 850px;
    margin: 0 auto 50px;
    border: 1px solid #675080;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

.wiki-search input {
    width: 100%;
    min-width: 0;
    padding: 18px 22px;
    border: 0;
    background: transparent;
    color: var(--text);
}

.wiki-search input::placeholder {
    color: var(--muted);
}

.wiki-search button {
    background: linear-gradient(
        135deg, #A020FF, #6500CC
    );
    border: 0;
    color: white;
    padding: 15px 32px;
    cursor: pointer;
    font-weight: bold;
}

.wiki-search button:hover {
    background: #8000FF;
}

/* =========================
   CATEGORIAS
========================= */

.wiki-categories {
    max-width: 1150px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 12px;
    text-align: center;
    transition: 0.25s ease;
}

.category-card:hover {
    border-color: var(--accent);
    background: #231735;
    transform: translateY(-4px);
}

.category-icon {
    display: block;
    font-size: 38px;
    color: var(--accent);
    margin-bottom: 12px;
}

.category-card h2 {
    font-size: 17px;
}

/* =========================
   CONTEÚDO E ARTIGOS
========================= */

.site-content {
    width: 92%;
    max-width: 1200px;
    margin: 40px auto;
    flex: 1;
}

.entry-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.entry-content p {
    margin-bottom: 18px;
}

.entry-content a {
    color: var(--accent);
}

/* =========================
   RODAPÉ
========================= */

.site-footer {
    background: #0C0B12;
    border-top: 1px solid var(--border);
    padding: 25px 15px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin-top: auto;
}

/* =========================
   RESPONSIVIDADE
========================= */

@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
    }

    .main-menu ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .wiki-categories {
        grid-template-columns: repeat(3, 1fr);
    }

    .home-hero {
        padding: 60px 15px;
    }
}

@media (max-width: 480px) {
    .wiki-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-description {
        font-size: 18px;
    }

    .wiki-search button {
        padding: 12px 18px;
    }

    .entry-title {
        font-size: 26px;
    }
}


/* ==============================
   CABEÇALHO COMPLEMENTAR
============================== */

.site-header {
    border-bottom: 1px solid #8000FF;
}

.site-logo {
    flex-shrink: 0;
}

.main-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 7px;
    white-space: nowrap;
}

.main-menu a:hover {
    background: rgba(128, 0, 255, 0.15);
    color: #C026FF;
}

.main-menu .current-menu-item > a,
.main-menu .current-menu-ancestor > a {
    background: linear-gradient(
        135deg,
        #A020FF,
        #6500CC
    );
    color: #FFFFFF;
}

.header-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    border: 1px solid #675080;
    border-radius: 9px;
    color: #E5E7EB;
}

.header-search:hover {
    border-color: #C026FF;
    color: #C026FF;
    background: #1A1A24;
}

@media (max-width: 1200px) {

    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-menu ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .main-menu a {
        padding: 8px;
        font-size: 14px;
    }

}


/* ==============================
   RODAPÉ GAMEXWIKI
============================== */

.site-footer {
    background: #0C0B12;
    border-top: 1px solid var(--primary);
    padding: 35px 20px 20px;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-logo img {
    width: 210px;
    height: auto;
    display: block;
    margin: auto;
}

.footer-slogan {
    color: var(--muted);
    font-size: 15px;
    letter-spacing: 0.5px;
}

.footer-menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
}

.footer-menu a {
    color: var(--text);
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-menu a:hover {
    color: var(--accent);
}

.footer-bottom {
    width: 100%;
    border-top: 1px solid var(--border);
    padding-top: 18px;
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 480px) {

    .footer-menu ul {
        gap: 15px;
    }

    .footer-logo img {
        width: 170px;
    }

    .footer-bottom {
        font-size: 12px;
    }

}


/* ==============================
   PÁGINA INICIAL GAMEXWIKI
============================== */

.home-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 65vh;
    padding: 80px 20px;
}

.home-hero .container {
    width: 100%;
    max-width: 1200px;
}

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    margin: 0 auto 25px;
}

.hero-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-description {
    color: #C5C5D0;
    font-size: clamp(17px, 2vw, 24px);
    font-weight: 400;
    margin-bottom: 35px;
}

/* PESQUISA */

.wiki-search {
    display: flex;
    align-items: stretch;
    max-width: 900px;
    min-height: 65px;
    margin: 0 auto 55px;
    box-shadow: 0 0 25px rgba(128, 0, 255, 0.10);
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 20px;
    color: var(--muted);
}

.wiki-search input {
    flex: 1;
    padding: 18px 15px;
    outline: none;
    font-size: 16px;
}

.wiki-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(192, 38, 255, 0.20);
}

/* CARTÕES DAS CATEGORIAS */

.wiki-categories {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 145px;
    padding: 25px 15px;
    border-radius: 10px;
    background: linear-gradient(
        145deg,
        #1A1A24,
        #17131F
    );
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #B64BFF;
}

.category-icon svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.category-card h2 {
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
}

.category-card:hover .category-icon {
    color: #DA8AFF;
}

/* TABLETS */

@media (max-width: 900px) {

    .wiki-categories {
        grid-template-columns: repeat(3, 1fr);
    }

    .home-hero {
        padding: 60px 20px;
    }

}

/* CELULARES */

@media (max-width: 480px) {

    .home-hero {
        padding: 45px 15px;
    }

    .wiki-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        min-height: 120px;
    }

    .category-icon svg {
        width: 35px;
        height: 35px;
    }

    .wiki-search {
        min-height: 55px;
        margin-bottom: 35px;
    }

    .wiki-search input {
        font-size: 13px;
        padding: 12px 8px;
    }

    .search-icon {
        padding-left: 12px;
    }

    .search-icon svg {
        width: 18px;
    }

    .wiki-search button {
        padding: 12px 15px;
    }

}

/* ACESSIBILIDADE */

@media (prefers-reduced-motion: reduce) {

    .category-card,
    a,
    button {
        transition: none;
    }

    .category-card:hover {
        transform: none;
    }

}


/* ==============================
   LISTAGEM DE ARTIGOS
============================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.post-body {
    padding: 25px;
}

.post-title {
    font-size: 21px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-title a:hover {
    color: var(--accent);
}

.post-meta {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}

.read-more {
    display: inline-block;
    background: var(--primary);
    color: #FFFFFF !important;
    padding: 10px 20px;
    border-radius: 7px;
    font-weight: 600;
    margin-top: 15px;
}

.read-more:hover {
    background: #6500CC;
}

/* ARTIGOS INDIVIDUAIS */

.single-content {
    max-width: 1000px;
    margin: auto;
}

.single-content .post-card {
    background: transparent;
    border: none;
}

.single-content .entry-content {
    font-size: 17px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.single-content .entry-content h2,
.single-content .entry-content h3 {
    margin: 30px 0 15px;
    color: var(--accent);
}

.single-content .entry-content ul,
.single-content .entry-content ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

.single-content .entry-content img {
    border-radius: 8px;
}

.single-content .entry-content iframe {
    max-width: 100%;
}

.entry-content a:not(.read-more) {
    text-decoration: underline;
}

/* PESQUISA PADRÃO */

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 35px;
}

.search-form label {
    flex: 1;
    min-width: 0;
}

.search-field {
    width: 100%;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
}

.search-submit {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    padding: 14px 22px;
    border-radius: 7px;
    cursor: pointer;
}

/* PAGINAÇÃO */

.wiki-pagination {
    margin-top: 40px;
    text-align: center;
}

.wiki-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.wiki-pagination .current {
    background: var(--primary);
    color: #FFFFFF;
}

/* CONTEÚDO NÃO ENCONTRADO */

.empty-content {
    text-align: center;
    padding: 50px 20px;
    background: var(--surface);
    border-radius: 12px;
}

.empty-content p {
    color: var(--muted);
    margin: 20px 0;
}

/* ACESSIBILIDADE */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip-path: none;
}

/* RESPONSIVIDADE */

@media (max-width: 900px) {
    .posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-body {
        padding: 18px;
    }

    .single-content .entry-content {
        font-size: 16px;
    }
}


/* ==============================
   REFINAMENTO DA PÁGINA INICIAL
============================== */

.home-hero {
    min-height: auto;
    padding: 40px 20px 55px;
}

.hero-logo {
    max-width: 620px;
    margin: 0 auto 0;
}

.hero-description {
    font-size: 22px;
    margin-bottom: 28px;
}

.wiki-search {
    max-width: 800px;
    min-height: 58px;
    margin-bottom: 35px;
}

.wiki-categories {
    max-width: 1100px;
    gap: 16px;
}

.category-card {
    min-height: 125px;
    padding: 20px 12px;
}

.category-icon svg {
    width: 38px;
    height: 38px;
}

@media (max-width: 600px) {

    .home-hero {
        padding: 30px 15px;
    }

    .hero-logo {
        width: 100%;
    }

    .hero-description {
        font-size: 17px;
    }

    .category-card {
        min-height: 105px;
    }

}
