/* ==========================================================================
   STYLE.CSS - VERSÃO FINAL COM PÁGINA 404
   ========================================================================== */

/* 1. VARIÁVEIS E RESET */
:root {
    --bg-body: #0f141b;
    --bg-card: #1c232e;
    --bg-header: #161b24;
    --bg-input: #0b0e13;
    --primary: #ff3e3e;
    --amazon: #f9ce06;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border-color: #2d3748;
    --radius: 12px;
    --container-width: 1280px;
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: var(--bg-body); color: var(--text-main); font-family: 'Segoe UI', system-ui, sans-serif; line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.2s ease; }
img { max-width: 100%; display: block; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

/* 2. HEADER */
.site-header { background: var(--bg-header); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,0.4); transition: all 0.3s ease; }
.header-layout { display: flex; align-items: center; justify-content: space-between; height: 80px; gap: 40px; }
.header-logo { flex-shrink: 0; }
.header-logo img { height: 45px; width: auto; }
.header-search { flex-grow: 1; max-width: 600px; }
.header-controls { flex-shrink: 0; display: flex; align-items: center; gap: 20px; }

.search-input-wrapper { position: relative; width: 100%; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #777; }
#top-search-input { width: 100%; padding: 12px 20px 12px 45px; border-radius: 50px; border: 1px solid var(--border-color); background: var(--bg-input); color: white; font-size: 1rem; transition: 0.3s; }
#top-search-input:focus { border-color: var(--primary); outline: none; background: #000; }

.main-nav a { font-weight: 600; color: var(--text-muted); }
.main-nav a:hover { color: white; }

.lang-switcher { position: relative; }
.lang-switcher button { background: none; border: none; cursor: pointer; padding: 5px; }
.lang-switcher img { width: 28px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.2); }
.lang-dropdown { display: none; position: absolute; top: 100%; right: 0; background: var(--bg-card); padding: 5px; border-radius: 8px; border: 1px solid var(--border-color); min-width: 150px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 2000; margin-top: 10px; }
.lang-switcher:hover .lang-dropdown { display: block; }
.lang-option { display: flex; align-items: center; gap: 10px; padding: 10px; color: #ccc; font-size: 0.9rem; }
.lang-option:hover { background: rgba(255,255,255,0.1); color: white; border-radius: 4px; }
.lang-option img { width: 20px; border: none; }

/* 3. MOBILE HEADER */
@media (max-width: 768px) {
    .header-layout { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "logo controls" "search search"; height: auto; padding: 15px 20px; gap: 15px; }
    .header-logo { grid-area: logo; justify-self: start; }
    .header-controls { grid-area: controls; justify-self: end; gap: 10px; }
    .header-search { grid-area: search; width: 100%; max-width: none; }
    .desktop-only { display: none; }
    
    body.is-scrolled .header-layout { padding: 10px 20px; }
    body.is-scrolled .hide-on-scroll { display: none; }
    body.is-scrolled .header-search { margin-top: 0; }
    body.is-scrolled #top-search-input { padding: 8px 15px 8px 40px; font-size: 0.9rem; height: 40px; }
}

/* 4. HERO & HOME */
.hero-section { height: 400px; background-size: cover; background-position: center; display: flex; align-items: flex-end; margin-bottom: 30px; position: relative; }
.hero-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(to top, var(--bg-body), transparent); }
.hero-content { position: relative; z-index: 2; padding-bottom: 40px; }
.hero-title { font-size: 3rem; margin: 0 0 10px; line-height: 1; color: white; text-shadow: 0 2px 10px black; }
.hero-btn { background: white; color: black; padding: 10px 25px; border-radius: 25px; font-weight: 800; display: inline-block; margin-top: 15px; }

