/* Reset básico */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; }
body { background: #0f1115; color: #fff; min-height: 100vh; display: flex; flex-direction: column; }

/* Cabeçalho */
header {
    background: #161b22;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #30363d;
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo { font-size: 24px; font-weight: bold; color: #fff; letter-spacing: 1px; }
.logo span { color: #00d4ff; }
.search-bar input {
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid #30363d;
    background: #0d1117;
    color: #fff;
    outline: none;
    width: 250px;
    transition: border 0.3s;
}
.search-bar input:focus { border-color: #00d4ff; box-shadow: 0 0 10px rgba(0, 212, 255, 0.2); }

/* Conteúdo Principal */
main { flex: 1; padding: 40px 5%; max-width: 1400px; margin: 0 auto; width: 100%; }
.page-title { margin-bottom: 30px; font-size: 28px; border-left: 4px solid #00d4ff; padding-left: 10px; }

/* Grade de Jogos */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}
.no-results { color: #8b949e; font-style: italic; grid-column: 1 / -1; text-align: center; margin-top: 50px;}

/* Cartão do Jogo */
.game-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}
.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: #00d4ff;
}

/* Capa do Jogo (Emoji provisório) */
.game-thumb {
    height: 140px;
    background: #0d1117;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    border-bottom: 1px solid #30363d;
    transition: background 0.3s;
}
.game-card:hover .game-thumb { background: #1a2233; }

/* Informações do Jogo */
.game-info { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.game-category {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: #00d4ff;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.game-info h2 { font-size: 18px; margin-bottom: 8px; }
.game-info p { font-size: 13px; color: #8b949e; line-height: 1.4; flex: 1; }

/* Rodapé */
footer { text-align: center; padding: 30px; color: #8b949e; font-size: 14px; border-top: 1px solid #30363d; background: #161b22; }

/* Responsividade para celular */
@media (max-width: 600px) {
    header { flex-direction: column; gap: 15px; }
    .search-bar input { width: 100%; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
    .game-thumb { height: 100px; font-size: 40px; }
    .game-info h2 { font-size: 16px; }
    .game-info p { display: none; }
}

/* =========================================
   POPUP DE AVISO
========================================= */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.popup-box {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s;
}
.popup-overlay.active .popup-box {
    transform: translateY(0);
}
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #30363d;
    color: #8b949e;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}
.popup-close:hover {
    background: #ef4444;
    color: #fff;
}
.popup-icon {
    font-size: 50px;
    margin-bottom: 15px;
}
.popup-box h2 {
    font-size: 22px;
    margin-bottom: 10px;
}
.popup-box h2 span { color: #00d4ff; }
.popup-box p {
    color: #8b949e;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
}
.btn-popup {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00d4ff, #0066ff);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(0,150,255,0.3);
}
.btn-popup:hover {
    transform: scale(1.03);
}