/* style.css (Versão com correções de responsividade) */
:root {
    --bg-dark: #10101a;
    --bg-light: #1d1d2b;
    --bg-card-front: #252538;
    --bg-card-back: #2a2a3f;
    --text-primary: #f5f5fa;
    --text-secondary: #a0a0b8;
    --accent-primary: #ff3c9a;
    --accent-secondary: #00e5ff;
    --favorite-color: #ffd700;
    --border-color: #3a3a50;
    --font-family-body: 'Poppins', sans-serif;
    --font-family-title: 'Press Start 2P', cursive;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --glow-primary: rgba(255, 60, 154, 0.7);
    --glow-secondary: rgba(0, 229, 255, 0.7);
    --accent-gradient: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: var(--font-family-body); 
    background-color: #0b021a;
    color: var(--text-primary); 
    line-height: 1.6; 
    overflow-x: hidden; 
    opacity: 0;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, white, transparent),
        radial-gradient(1px 1px at 40px 70px, white, transparent),
        radial-gradient(2px 2px at 50px 160px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 200px, 150px 150px, 300px 300px;
    background-position: 0 0, 0 0, 0 0;
}

@keyframes pageEnter { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes pageExit { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.05); } }

body.page-enter { animation: pageEnter 0.4s ease-out forwards; }
body.page-exit { animation: pageExit 0.4s ease-in forwards; }

.container { max-width: 1300px; margin: 0 auto; padding: 2rem; position: relative; z-index: 2; }