.platform-nav { overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
.platform-grid { display: flex; gap: 15px; }
.plat-card { min-width: 110px; background: var(--bg-card); border: 1px solid var(--border-color); padding: 15px; border-radius: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; color: white; }
.plat-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.plat-icon { font-size: 2rem; margin-bottom: 5px; }

.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.list-header h2 { font-size: 1.8rem; color: white; margin: 0; }
.count-badge { background: #333; color: #ccc; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; padding-bottom: 60px; }
.card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; height: 100%; border: 1px solid transparent; transition: 0.3s; }
.card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.card-img-wrapper { position: relative; padding-top: 56.25%; background: #000; }
.card-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.card-badge-year { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.8); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.card-content { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-info { margin-top: auto; display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.8rem; }
.info-genre { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; }
.pagination { display: flex; justify-content: center; gap: 10px; margin: 40px 0; }
.btn-page { background: var(--bg-card); padding: 10px 20px; border-radius: 8px; border: 1px solid var(--border-color); color: white; font-weight: 600; }
.btn-page:hover { background: var(--primary); border-color: var(--primary); }

/* 5. PÁGINA DO JOGO */
.game-breadcrumb { padding: 20px 0; color: var(--text-muted); font-size: 0.9rem; }
.game-breadcrumb a:hover { color: var(--primary); }
.game-detail-grid { display: grid; grid-template-columns: 350px 1fr; gap: 40px; margin-bottom: 60px; align-items: start; }
.poster-wrapper { position: relative; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.game-poster-img { width: 100%; display: block; transition: transform 0.3s; }
.poster-wrapper:hover .game-poster-img { transform: scale(1.02); }
.zoom-hint { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.7); color: white; text-align: center; padding: 8px; opacity: 0; transition: 0.3s; }
.poster-wrapper:hover .zoom-hint { opacity: 1; }

.game-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.btn-amazon { background: var(--amazon); color: #111; font-weight: 800; text-align: center; padding: 14px; border-radius: 8px; display: block; box-shadow: 0 4px 10px rgba(249, 206, 6, 0.2); transition: transform 0.2s; }
.btn-amazon:hover { background: #ffd700; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(249, 206, 6, 0.4); }
.btn-fav { background: #333; color: white; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; font-weight: 600; width: 100%; transition: 0.2s; }
.btn-fav:hover { background: #444; }

.share-buttons { margin-top: 10px; background: rgba(255,255,255,0.03); padding: 10px; border-radius: 8px; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
.btn-share { text-align: center; font-size: 0.8rem; padding: 5px; border-radius: 4px; font-weight: 600; color: white; display: block; }
.btn-share.wa { background: #25D366; }
.btn-share.tg { background: #0088cc; }
.btn-share.tw { background: #000; border: 1px solid #333; }
.btn-share:hover { opacity: 0.8; transform: translateY(-2px); }

.quick-specs { margin-top: 25px; background: rgba(255,255,255,0.03); padding: 20px; border-radius: 8px; border: 1px solid var(--border-color); }
.spec-row { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.05); padding: 8px 0; }
.spec-row:last-child { border: none; }

.game-main-title { font-size: 3rem; line-height: 1.1; margin-bottom: 15px; color: white; }
.game-meta-tags { display: flex; gap: 10px; margin-bottom: 30px; }
.meta-tag { background: var(--bg-card); padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border-color); color: #ccc; font-size: 0.9rem; }
.meta-tag.score { border-color: #10b981; color: #10b981; font-weight: bold; }

.game-videos-wrapper { margin-bottom: 40px; }
.game-videos-wrapper h3 { color: white; margin-bottom: 15px; border-left: 4px solid var(--primary); padding-left: 10px; }
.videos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.video-card { background: #000; border-radius: 8px; overflow: hidden; position: relative; border: 1px solid #333; }
.video-label { position: absolute; top: 0; left: 0; background: var(--primary); color: white; font-size: 0.7rem; padding: 3px 10px; z-index: 10; border-bottom-right-radius: 8px; font-weight: bold; text-transform: uppercase; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.game-description { background: var(--bg-card); padding: 30px; border-radius: var(--radius); border: 1px solid var(--border-color); }
.game-description h3 { color: white; margin-bottom: 15px; font-size: 1.3rem; }
.text-content { color: #d1d5db; font-size: 1.05rem; line-height: 1.8; }
.related-section { margin-top: 50px; }

/* 6. ESTILOS DA PÁGINA 404 (NOVO) */
.error-container { display: flex; align-items: center; justify-content: center; min-height: 60vh; text-align: center; }
.error-content { max-width: 600px; padding: 40px; background: var(--bg-card); border-radius: 20px; border: 1px solid var(--border-color); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.error-code { font-size: 8rem; font-weight: 800; line-height: 1; color: var(--primary); margin: 0; text-shadow: 4px 4px 0px rgba(255,255,255,0.1); letter-spacing: -5px; }
.error-title { font-size: 2rem; margin: 10px 0 20px; color: white; }
.error-desc { color: var(--text-muted); margin-bottom: 30px; font-size: 1.1rem; }
.error-search { margin-bottom: 30px; position: relative; }
.error-search input { width: 100%; padding: 15px 20px; border-radius: 50px; border: 1px solid var(--border-color); background: var(--bg-input); color: white; font-size: 1rem; }
.error-search button { position: absolute; right: 10px; top: 5px; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* 7. MODAL & FOOTER */
.modal { display: none; position: fixed; z-index: 2100; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.95); align-items: center; justify-content: center; flex-direction: column; }
.modal-content { margin: auto; display: block; max-width: 90%; max-height: 85vh; border-radius: 8px; box-shadow: 0 0 50px rgba(0,0,0,0.8); animation: zoom 0.3s; }
.close-modal { position: absolute; top: 20px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; }
.close-modal:hover { color: var(--primary); }
@keyframes zoom { from {transform:scale(0)} to {transform:scale(1)} }

.site-footer { background: var(--bg-header); border-top: 1px solid var(--border-color); padding: 40px 0; text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-top: 60px; }
#backToTop { position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px; background: var(--primary); color: white; border: none; border-radius: 50%; font-size: 1.5rem; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.5); z-index: 9999; opacity: 0; visibility: hidden; transform: translateY(20px); transition: 0.3s; }
#backToTop.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* 8. RESPONSIVIDADE */
@media (max-width: 1024px) { .videos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .game-detail-grid { grid-template-columns: 1fr; } .game-poster-img { max-width: 350px; margin: 0 auto; } }
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-section { height: 300px; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .videos-grid { grid-template-columns: 1fr; }
    .platform-grid { padding: 0 10px; }
}
@media (max-width: 480px) { .cards-grid { grid-template-columns: 1fr; } }

/* 9. RTL */
body:lang(ar), body:lang(he) { direction: rtl; text-align: right; }
body:lang(ar) .game-description h3, body:lang(he) .game-description h3 { border-left: none; border-right: 4px solid var(--primary); padding-left: 0; padding-right: 10px; }
body:lang(ar) .game-videos-wrapper h3, body:lang(he) .game-videos-wrapper h3 { border-left: none; border-right: 4px solid var(--primary); padding-left: 0; padding-right: 10px; }
body:lang(ar) .video-label, body:lang(he) .video-label { left: auto; right: 0; border-bottom-right-radius: 0; border-bottom-left-radius: 8px; }
body:lang(ar) .lang-dropdown, body:lang(he) .lang-dropdown { right: auto; left: 0; }