/*
Theme Name: GameVerse
Theme URI: https://gameverse.com
Author: GameVerse
Author URI: https://gameverse.com
Description: Tema GameVerse - Catálogo de Download de Jogos
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gameverse
Tags: dark, gaming, downloads, custom-menu, custom-logo, full-width-template
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===================== RESET & BASE ===================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #0a0f1a;
    min-height: 100vh;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1f2937; }
::-webkit-scrollbar-thumb { background: #4f46e5; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6366f1; }

.scrollbar-hide { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ===================== UTILITIES ===================== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===================== GLASSMORPHISM ===================== */
.glassmorphism {
    background: rgba(31, 41, 55, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ===================== GRADIENT BORDER ===================== */
.gradient-border {
    position: relative;
    border-radius: 0.5rem;
    background: linear-gradient(to right, #4f46e5, #10b981);
    padding: 1px;
}

/* ===================== GAME CARD ===================== */
.game-card { transition: transform 0.3s ease; }
.game-card:hover { transform: translateY(-5px); }

.game-card .card-inner {
    background: #1a1f2e;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
}

.game-card:hover .card-inner { transform: scale(1.02); }

.game-card .card-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(to right, #4f46e5, #10b981);
    border-radius: 0.875rem;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.game-card:hover .card-glow { opacity: 0.7; }

.game-card .card-image-wrap {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: linear-gradient(135deg, #312e81, #1f2937);
}

.game-card .card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.game-card .card-bottom-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0a0e17 0%, transparent 60%);
    z-index: 2;
}

.game-card .card-year {
    position: absolute;
    top: 0; left: 0;
    z-index: 20;
    background: linear-gradient(to right, #059669, #10b981);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.game-card .card-download-badge {
    position: absolute;
    bottom: 44px; left: 8px;
    z-index: 20;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    color: #34d399;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.game-card:hover .card-download-badge { opacity: 1; }

.game-card .card-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(49,46,129,0.95) 0%, rgba(49,46,129,0.6) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 30;
}

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

.game-card .card-hover-content {
    position: absolute;
    inset-x: 0; bottom: 0;
    padding: 16px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 31;
    pointer-events: none;
}

.game-card:hover .card-hover-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.game-card .card-default-title {
    position: absolute;
    inset-x: 0; bottom: 0;
    padding: 12px;
    z-index: 20;
    transition: opacity 0.2s ease;
}

.game-card:hover .card-default-title { opacity: 0; }

/* ===================== CAROUSEL / ROW ===================== */
.carousel-row {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 8px;
    display: flex;
    gap: 16px;
}

.carousel-row::-webkit-scrollbar { display: none; }

/* ===================== HERO SECTION ===================== */
.hero-section {
    position: relative;
    height: 550px;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay-lr {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #0a0e17 0%, rgba(10,14,23,0.7) 50%, transparent 100%);
}

.hero-overlay-tb {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0a0e17 0%, transparent 40%, rgba(10,14,23,0.3) 100%);
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes slideProgress {
    from { width: 0%; }
    to { width: 100%; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fadeIn { animation: fadeIn 0.3s ease-out; }
.animate-slideIn { animation: slideIn 0.3s ease-out; }
.animate-shimmer { animation: shimmer 1.5s infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ===================== HEADER ===================== */
#site-header {
    position: sticky;
    top: 0;
    z-index: 50;
}

#site-header nav {
    background: rgba(13, 19, 33, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

#site-header .header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

#site-header .header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #4f46e5, #10b981);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(79,70,229,0.2);
    transition: box-shadow 0.3s;
    flex-shrink: 0;
}

.logo-icon:hover { box-shadow: 0 4px 20px rgba(79,70,229,0.4); }

.logo-text h1 { font-size: 18px; font-weight: 700; color: white; transition: color 0.2s; }
.logo-text p { font-size: 10px; color: #6b7280; margin-top: -2px; }
.logo-wrap:hover .logo-text h1 { color: #818cf8; }

.nav-links { display: none; gap: 4px; }
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    transition: all 0.2s;
}

.nav-link:hover { color: white; background: rgba(55,65,81,0.3); }
.nav-link.active { color: white; background: rgba(55,65,81,0.5); }
.nav-link.mobile-link { color: #818cf8; }
.nav-link.mobile-link:hover { color: white; background: rgba(79,70,229,0.2); }
.nav-link.mobile-link.active { color: white; background: rgba(79,70,229,0.3); }

.search-bar {
    border-top: 1px solid rgba(55,65,81,0.5);
    padding: 16px;
    display: none;
}

.search-bar.open { display: block; animation: fadeIn 0.2s ease-out; }

.search-form { max-width: 672px; margin: 0 auto; position: relative; }

.search-input {
    width: 100%;
    background: rgba(55,65,81,0.5);
    color: white;
    padding: 12px 80px 12px 48px;
    border-radius: 12px;
    border: 1px solid rgba(75,85,99,0.5);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus { border-color: #4f46e5; }
.search-input::placeholder { color: #6b7280; }
.search-input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #6b7280; }

.search-submit {
    position: absolute; right: 44px; top: 50%; transform: translateY(-50%);
    padding: 6px 12px;
    background: #4f46e5;
    color: white;
    font-size: 13px;
    border-radius: 8px;
    transition: background 0.2s;
}

.search-submit:hover { background: #4338ca; }

.search-close {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    color: #6b7280;
    transition: color 0.2s;
}

.search-close:hover { color: white; }

/* ===================== FOOTER ===================== */
#site-footer {
    background: #0a0f1a;
    border-top: 1px solid rgba(55,65,81,0.5);
    margin-top: 64px;
}

#site-footer .footer-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 16px;
}

#site-footer .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    #site-footer .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-logo-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #4f46e5, #10b981);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.footer-social a {
    width: 40px; height: 40px;
    background: rgba(55,65,81,0.5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.2s;
}

.footer-bottom {
    border-top: 1px solid rgba(55,65,81,0.5);
}

.footer-bottom-inner {
    max-width: 1152px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

@media (min-width: 768px) { .footer-bottom-inner { flex-direction: row; } }

/* ===================== STATS BAR ===================== */
.stats-bar {
    position: relative;
    z-index: 20;
    max-width: 1280px;
    margin: -64px auto 0;
    padding: 0 16px;
}

.stats-card {
    background: rgba(17,24,39,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(55,65,81,0.5);
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-item { text-align: center; }
.stat-item:not(:last-child) { border-right: none; }
@media (min-width: 768px) { .stat-item:not(:last-child) { border-right: 1px solid rgba(55,65,81,0.5); } }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 20px;
}

.stat-number { font-size: 24px; font-weight: 700; color: white; }
.stat-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ===================== GAME DETAILS ===================== */
.game-details-bg {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 600px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.game-details-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: blur(5px) saturate(1.5);
    transform: scale(1.1);
    opacity: 0.2;
}

.game-details-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, transparent 40%, #0f1726 100%);
}

/* Image slider */
.img-slider-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #111827; aspect-ratio: 16/9; }

.img-slide {
    position: absolute;
    inset: 0;
    transition: transform 0.5s ease-in-out;
}

.img-slide.active { transform: translateX(0); z-index: 10; }
.img-slide.prev.slide-next { transform: translateX(-100%); }
.img-slide.prev.slide-prev { transform: translateX(100%); }
.img-slide.next { transform: translateX(100%); }
.img-slide.next.slide-prev { transform: translateX(-100%); }

.slide-progress-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: rgba(0,0,0,0.5);
    z-index: 20;
}

.slide-progress-fill {
    height: 100%;
    background: #4f46e5;
    animation: slideProgress 4s linear forwards;
}

/* Thumbnail strip */
.thumb-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; cursor: grab; user-select: none; }
.thumb-strip::-webkit-scrollbar { display: none; }
.thumb-strip.grabbing { cursor: grabbing; }

.thumb-btn {
    flex-shrink: 0;
    width: 80px; height: 44px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s;
}

.thumb-btn:hover { opacity: 1; }
.thumb-btn.active { border-color: #4f46e5; opacity: 1; }
.thumb-btn.trailer-active { border-color: #ef4444; opacity: 1; }

.thumb-btn img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* Tabs */
.tab-bar { border-bottom: 1px solid #1f2937; display: flex; gap: 4px; }

.tab-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    color: #9ca3af;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover { color: white; }
.tab-btn.active { border-bottom-color: #4f46e5; color: white; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease-out; }

/* Download item */
.download-item {
    background: rgba(55,65,81,0.3);
    border: 1px solid rgba(75,85,99,0.5);
    border-radius: 12px;
    padding: 16px;
    transition: background 0.2s;
}

.download-item:hover { background: rgba(55,65,81,0.5); }
.download-item.highlight { border-color: rgba(79,70,229,0.7); animation: pulse 2s ease-in-out; box-shadow: 0 0 0 2px rgba(79,70,229,0.3); }

/* Image Modal */
.image-modal {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    display: none;
}

.image-modal.open { display: flex; animation: fadeIn 0.2s ease-out; }

/* ===================== EXPLORE PAGE ===================== */
.filter-bar {
    position: sticky;
    top: 64px;
    z-index: 40;
    background: rgba(10,15,26,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(55,65,81,0.5);
    padding: 16px;
}

.filter-bar-inner { max-width: 1280px; margin: 0 auto; }

.filter-row { display: flex; gap: 12px; flex-wrap: wrap; }

.filter-input, .filter-select {
    background: rgba(55,65,81,0.5);
    color: white;
    border: 1px solid rgba(75,85,99,0.5);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.filter-input:focus, .filter-select:focus { border-color: #4f46e5; }
.filter-input::placeholder { color: #6b7280; }
.filter-select option { background: #1f2937; }

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(79,70,229,0.2);
    border: 1px solid rgba(79,70,229,0.4);
    border-radius: 9999px;
    font-size: 12px;
    color: #a5b4fc;
}

.filter-pill button { color: #6366f1; transition: color 0.2s; padding: 0; line-height: 1; }
.filter-pill button:hover { color: white; }

/* Game grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) { .games-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 768px) { .games-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .games-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1280px) { .games-grid { grid-template-columns: repeat(6, 1fr); } }

/* ===================== LOADING SPINNER ===================== */
.spinner {
    width: 48px; height: 48px;
    border: 4px solid rgba(79,70,229,0.3);
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===================== BREADCRUMB ===================== */
.breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.breadcrumb a { color: #6b7280; transition: color 0.2s; }
.breadcrumb a:hover { color: white; }
.breadcrumb .sep { color: #374151; }
.breadcrumb .current { color: white; font-weight: 500; }

/* ===================== ADMIN PAGES ===================== */
.gv-admin-wrap { max-width: 900px; margin: 20px auto; padding: 20px; font-family: 'Inter', sans-serif; }
.gv-admin-wrap h1 { font-size: 24px; color: #1e293b; margin-bottom: 20px; }
.gv-card { background: white; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px; }
.gv-progress-bar { height: 20px; background: #e2e8f0; border-radius: 10px; overflow: hidden; margin-top: 10px; }
.gv-progress-fill { height: 100%; background: linear-gradient(to right, #4f46e5, #10b981); transition: width 0.3s; }

/* ===================== MOBILE RESPONSIVE ===================== */
@media (max-width: 640px) {
    .hero-section { height: 420px; }
    .stats-bar { margin-top: -40px; }
}

/* ===================== WP OVERRIDES ===================== */
.wp-block-image { margin: 0; }
.alignnone, .aligncenter, .alignleft, .alignright { max-width: 100%; }