.site-header {
    padding: clamp(4rem, 15vh, 8rem) 2rem; /* CORRIGIDO: Padding responsivo */
    border-bottom: 3px solid var(--accent-secondary);
    position: relative;
    overflow: hidden;
    background: linear-gradient(to top, rgba(255, 60, 154, 0.5) -20%, #3d1b46 30%, #0c0a18 70%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-animation {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 100%;
    perspective: 400px;
    z-index: 1;
}

.header-animation::before, .header-animation::after { content: ''; position: absolute; }
.header-animation::before {
    bottom: 50%; left: 50%; width: 200px; height: 200px;
    background: #f9f871; border-radius: 50%;
    transform: translateX(-50%); box-shadow: 0 0 150px 40px rgba(248, 176, 66, 0.4);
    animation: sun-flicker 20s infinite alternate ease-in-out;
}
.header-animation::after {
    bottom: 0; left: 50%; width: 200%; height: 100%;
    transform: translateX(-50%) rotateX(78deg); transform-origin: bottom center;
    background: repeating-linear-gradient(var(--accent-secondary), var(--accent-secondary) 1px, transparent 1px, transparent 40px),
                repeating-linear-gradient(90deg, var(--accent-secondary), var(--accent-secondary) 1px, transparent 1px, transparent 40px);
    animation: grid-move-fast 6s linear infinite; opacity: 0.6;
}
.header-content { position: relative; z-index: 3; text-align: center; }
.site-header h1 {
    font-family: var(--font-family-title); font-size: clamp(2.8rem, 8vw, 5.5rem);
    color: var(--text-primary); position: relative;
    text-shadow: 1px 1px 0px #cecece, 2px 2px 0px #a0a0b8, 3px 3px 0px #7b7b92, 4px 4px 2px rgba(0,0,0,0.6);
    animation: bobbing-effect 4s infinite ease-in-out, glow-up-effect 2.5s infinite alternate ease-in-out;
    margin-bottom: 2rem;
}
.site-header h2 { 
    font-family: 'Poppins', sans-serif; font-weight: 600; font-size: clamp(1.2rem, 3vw, 1.5rem); 
    color: #f5f5fa; letter-spacing: 1px;
    text-shadow: 0 0 8px var(--glow-primary), 0 0 12px var(--glow-primary);
    position: relative; overflow: hidden; display: inline-block; padding: 0.2rem;
}
.site-header h2::after {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; background: #4a1e54;
    animation: wipe-in 1.5s 0.5s ease-out forwards;
}

@keyframes bobbing-effect { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes glow-up-effect {
    from { text-shadow: 1px 1px 0 #cecece, 2px 2px 0 #a0a0b8, 3px 3px 0 #7b7b92, 4px 4px 2px #0006, 0 0 5px #00e5ff88, 0 0 10px #00e5ff88; }
    to { text-shadow: 1px 1px 0 #cecece, 2px 2px 0 #a0a0b8, 3px 3px 0 #7b7b92, 4px 4px 2px #0006, 0 0 15px #00e5ff, 0 0 25px #00e5ff; }
}
@keyframes sun-flicker { from { opacity: 0.5; } to { opacity: 0.6; } }
@keyframes grid-move-fast { from { transform: translateX(-50%) rotateX(78deg) translateY(0); } to { transform: translateX(-50%) rotateX(78deg) translateY(200px); } }
@keyframes wipe-in { from { transform: translateX(0); } to { transform: translateX(101%); } }

#filter-section { display: flex; justify-content: center; margin-bottom: 0; }
.filter-menu { position: relative; z-index: 10; }
.filter-menu-button { display: flex; align-items: center; gap: 0.5rem; background: var(--bg-light); border: 2px solid var(--border-color); color: var(--text-primary); padding: 0.8rem 1.8rem; border-radius: 50px; cursor: pointer; font-size: 1rem; font-weight: 600; transition: all 0.3s ease; }
.filter-menu-button:hover, .filter-menu.active .filter-menu-button { border-color: var(--accent-primary); box-shadow: 0 0 15px var(--glow-primary); }
.filter-menu-button .arrow-down { transition: transform 0.3s ease; }
.filter-menu.active .filter-menu-button .arrow-down { transform: rotate(180deg); }
.filter-dropdown-content { display: none; position: absolute; top: 110%; left: 50%; transform: translateX(-50%); background: var(--bg-light); border: 2px solid var(--border-color); border-radius: 12px; padding: 0.8rem; width: 300px; max-height: 40vh; overflow-y: auto; box-shadow: 0 10px 30px var(--shadow-color); }
.filter-menu.active .filter-dropdown-content { display: block; }
.filter-item { background: transparent; border: none; color: var(--text-secondary); padding: 0.7rem 1.2rem; width: 100%; text-align: left; border-radius: 8px; cursor: pointer; font-size: 0.95rem; font-weight: 600; text-transform: capitalize; transition: all 0.2s ease; }
.filter-item:hover { background-color: var(--bg-card-front); color: var(--text-primary); }
.filter-item.active { background: var(--accent-gradient); color: white; }

/* Ad Containers */
.ad-banner-container {
    margin: 2rem auto;
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(29, 29, 43, 0.5);
    border-radius: 8px;
}

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2rem; margin-top: 3rem; }
.game-card { background-color: transparent; width: 100%; aspect-ratio: 3 / 4.2; perspective: 1500px; text-decoration: none; opacity: 0; transform: translateY(30px); animation: card-fade-in 0.6s ease-out forwards; cursor: pointer; }
.card-flipper { position: relative; width: 100%; height: 100%; transition: transform 0.8s; transform-style: preserve-3d; }
.game-card:hover .card-flipper, .game-card.is-flipped .card-flipper { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 25px var(--shadow-color); }
.card-front { background-color: var(--bg-card-front); border: 2px solid var(--border-color); transition: border-color 0.4s ease; }
.game-card:hover .card-front { border-color: var(--accent-primary); }
.card-thumbnail { width: 100%; height: 100%; object-fit: cover; }
.card-back { background: var(--bg-card-back); border: 2px solid var(--accent-primary); transform: rotateY(180deg); padding: 1.2rem; display: flex; flex-direction: column; color: var(--text-primary); overflow: hidden; position: relative; }
.favorite-btn { position: absolute; top: 1rem; right: 1rem; background: none; border: none; cursor: pointer; padding: 0.5rem; z-index: 5; }
.favorite-btn svg { width: 28px; height: 28px; stroke: var(--favorite-color); stroke-width: 1.5; fill: none; transition: all 0.3s ease; }
.favorite-btn:hover svg { transform: scale(1.1); }
.favorite-btn.active svg { fill: var(--favorite-color); stroke: none; }

.card-back-content, .card-back-share {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    padding: 1.2rem; display: flex; flex-direction: column;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.card-back-content { opacity: 1; transform: translateX(0); }
.card-back-share { opacity: 0; transform: translateX(100%); pointer-events: none; }
.card-back.is-showing-share .card-back-content { opacity: 0; transform: translateX(-100%); pointer-events: none; }
.card-back.is-showing-share .card-back-share { opacity: 1; transform: translateX(0); pointer-events: auto; }

.card-content { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.card-content h4 { font-size: 1.4rem; margin-bottom: 0.5rem; font-weight: 700; padding-right: 30px; line-height: 1.2; }
.card-content p { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.8rem; overflow-y: auto; flex-grow: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.card-tags .tag { font-size: 0.7rem; font-weight: 600; padding: 0.25rem 0.7rem; background-color: rgba(0, 229, 255, 0.1); border-radius: 20px; color: var(--accent-secondary); text-transform: capitalize; }
.play-now-btn { display: block; width: 100%; padding: 0.7rem 1rem; margin-top: auto; margin-bottom: 0.8rem; background: var(--accent-gradient); color: white; text-align: center; font-size: 1.1rem; font-weight: 700; border-radius: 8px; text-decoration: none; transition: transform 0.3s ease, box-shadow 0.3s ease; border: none; cursor: pointer; }
.play-now-btn:hover { transform: scale(1.05); box-shadow: 0 0 20px var(--glow-primary); }
.card-actions { display: flex; justify-content: center; flex-shrink: 0; } 
.share-btn-main { background: var(--bg-card-front); border: 1px solid var(--border-color); color: var(--text-secondary); padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: all 0.3s ease; width: 100%; }
.share-btn-main:hover { color: var(--text-primary); border-color: var(--accent-secondary); }

.share-view-header { display: flex; align-items: center; margin-bottom: 1rem; }
.share-view-back-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1.5rem; line-height: 1; padding: 0 0.5rem 0 0; transition: color 0.3s; }
.share-view-back-btn:hover { color: var(--text-primary); }
.share-view-header h5 { font-size: 1.2rem; font-weight: 600; }
.share-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.share-grid-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text-secondary); transition: color 0.3s, transform 0.3s; }
.share-grid-item:hover { transform: scale(1.1); }
.share-grid-item .icon { width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-bottom: 0.5rem; background: var(--bg-card-front); }
.share-grid-item .icon svg { width: 20px; height: 20px; fill: currentColor; }
.share-grid-item span { font-size: 0.75rem; font-weight: 600; }
.share-grid-item:hover.twitter { color: #1DA1F2; }
.share-grid-item:hover.facebook { color: #1877F2; }
.share-grid-item:hover.reddit { color: #FF4500; }
.share-grid-item:hover.linkedin { color: #0A66C2; }
.copy-link-container { display: flex; }
.copy-link-input { flex-grow: 1; background: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px 0 0 8px; padding: 0.7rem; color: var(--text-primary); font-size: 0.9rem; }
.copy-link-btn { background: var(--accent-gradient); border: none; color: white; padding: 0.7rem 1.2rem; border-radius: 0 8px 8px 0; cursor: pointer; font-weight: 600; transition: filter 0.3s; }
.copy-link-btn:hover { filter: brightness(1.2); }

.ad-card {
    background-color: var(--bg-card-front);
    border: 2px dashed var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    cursor: default;
}

.site-footer-bottom { text-align: center; padding: 2.5rem; margin-top: 4rem; border-top: 1px solid var(--border-color); color: var(--text-secondary); font-size: 0.9rem; position: relative; z-index: 5; background: #0b021a; }
.footer-links { margin-top: 1rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--accent-primary); }
@keyframes card-fade-in { to { opacity: 1; transform: translateY(0); } }
.game-card.hidden { display: none; }

@media (max-width: 1200px) { .game-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; } }
@media (max-width: 480px) { 
    .site-header h1 { 
        line-height: 1.2; 
        /* CORRIGIDO: Reduz a sombra para melhor legibilidade */
        text-shadow: 1px 1px 0 #a0a0b8, 2px 2px 2px rgba(0,0,0,0.6);
    } 
    .site-header h2 { font-size: 1rem; } 
    .game-grid { grid-template-columns: 1fr; gap: 2rem; } 
    .filter-dropdown-content { width: 90vw; } 
}

.page-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2.5rem;
    background: rgba(11, 2, 26, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 2px solid var(--accent-secondary);
    box-shadow: 0 0 20px var(--glow-secondary);
    position: relative;
    z-index: 5;
}
.page-container h1 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--text-primary); }
.page-container h2 { font-size: 1.8rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--accent-secondary); border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.page-container p, .page-container ul { margin-bottom: 1rem; color: var(--text-secondary); line-height: 1.7; }
.page-container ul { padding-left: 20px; }
.page-container a { color: var(--accent-primary); text-decoration: none; }
.page-container a:hover { text-decoration: underline; }

.back-link { 
    display: inline-block; 
    margin-bottom: 2rem; 
    color: var(--accent-primary); 
    text-decoration: none; 
    font-weight: 600;
    transition: text-shadow 0.3s ease, color 0.3s ease;
}
.back-link:hover {
    color: #ff7fbe;
    text-shadow: 0 0 8px var(--glow-primary);
}