/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #dbcdac; /* Bege claro da paleta */
    color: #333; /* Mantendo um texto escuro para legibilidade */
    line-height: 1.6;
    font-family: 'Lato', Arial, sans-serif;
}


/* Header styles */
header {
    background-color: white; /* Verde-azulado da paleta */
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.icon{
    width: 1.5rem;
}
.social-icon{
    width: 3rem;
}

a.link{
    font-family: 'GFS Didot';
    flex:0 1 auto;
    font-size: x-large;
    text-decoration: none;
    color: black;
    margin: 0 1rem;
}

.logo{
    width: 8rem;
    outline: black;
    outline-width: 1rem;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-links{
    display: flex;
    width: 80%;
    justify-content: center;
}
.logo {
    font-size: 2rem;
    font-weight: 700; /* Lato Bold */
    letter-spacing: 0.5px;
}

.logo span {
    color: #dbcdac; /* Bege claro da paleta como destaque */
    font-weight: 300; /* Lato Light for contrast */
}

/* Search bar */
.search-bar {
    display: flex;
    flex-direction: column;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    gap: 15px;
}

.search-input{
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-field{
    display:flex;
    flex-direction: row;
}

.filters select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 16px;
}

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-button{
    padding: 10px 20px;
    background-color: #960051; /* Bordô/vinho da paleta */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400; /* Lato Regular */
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.search-button:hover {
    background-color: #7c0043; /* Versão mais escura do bordô */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Game catalog */
.game-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding: 2rem 1rem;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    gap: 15px;
}

.game-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    border: 1px solid #dbcdac; /* Bege claro da paleta */
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #c8b99a; /* Versão mais escura do bege */
}

.game-image {
    height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.game-info {
    padding: 15px;
}

.game-title {
    font-size: 18px;
    font-weight: 700; /* Lato Bold */
    margin-bottom: 8px;
    color: #528a89; /* Verde-azulado da paleta */
}

.game-meta {
    font-size: 14px;
    font-weight: 300; /* Lato Light */
    color: #666; /* Cinza médio para leitura fácil */
    margin-bottom: 10px;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.tag {
    background-color: #dbcdac; /* Bege claro da paleta */
    color: #528a89; /* Verde-azulado da paleta */
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400; /* Lato Regular */
    letter-spacing: 0.5px;
}

/* Loading and error states */
.loading, .error-message, .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    font-size: 18px;
}

.loading {
    color: #528a89;
}

.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border-radius: 8px;
}

.no-results {
    color: #666;
    font-style: italic;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination button {
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button.active {
    background-color: #960051; /* Bordô/vinho da paleta - compatível com o botão de busca */
    color: white;
    border-color: #960051;
    font-weight: 700; /* Lato Bold */
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Footer */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #528a89; /* Verde-azulado da paleta */
    color: white;
    padding: 2rem 0;
    margin-top: 60px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
}

.contact-info{
    font-size:1.5rem;
    font-weight: 700;
}
.footer-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding-left: 2rem;
    padding-right: 2rem;
    width: 100%;
}

.footer-info {
    margin-bottom: 20px;
}


.footer-title {
    font-size: 18px;
    font-weight: 700; /* Lato Bold */
    color: #dbcdac; /* Bege claro da paleta */
    letter-spacing: 0.5px;
}

.footer-info a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-info a:hover {
    color: #dbcdac;
}

/* Modal for game details */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    width: 90%; /* Changed from 80% for better mobile display */
    max-width: 900px;
    border-radius: 8px;
    position: relative;
    max-height: 90vh; /* Limit height to prevent overflow */
    overflow-y: auto; /* Allow scrolling within the modal */
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #960051;
    z-index: 10; 
    background-color: white;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
}

.close-button:hover {
    color: #7c0043;
}


.game-details {
    display: flex;
    flex-direction: column; /* Stack vertically on mobile */
    gap: 20px;
}

.game-details-image {
    flex-basis: 300px;
    flex-grow: 0;
    flex-shrink: 0;
    max-width: 100%; /* Prevent overflow */
}

.game-details-image img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.game-details-info {
    flex: 1;
    min-width: 100%; /* Full width on mobile */
}

.game-details-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
    word-wrap: break-word; /* Prevent text overflow */
}

.game-details-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.meta-item {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
}

.meta-label {
    font-size: 12px;
    color: #7f8c8d;
}

.meta-value {
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
}

.pagination-info {
    display: inline-block;
    padding: 8px 5px;
    color: #666;
    font-size: 14px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    
    .header-links{
        flex-direction: row;
        width: 80%;
        margin:0;
        justify-content: space-evenly;
    }
    a.link{
        font-size: 1.3rem;
    }
    .game-details {
        flex-direction: row; /* Side by side on desktop */
    }

    .game-details-image {
        max-width: 300px; /* Fixed width on desktop */
    }

    .game-details-info {
        min-width: 0; /* Reset the min-width */
    }
    
    .search-input {
        margin-right: 0;
    }
    
    .filters {
        margin-bottom: 10px;
    }
    
    .footer-content {
        flex-direction: column;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

}
/* End of CSS */