/*!
 * Project: ApkPortal Pro CMS
 * Author: JoelsonTk
 * Version: 2.3.0 (Reorganizado e Otimizado)
 * ---------------------------------------------------------------- */

/* ==========================================================================
   ÍNDICE DE NAVEGAÇÃO
   ========================================================================== */
/*
   01. VARIÁVEIS CSS & RESET GLOBAL
   02. TIPOGRAFIA & FORMATAÇÃO DE CONTEÚDO
   03. HEADER & SISTEMA DE NAVEGAÇÃO
   04. HOME: HERO BANNER & GRID DE JOGOS
   05. PÁGINA SINGLE (DETALHES DO JOGO)
   06. PÁGINAS INSTITUCIONAIS & CATEGORIAS
   07. SIDEBAR & SISTEMA DE WIDGETS
   08. COMPONENTES REUTILIZÁVEIS
   09. FOOTER & RODAPÉ
   10. PAINEL ADMINISTRATIVO (BACKEND)
   11. RESPONSIVIDADE MOBILE-FIRST
   12. CORREÇÕES ANTI-OVERFLOW & MOBILE IMERSIVO
*/

/* ==========================================================================
   01. VARIÁVEIS CSS & RESET GLOBAL
   ========================================================================== */

:root {
    /* Cores Principais */
    --primary: #ed5456;
    --primary-hover: #ff3333;
    
    /* Backgrounds */
    --bg-body: #191a1e;
    --bg-dark: #121316;
    --bg-card: #25262a;
    
    /* Textos */
    --text-main: #eeeeee;
    --text-muted: #aaaaaa;
    
    /* Bordas */
    --border-color: #333333;
    
    /* Espaçamentos (Opcional - para expansão futura) */
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
}

/* Reset Universal */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Body Principal */
body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Elementos Base */
a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Container Principal */
.main-wrapper {
    max-width: 1140px;
    margin: 40px auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    width: 100%;
    flex: 1;
}

/* Títulos Padrão de Seção */
.section-heading,
.widget-title,
.related-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   02. TIPOGRAFIA & FORMATAÇÃO DE CONTEÚDO
   ========================================================================== */

.entry-content {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #e0e0e0;
    letter-spacing: 0.3px;
    text-align: justify;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content h2,
.entry-content h3 {
    color: #fff;
    font-weight: 800;
    margin-top: 30px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
    line-height: 1.3;
}

.entry-content h3 {
    font-size: 1.2rem;
    color: var(--primary);
    border-left: none;
    padding-left: 0;
    border-bottom: 1px solid var(--border-color);
    display: inline-block;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px 15px 15px 35px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.entry-content li {
    margin-bottom: 8px;
}

.entry-content strong {
    color: #fff;
    font-weight: 700;
}

/* ==========================================================================
   03. HEADER & SISTEMA DE NAVEGAÇÃO
   ========================================================================== */

.site-header {
    background-color: var(--bg-dark);
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

/* Logotipo */
.logo {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    font-style: italic;
    z-index: 1002;
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 40px;
}

.logo span {
    color: var(--primary);
}

/* Container de Navegação Desktop */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    margin-left: 40px;
}

/* Links de Navegação */
.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #ccc;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    padding: 24px 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    border-bottom-color: var(--primary);
}

/* Ações do Header */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Campo de Busca */
.header-search {
    position: relative;
    display: flex;
}

.header-search input {
    background: #1a1a1a;
    border: 1px solid #444;
    color: #fff;
    padding: 8px 15px;
    padding-right: 35px;
    border-radius: 20px;
    font-size: 13px;
    width: 200px;
    transition: all 0.3s ease;
}

.header-search input:focus {
    border-color: var(--primary);
    width: 220px;
    outline: none;
}

.header-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #888;
    transition: color 0.3s ease;
}

.header-search button:hover {
    color: var(--primary);
}

/* Botão de Perfil */
.header-profile-btn {
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.header-profile-btn:hover {
    background: var(--primary);
    color: #fff;
}

.profile-text {
    display: block;
}

/* Botão Mobile (Escondido no Desktop) */
.mobile-menu-btn {
    display: none;
}

/* ==========================================================================
   04. HOME: HERO BANNER & GRID DE JOGOS
   ========================================================================== */

/* --- Hero Banner --- */
.hero-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 50px;
    background: #000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    z-index: 1;
    transform: scale(1.1);
}

