* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

body {
    background-color: #2b2b2b;
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.container {
    width: 94vw;
    margin: 0 auto;
    background-color: #f0f0f0;
    box-shadow: 0 0 1.56vw rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.history-section {
    background-color: #cc0000;
    color: #fff;
    padding: 2vh 2vw;
    border-bottom: 0.6vh solid #8b0000;
    flex-shrink: 0;
}

.history-section h1 {
    font-size: 5vw;
    margin-bottom: 1.0vh;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.15vw;
}

.history-section p {
    font-size: 2.5vw;
    line-height: 1.6;
    text-align: center;
}

.pokemon-list {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.8vw;
    padding: 1.0vh 1.5vw;
    background-color: #dcdcdc;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}

.list-btn {
    background-color: #fff;
    border: 0.15vw solid #999;
    border-radius: 0.3vw;
    padding: 0.5vh 0.4vw;
    cursor: pointer;
    font-weight: bold;
    font-size: 2.3vw;
    transition: all 0.2s;
}

.list-btn:hover {
    background-color: #ffcc00;
    border-color: #cc9900;
    transform: scale(1.05);
}

.pokemon-list::-webkit-scrollbar {
    width: 0.6vw;
}
.pokemon-list::-webkit-scrollbar-track {
    background: #c0c0c0;
}
.pokemon-list::-webkit-scrollbar-thumb {
    background-color: #666;
    border-radius: 0.3vw;
}

/* ================= MODAL COM INTERSEÇÃO SIMÉTRICA DE EIXOS ================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.pokedex-card {
    background-image: url('../assets/pokedex-modal.png');
    background-size: 100% 100%; 
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    width: min(90vw, calc(90vh * (380 / 560)));
    height: min(90vh, calc(90vw * (560 / 380)));
    position: relative;
    user-select: none;
    overflow: hidden;
    container-type: size;
}

.image-container {
    position: absolute;
    top: 3.5%; 
    left: 50%;
    transform: translateX(-50%);
    width: 83.7%; 
    height: 39.0%; 
    background-color: #aed3b8;
    border-radius: 3cqw;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-container img {
    height: 90%;
    width: 90%;
    object-fit: contain;
    image-rendering: pixelated;
}

.pokemon-info {
    position: absolute;
    top: 46.0%;
    left: 50%;
    transform: translateX(-50%);
    width: 83.7%; 
    height: 34.50%; 
    background-color: #1a1a1a;
    color: #4af626;
    padding: 4cqw;
    border-radius: 3cqw;
    font-size: 5.5cqw; 
    line-height: 1.2;
    overflow-y: auto;
    text-align: left;
}

.pokemon-info h2 {
    font-size: 6.5cqw;
    margin-bottom: 1.5cqh;
    border-bottom: 0.3cqh solid #4af626;
    padding-bottom: 0.5cqh;
    color: #4af626;
}

.pokemon-info p {
    margin-bottom: 1cqh;
}

.pokemon-info::-webkit-scrollbar {
    width: 1.5cqw;
}
.pokemon-info::-webkit-scrollbar-track {
    background: #1a1a1a;
}
.pokemon-info::-webkit-scrollbar-thumb {
    background-color: #4af626;
    border-radius: 1cqw;
}

.nav-controls {
    position: absolute;
    bottom: 4.0%;
    left: 50%;
    transform: translateX(-50%);
    width: 79.0%; 
    height: 12.07%; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    background-color: rgba(0, 0, 0, 0);
    border: none;
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.nav-btn.prev {
    width: 26.47%; 
    height: 80.64%; 
    border-radius: 2cqw;
}

.nav-btn.close {
    width: 30.39%; 
    height: 100%;
    border-radius: 50%;
}

.nav-btn.next {
    width: 26.47%;
    height: 80.64%;
    border-radius: 2cqw;
}

.nav-btn:active {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-btn:disabled {
    cursor: not-allowed;
    background-color: rgba(0, 0, 0, 0.4);
}

/* ================= ARQUITETURA DO BOTÃO FIXO DE RETORNO ================= */

.home-fixed-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease-in-out;
}

.home-fixed-btn:hover {
    transform: scale(1.1);
}

/* Círculo Externo (Vermelho) */
.circle-red {
    width: 100%;
    height: 100%;
    background-color: #e63946;
    border: 3px solid #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

/* Círculo Interno/Fundo (Branco) */
.circle-white-inner {
    width: 74%;
    height: 74%;
    background-color: #ffffff;
    border: 2px solid #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Estrutura da Casa Amarela */
.yellow-house {
    width: 22px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

/* Telhado da Casa */
.house-roof {
    width: 0;
    height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-bottom: 9px solid #ffcb05;
    position: absolute;
    top: 0;
}

/* Corpo da Casa */
.house-base {
    width: 18px;
    height: 11px;
    background-color: #ffcb05;
}

/* Ajustes de Responsividade */
@media (max-width: 768px) {
    .home-fixed-btn {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    .yellow-house {
        width: 18px;
        height: 16px;
    }
    .house-roof {
        border-left: 11px solid transparent;
        border-right: 11px solid transparent;
        border-bottom: 7px solid #ffcb05;
    }
    .house-base {
        width: 15px;
        height: 9px;
    }
}