* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Heebo", sans-serif;
}

body {
    background-color: #2d2d2d;
    color: #eaeaea;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.side-nav {
    width: 250px;
    background-color: #3e3e3e;
    color: #eaeaea;
    padding: 20px;
    height: 100vh;
    position: fixed;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
}

.side-nav h2 {
    color: #a0d1a4;
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.side-nav ul {
    list-style: none;
    padding: 0;
}

.side-nav ul li {
    margin: 15px 0;
}

.side-nav ul li a {
    color: #cfcfcf;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.side-nav ul li a:hover {
    color: #a0d1a4;
}

#favorites-section {
    margin-top: 20px;
}

#favorites-section h2 {
    color: #a0d1a4;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

main {
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
}

.gxmes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.gxme-card {
    background-color: #444;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.3s;
    text-align: center;
}

.gxme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.gxme-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 2px solid #a0d1a4;
}

.gxme-card h3 {
    margin: 10px 0;
    font-size: 1.2rem;
    color: #a0d1a4;
}

.gxme-card a {
    text-decoration: none;
    color: #cfcfcf;
    display: block;
    padding: 10px;
    font-weight: 600;
    transition: color 0.3s;
}

.gxme-card a:hover {
    color: #a0d1a4;
}

#top-10 h2 {
    color: #a0d1a4;
    font-size: 2rem;
    margin-bottom: 20px;
}
#all-gxmes2 {
    display: none;
}
#all-gxmes2 h2 {
    color: #a0d1a4;
    font-size: 2rem;
    margin-bottom: 20px;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.gxme-card {
    animation: fadeIn 0.5s ease-in-out;
    position: relative; 

}
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #cfcfcf;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.favorite-btn:hover {
    color: #ffcc00; 
}

.favorite-btn.active {
    color: #ffcc00; 
}
@media (max-width: 1200px) {
    .gxmes-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .gxme-card img {
        height: 130px;
    }

    .gxme-card h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 992px) {
    .gxmes-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .gxme-card img {
        height: 110px;
    }

    .gxme-card h3 {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .gxmes-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .gxme-card img {
        height: 90px;
    }

    .gxme-card h3 {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .gxmes-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .gxme-card img {
        height: 70px;
    }

    .gxme-card h3 {
        font-size: 0.8rem;
    }
}
#last-10 h2 {
    color: #a0d1a4;
    font-size: 2rem;
    margin-bottom: 20px;
}
a:hover {
    cursor:pointer;
}
.search-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: #3e3e3e;
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
}

.search-container input {
    flex: 1;
    background: none;
    border: none;
    color: #eaeaea;
    font-size: 1.2rem;
    outline: none;
}

.search-container .search-icon{
    color: #a0d1a4;
    font-size: 1.5rem;
    margin-left: 10px;
}
.cogig {
    position: fixed;
    bottom:0;
    color: #cfcfcf;
    font-size: 1.25rem;
    padding-bottom: 10px;
}
.cogig:hover {
    color: #a0d1a4;
}
/* Modal Overlay */
.modalclass {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(45,45,45,0.82);
    justify-content: center;
    align-items: center;
}

.modalclass.show {
    display: flex;
}

/* Modal Content */
.modal-content {
    background: #444;
    color: #eaeaea;
    padding: 30px 25px;
    border-radius: 18px;
    box-shadow: 0 8px 32px #0008;
    position: relative;
    text-align: center;
    border-bottom: 30px solid #2d2d2d;
    width: 70vh;
    max-width: 90vw;
    height: auto;
    animation: popin 0.32s cubic-bezier(.23,1.29,.52,1.01);
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 25px;
    height: 90vh;
    overflow: auto;
}
.modal-content::-webkit-scrollbar{
    display: none;
}

@keyframes popin {
    from { transform: scale(0.8); opacity: 0.2; }
    to { transform: scale(1); opacity: 1; }
}

/* Modal Header */
.modal-content h2 {
    color: #a0d1a4;
    margin-bottom: 15px;
}

/* Group Styling */
.modal-group {
    padding: 15px 0;
    border-top: 1px solid #555;
    display: grid;
    gap: 12px;
}

.modal-group:first-of-type {
    border-top: none;
}

.modal-group h6 {
    color: #cfcfcf;
    font-size: 1rem;
    margin-bottom: 10px;
    text-align: left;
}

.modal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #3e3e3e;
    padding: 10px 15px;
    border-radius: 10px;
    transition: background 0.2s;
}

.modal-item:hover {
    background: #505050;
}

.modal-item p {
    margin: 0;
    font-size: 0.95rem;
    color: #cfcfcf;
}

.modal-item button {
    display: flex;
    align-items: center;
    gap: 5px; 
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    background-color: #a0d1a4;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
}

.modal-item button:hover {
    background-color: #8ec295;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    right: 18px;
    top: 16px;
    font-size: 2rem;
    color: #cfcfcf;
    cursor: pointer;
    transition: color 0.2s;
    font-weight: 700;
    user-select: none;
}

.modal-close:hover {
    color: #a0d1a4;
}

#search-results {
  position: absolute;
  top: 100%; 
  left: 0;
  width: 100%;
  background-color: #3a3a3a;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 100;
  display: none; 
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}
#search-results::-webkit-scrollbar { 
  display: none;
}
#search-results.active {
    display: flex !important;  
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-bottom: 20px;
}

.search-game-card {
  background-color: #2d2d2d;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
  text-align: center;
  margin-bottom: 10px;
  flex: 0 1 100px;
}

.search-game-card:hover {
  transform: translateY(-2px);
}

.search-game-card img {
  width: 100%;
  height: 80px;
  object-fit: cover;
}

.search-game-card h3 {
  color: #a0d1a4;
  font-size: 0.9rem;
  padding: 6px 0;
  margin: 0;
}

.search-game-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}
