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

/* ================================================= */
/* ============= ESTILOS GERAIS DO SITE ============ */
/* ================================================= */

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 10px;
}

.container {
    max-width: 1100px;
    margin: auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
}

header h1 {
    color: #e63946;
}

.search-container {
    margin-bottom: 20px;
}

#searchInput {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

/* ================================================= */
/* ========= ESTILOS DA TABELA DE POKÉMON ========== */
/* ================================================= */

#pokemonTable {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; 
}

#pokemonTable th, #pokemonTable td {
    border-bottom: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    overflow-wrap: break-word;
    word-wrap: break-word;
    vertical-align: top;
}

#pokemonTable th {
    background-color: #457b9d;
    color: white;
    text-transform: uppercase;
    font-size: 14px;
}

#pokemonTable td[rowspan] {
    vertical-align: middle;
}

.pokemon-row:hover {
    background-color: #f1f1f1;
}

.location-header td {
    background-color: #1d3557;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    padding-left: 20px;
}

.pokemon-cell {
    display: flex;
    align-items: center;
}

.pokemon-cell img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.pokemon-cell span {
    font-weight: bold;
}

/* Tag Styling */
.tag {
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

/* Rarity Colors */
.rarity-common { background-color: #2a9d8f; }
.rarity-uncommon { background-color: #e9c46a; }
.rarity-rare { background-color: #f4a261; }
.rarity-very-rare { background-color: #e76f51; }
.rarity-epic { background-color: #dda15e; }
.rarity-unique { background-color: #a8dadc; color: #1d3557;}
.rarity-unknown { background-color: #8d99ae; }

/* Method Colors */
.method-grass { background-color: #60a162; }
.method-cave { background-color: #7f5539; }
.method-floor { background-color: #6c757d; }
.method-gift { background-color: #457b9d; }
.method-headbutt { background-color: #a5a58d; }
.method-surf { background-color: #0077b6; }
.method-fishing { background-color: #00b4d8; }
.method-trade { background-color: #8338ec; }
.method-rocksmash { background-color: #b08968; }
.method-unique { background-color: #ffc300; color: #1d3557;}
.method-quest { background-color: #5a189a; }
.method-eggdrop { background-color: #ffafcc; color: #1d3557; }
.method-fossil { background-color: #cdb4db; color: #1d3557; }
.method-event { background-color: #f72585; }
.method-bugcontest { background-color: #7b2cbf; }

/* ================================================= */
/* ===== ESTILOS PARA CARDS DE SELEÇÃO (INDEX) ===== */
/* ================================================= */

.region-selection {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px; /* Espaço entre os cards */
    padding: 20px 0;
}

.region-card {
    width: 300px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative; /* Necessário para o "Coming Soon" badge */
}

.region-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.region-card img {
    width: 100%;
    height: 160px;
    object-fit: cover; /* Garante que a imagem cubra a área sem distorcer */
}

.region-card-content {
    padding: 20px;
    flex-grow: 1;
}

.region-card-content h2 {
    margin-top: 0;
    color: #1d3557;
}

.region-card-content p {
    font-size: 0.9em;
    color: #555;
}

/* Estilos para o card desativado */
.region-card.disabled {
    filter: grayscale(80%);
    cursor: not-allowed;
}

.region-card.disabled:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e63946;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 1;
}

/* ================================================= */
/* ==== ESTILOS PARA HEADER DA PÁGINA PRINCIPAL ==== */
/* ================================================= */

.splash-logo {
    max-width: 150px;
    margin-bottom: 20px;
}

.credits {
    font-size: 0.9em;
    font-style: italic;
    color: #555;
    margin-top: -10px;
    margin-bottom: 20px;
}

.credits a {
    color: #0077b6;
    text-decoration: none;
}

.credits a:hover {
    text-decoration: underline;
}


/* ================================================= */
/* ============== ESTILOS PARA MOBILE ============== */
/* ================================================= */

@media screen and (max-width: 768px) {
    
    * {
        box-sizing: border-box;
    }

    body {
        padding: 5px;
    }

    #pokemonTable thead {
        display: none;
    }

    #pokemonTable, #pokemonTable tbody, #pokemonTable tr, #pokemonTable td {
        display: block;
        width: 100%;
    }

    #pokemonTable tr.pokemon-row {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        overflow: hidden; 
    }

    /* Regra geral para as células de DADOS */
    #pokemonTable td {
        border: none;
        border-bottom: 1px solid #f0f0f0;
        padding: 12px 15px; 
        text-align: right;
        overflow: hidden; 
    }

    #pokemonTable tr.pokemon-row td:last-child {
        border-bottom: none;
    }
    
    #pokemonTable td::before {
        content: attr(data-label);
        font-weight: bold;
        float: left;
        text-align: left;
        padding-right: 15px;
    }

    /* Ajuste para a primeira célula (nome do Pokémon) */
    #pokemonTable td:first-child {
        display: block;
        padding: 15px;
        background-color: #fdfdfd;
        border-bottom: 1px solid #eee;
        text-align: center;
    }

    #pokemonTable td:first-child::before {
        display: none;
    }
    
    /* Regra específica para o TÍTULO DA ZONA */
    #pokemonTable tr.location-header td {
        background-color: #1d3557;
        color: white;
        font-weight: bold;
        font-size: 1.2em;
        text-align: left;
        padding: 12px 15px;
        margin-bottom: 5px;
        border-radius: 5px;
    }

    /* Esconde a 'etiqueta' fantasma no título da zona */
    #pokemonTable tr.location-header td::before {
        display: none;
    }

    /* Regra para as notas compartilhadas */
    #pokemonTable td[rowspan] {
        display: block;
        text-align: left;
        background-color: #f9f9f9;
        font-style: italic;
    }

    .pokemon-cell {
        justify-content: center;
        font-size: 1.2em;
    }
}