.hero-content-box {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.hero-text {
    max-width: 60%;
}

.hero-badge {
    background: var(--primary);
    color: #fff;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 20px;
    margin-bottom: 15px;
    display: inline-block;
    box-shadow: 0 0 10px rgba(237, 84, 86, 0.5);
}

.hero-text h1 {
    font-size: 38px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    color: #ccc;
    font-size: 14px;
}

.hero-meta i {
    color: var(--primary);
    margin-right: 5px;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.btn-hero-play {
    background: var(--primary);
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
    box-shadow: 0 5px 20px rgba(237, 84, 86, 0.4);
    transition: all 0.3s ease;
}

.btn-hero-play:hover {
    transform: translateY(-3px);
    background: #fff;
    color: var(--primary);
}

.btn-hero-info {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-hero-info:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.hero-artwork img {
    width: 200px;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transform: rotate(3deg);
    transition: transform 0.3s ease;
}

.hero-artwork img:hover {
    transform: rotate(0deg) scale(1.05);
}

/* --- Grid de Jogos --- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.post-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    border-radius: 6px;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.card-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #000;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.9;
}

.post-card:hover .card-thumbnail img {
    transform: scale(1.1);
    opacity: 1;
}

.cat-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 10px;
    padding: 4px 10px;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 4px;
    border-left: 2px solid var(--primary);
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 16px;
    margin: 0 0 8px 0;
    line-height: 1.4;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-card:hover .card-title {
    color: var(--primary);
}

.card-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* --- Recomendações --- */
.recommendation-box {
    background: linear-gradient(to right, #1a1a1a, #222);
    padding: 20px;
    border-radius: 8px;
    border: 1px dashed #333;
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.rec-card {
    display: flex;
    align-items: center;
    background: #151515;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.rec-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(237, 84, 86, 0.15);
}

.rec-card img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    border: 1px solid #444;
}

.rec-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rec-title {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.rec-cat {
    color: var(--primary);
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

/* ==========================================================================
   05. PÁGINA SINGLE (DETALHES DO JOGO)
   ========================================================================== */

/* Breadcrumbs */
.breadcrumbs {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.breadcrumbs a {
    color: #fff;
    font-weight: bold;
    margin: 0 5px;
}

/* Thumbnail Principal */
.post-thumbnail {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    padding: 5px;
    background: var(--bg-card);
}

/* Cabeçalho do Post */
.entry-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.entry-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.2;
}

.entry-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.meta-item {
    margin-right: 15px;
    font-size: 12px;
    color: #888;
}

.meta-item i {
    color: var(--primary);
    margin-right: 5px;
}

/* Caixa de Informações */
.info-box {
    background: var(--bg-card);
    padding: 20px;
    border-left: 4px solid var(--primary);
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

.info-box ul li {
    list-style: none !important;
    border-bottom: 1px solid #333;
    padding: 8px 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.info-box ul li:last-child {
    border-bottom: none;
}

.info-box strong {
    color: #fff;
}

/* Botões de Download */
.download-buttons {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: var(--bg-card);
    border: 1px dashed #555;
    border-radius: 8px;
}

.btn-download-multi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 12px 20px;
    color: #fff !important;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    border-radius: 5px;
    transition: all 0.3s ease;
    min-width: 150px;
}

.btn-download-multi:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(237, 84, 86, 0.3);
}

/* Área de Informações Extras */
.extra-info-area {
    margin-top: 20px;
    margin-bottom: 40px;
}

.info-toggle {
    background-color: #222;
    border: 1px solid #333;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.info-toggle[open] {
    border-color: var(--primary);
}

.info-toggle summary {
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.02);
    list-style: none;
}

.info-toggle summary::-webkit-details-marker {
    display: none;
}

.info-content {
    padding: 20px;
    border-top: 1px solid #333;
    color: #ccc;
    font-size: 14px;
    background-color: #1a1a1a;
}

.error-toggle[open] .info-content {
    border-top-color: #ff4444;
}

/* Galeria de Imagens */
.game-gallery {
    margin: 30px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #333;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.02);
    border-color: var(--primary);
    filter: brightness(1.1);
}

/* Posts Relacionados */
.related-posts {
    margin-top: 50px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.related-card {
    background: var(--bg-card);
    padding: 10px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.related-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.related-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    margin-bottom: 10px;
}

.related-card h4 {
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
    font-weight: bold;
}

.related-card h4 a {
    color: #eee;
}

/* ==========================================================================
   06. PÁGINAS INSTITUCIONAIS & CATEGORIAS
   ========================================================================== */

/* Container de Categorias */
.cat-list-container {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
}

.cat-intro {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.category-cloud-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.cat-page-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cat-page-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(237, 84, 86, 0.15);
}

.cat-card-icon {
    width: 50px;
    height: 50px;
    background: rgba(237, 84, 86, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.cat-page-card:hover .cat-card-icon {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.cat-card-info {
    display: flex;
    flex-direction: column;
}

.cat-card-title {
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.cat-card-link {
    color: #666;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.cat-page-card:hover .cat-card-link {
    color: #fff;
    padding-left: 5px;
}

/* Páginas Legais */
.legal-page-card {
    background-color: var(--bg-card);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 40px;
}

.legal-header {
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.legal-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.legal-content,
.legal-content p,
.legal-content li {
    color: #e0e0e0 !important;
    background-color: transparent !important;
}

/* ==========================================================================
   07. SIDEBAR & SISTEMA DE WIDGETS
   ========================================================================== */

.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--bg-card);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.widget-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.widget-header h4 {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-header h4 i {
    color: var(--primary);
}

/* Lista de Categorias */
.sidebar-cat-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-cat-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5px;
    color: #aaa;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.sidebar-cat-list li a i {
    font-size: 10px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.sidebar-cat-list li a:hover {
    color: #fff;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-cat-list li a:hover i {
    color: var(--primary);
    opacity: 1;
}

/* Link Ver Todas */
.all-cats-link {
    margin-top: 15px;
    text-align: center;
    border-bottom: none !important;
}

.all-cats-link a {
    display: block;
    background: #333;
    color: #fff !important;
    padding: 10px !important;
    font-size: 12px !important;
    font-weight: bold;
    border-radius: 4px;
    text-align: center;
}

.all-cats-link a:hover {
    background: var(--primary);
}

/* Widget de Anúncio */
.sidebar-ad-box {
    background-color: #111;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #444;
    border: 2px dashed #333;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
}

/* Redes Sociais */
.sidebar-socials {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    color: #fff;
    border-radius: 5px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    color: #fff;
}

.social-icon.discord:hover {
    background: #5865F2;
}

.social-icon.telegram:hover {
    background: #0088cc;
}

.social-icon.instagram:hover {
    background: #E1306C;
}

.social-icon.youtube:hover {
    background: #FF0000;
}

/* ==========================================================================
   08. COMPONENTES REUTILIZÁVEIS
   ========================================================================== */

/* --- Paginação --- */
.pagination-area {
    margin-top: 40px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #222;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.page-numbers:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #333;
}

.page-numbers.current {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    cursor: default;
}

/* --- Sistema de Login --- */
.login-container {
    width: 100%;
    max-width: 450px;
    margin: 50px auto;
}

.login-box,
.profile-card {
    background: var(--bg-card);
    padding: 30px;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #888;
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.btn-login,
.btn-action {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    display: block;
    text-align: center;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    filter: brightness(1.2);
}

.btn-login.secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-login.secondary:hover {
    background: var(--primary);
    color: white;
}

/* --- Página 404 / Erros --- */
.not-found-container {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px dashed #444;
    border-radius: 10px;
    grid-column: 1 / -1;
}

.error-icon,
.not-found-container i {
    font-size: 80px;
    color: var(--primary);
    margin-bottom: 20px;
    opacity: 0.5;
}

.error-box h2,
.not-found-container h3 {
    color: #fff;
    margin-bottom: 10px;
}

.error-box p,
.not-found-container p {
    color: #aaa;
    margin-bottom: 30px;
}

/* ==========================================================================
   09. FOOTER & RODAPÉ
   ========================================================================== */

.site-footer {
    background-color: #0a0a0a;
    color: #888;
    width: 100%;
    padding: 60px 0 30px 0;
    margin-top: 60px;
    border-top: 4px solid var(--primary);
    font-size: 14px;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.site-footer .container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--primary);
    font-size: 26px;
    font-weight: 900;
    margin-top: 0;
    font-style: italic;
}

.footer-col h3 span {
    color: white;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: bold;
    border-left: 3px solid var(--primary);
    padding-left: 10px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #aaa;
    transition: all 0.3s ease;
}

.footer-col ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 30px;
    text-align: center;
}

/* ==========================================================================
   10. PAINEL ADMINISTRATIVO (BACKEND)
   ========================================================================== */

/* Sidebar Admin */
.sidebar {
    width: 260px;
    background-color: var(--bg-dark);
    border-right: 1px solid #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    transition: transform 0.3s ease;
}

.brand-box {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.brand-box h4 {
    font-weight: 900;
    color: #fff;
    margin: 0;
    font-style: italic;
}

.brand-box span {
    color: var(--primary);
}

/* Links de Navegação Admin */
.nav-link {
    color: #aaa;
    padding: 14px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-link i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 30px;
}

.nav-link.active {
    color: var(--primary);
    background: rgba(237, 84, 86, 0.1);
    border-left-color: var(--primary);
}

/* Conteúdo Principal Admin */
.main-content {
    margin-left: 260px;
    padding: 30px;
    transition: margin-left 0.3s ease;
}

/* Cards de Estatísticas */
.stat-card {
    background-color: var(--bg-card);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-info h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
    line-height: 1;
}

.stat-icon {
    position: absolute;
    right: 15px;
    bottom: -10px;
    font-size: 5rem;
    color: #fff;
    opacity: 0.05;
    transform: rotate(-15deg);
}

/* Botões de Ação Rápida */
.btn-quick {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    background-color: var(--bg-card);
    border: 1px solid #333;
    color: #aaa;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-quick::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #444;
    transition: background 0.3s ease;
}

.btn-quick:hover::before {
    background: var(--primary);
}

.btn-quick:hover {
    background-color: #2a2b30;
    color: #fff;
    transform: translateY(-3px);
}

.btn-quick i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

/* Cards Customizados */
.card-custom {
    background-color: var(--bg-card);
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.card-header-custom {
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid #333;
    padding: 20px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--primary);
}

/* Formulários Admin */
.form-control,
.form-select {
    background-color: #121212;
    border: 1px solid #444;
    color: #fff;
    padding: 12px;
    font-size: 0.95rem;
}

.form-control:focus {
    background-color: #151515;
    color: #fff;
    border-color: var(--primary);
    box-shadow: none;
    outline: none;
}

.input-group-text {
    background-color: #1f1f1f;
    border-color: #444;
    color: #888;
}

.btn-save {
    background: linear-gradient(90deg, var(--primary), #c0392b);
    border: none;
    padding: 15px;
    font-weight: 800;
    text-transform: uppercase;
    width: 100%;
    border-radius: 8px;
    color: white;
    transition: all 0.3s ease;
    margin-top: 20px;
    cursor: pointer;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 84, 86, 0.3);
    color: white;
}

/* Tabelas Admin */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    vertical-align: middle;
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #aaa;
    font-weight: 700;
    padding: 15px;
    border-bottom: 1px solid #333;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #333;
}

.thumb-img {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #444;
}

.badge-cat {
    background-color: rgba(237, 84, 86, 0.15);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    border: 1px solid rgba(237, 84, 86, 0.3);
    text-transform: uppercase;
}

/* ==========================================================================
   11. RESPONSIVIDADE MOBILE-FIRST
   ========================================================================== */

/* Tablets e Telas Médias (< 991px) */
@media (max-width: 991px) {
    
    /* Menu Hambúrguer */
    .mobile-menu-btn {
        display: block;
        cursor: pointer;
        background: transparent;
        border: none;
        z-index: 1002;
    }

    .mobile-menu-btn .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: #fff;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Menu Mobile */
    .nav-container {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: #121316;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        margin: 0;
        border-top: 1px solid #333;
        overflow-y: auto;
    }

    .nav-container.active {
        transform: translateX(0);
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin-bottom: 20px;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #222;
    }

    .nav-links a {
        display: block;
        padding: 15px 10px;
        font-size: 16px;
        border: none;
        color: #ddd;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(237, 84, 86, 0.1);
        color: var(--primary);
        padding-left: 20px;
    }

    /* Ações do Header Mobile */
    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 15px;
        align-items: stretch;
    }

    .header-search {
        width: 100%;
    }

    .header-search input {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        background: #1a1a1a;
    }

    .header-profile-btn {
        justify-content: center;
        background: #222;
        padding: 15px;
        border-radius: 5px;
        font-size: 16px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    
    /* Layout Geral */
    .main-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .widget-area {
        order: 2;
        margin-top: 20px;
    }

    /* Grids */
    .post-grid,
    .gallery-grid,
    .related-grid,
    .cat-page-grid {
        grid-template-columns: 1fr;
    }

    .cat-box {
        width: 100%;
    }

    /* Hero Banner Mobile */
    .hero-content-box {
        flex-direction: column-reverse;
        padding: 30px 20px;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-meta {
        justify-content: center;
        font-size: 12px;
        gap: 15px;
    }

    .hero-artwork img {
        width: 140px;
        height: 140px;
        margin-bottom: 20px;
        transform: rotate(0);
        border-radius: 50%;
    }

    /* Footer */
    .footer-grid {
        text-align: center;
    }

    .footer-col h4 {
        border-left: none;
        border-bottom: 2px solid var(--primary);
        display: inline-block;
        padding-bottom: 5px;
        padding-left: 0;
    }

    /* Admin Mobile */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
}

/* ==========================================================================
   12. CORREÇÕES ANTI-OVERFLOW & MOBILE IMERSIVO
   ========================================================================== */

/* Trava Global (Impede rolagem lateral) */
html,
body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Ajuste do Wrapper Principal */
.main-wrapper {
    width: 100%;
    max-width: 1140px;
    box-sizing: border-box;
}

/* Mobile - Layout Flexbox */
@media (max-width: 991px) {
    .main-wrapper {
        display: flex;
        flex-direction: column;
        gap: 40px;
        margin-top: 20px;
    }

    .content-area,
    .widget-area {
        width: 100%;
        min-width: 0; /* Fix overflow em Flexbox */
    }

    .widget-area {
        order: 2;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-wrapper {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Banner Mobile Imersivo (Estilo Netflix/App Store) */
@media (max-width: 768px) {
    
    /* Banner Vertical Alto */
    .hero-wrapper {
        margin-bottom: 30px !important;
        height: 400px !important;
        position: relative !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        border: 1px solid #333 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    }

    /* Imagem de Fundo Dominante */
    .hero-bg {
        display: block !important;
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        background-size: cover !important;
        background-position: center center !important;
        filter: brightness(0.8) !important;
        transform: none !important;
        z-index: 0 !important;
    }

    /* Esconde Artwork */
    .hero-artwork {
        display: none !important;
    }

    /* Gradiente Preto Embaixo */
    .hero-content-box {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0.6) 50%, transparent 100%) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        align-items: flex-start !important;
        padding: 25px 20px !important;
        z-index: 2 !important;
    }

    /* Ajustes de Texto */
    .hero-text {
        width: 100% !important;
        text-align: left !important;
    }

    .hero-badge {
        background: var(--primary) !important;
        margin-bottom: 10px !important;
        font-size: 10px !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    }

    .hero-text h1 {
        font-size: 26px !important;
        line-height: 1.1 !important;
        margin-bottom: 8px !important;
        color: #fff !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8) !important;
    }

    /* Metadados */
    .hero-meta {
        justify-content: flex-start !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
        color: #ddd !important;
        font-size: 13px !important;
        gap: 15px !important;
        background: transparent !important;
    }

    .hero-meta li {
        display: inline-block !important;
    }

    /* Botão Full-Width */
    .hero-actions {
        width: 100% !important;
        display: block !important;
    }

    .btn-hero-play {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 14px 0 !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        margin: 0 !important;
        box-shadow: 0 4px 15px rgba(237, 84, 86, 0.6) !important;
    }

    .btn-hero-info {
        display: none !important;
    }
}

/* ==========================================================================
   FIM DO CSS - ApkPortal Pro CMS v2.3.0
   ========================================================================== */