* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body, h1, h3, h4, h5, text, h6 {
    font-family: "Poppins", sans-serif;
    text-align: center;
    font-weight: 400;
    color: #faf9f6;
}

body {
    background-color: #c62828;
    min-height: 100vh;
}

.navbar {
    box-sizing: border-box;
    background: #c62828;
    box-shadow: 0 5px 15px rgba(140, 0, 0, 0.4);
    border-radius: 8px;
    width: fill;
    margin: 15px 20px;
    z-index: 100;
    position: static;
    padding: 10px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.navbar a {
    font-family: "Poppins", sans-serif;
    color: #fff;
    text-decoration: none;
    position: relative;
}

.paradise-logo {
    display: flex;
    align-items: center;
}

.paradise-logo img {
    width: 45px;
    height: 45px;
    margin-right: 12px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.navbar a:not(:first-child) {
    padding: 10px 15px;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    border-radius: 2px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.navbar a:not(:first-child) i {
    margin-right: 8px;
}

.navbar a:not(:first-child):hover {
    font-size: 18px;
    color: #484c51;
    background-color: #e7928f;
    border-radius: 10px;
    scale: 1.05;
}

.navbar a:first-child {
    padding: 10px 25px;
    font-size: 26px;
    font-weight: 650;
    margin-right: auto;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar a:first-child:hover {
    transform: translateX(10px);
    color: #484c51;
    background-color: #e7928f;
    border-radius: 10px;
    scale: 1.1;
}

.main-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.searchbar {
    padding: 1vw;
    width: 40%;
    border-radius: 20px;
    background: rgba(220, 53, 69, 0.7);
    text-align: left;
    font-size: 24px;
    border: none;
    outline: none;
    color: #faf9f6;
    margin-bottom: 20px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, box-shadow 0.3s ease;
}

.searchbar::placeholder {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    color: #faf9f6;
    text-align: center;
    opacity: 0.4;
}

.searchbar:focus {
    outline: none;
    background: rgba(220, 53, 69, 0.9);
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#search-results {
    display: none;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 0.45rem;
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    justify-content: center;
}

.game {
    cursor: pointer;
    position: relative;
    display: block;
    width: 100%;
    text-decoration: none;
    aspect-ratio: 1/1;
}

.game img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    transition: all 0.35s ease;
    object-fit: cover;
}

.game:hover img {
    transform: scale(1.05) translateY(-0.2vw);
    filter: brightness(0.7);
    box-shadow: 0 0 0.5vw rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.text {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    animation: slide-out 0.35s ease forwards;
}

.game:hover .text {
    opacity: 1;
    animation: slide-in 0.35s ease forwards;
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
    box-shadow: inset 0 0 5px grey;
}
::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
    transform: background 0.1s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media screen and (max-width: 2200px) {
    .games-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

@media screen and (max-width: 1800px) {
    .games-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

@media screen and (max-width: 1500px) {
    .games-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media screen and (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media screen and (max-width: 1000px) {
    .searchbar {
        width: 90%;
        padding: 15px;
    }

    .searchbar:focus {
        scale: 1.05;
    }
    
    .navbar a:not(:first-child) span {
        display: none;
    }
    
    .games-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .searchbar {
        width: 95%;
        padding: 15px;
    }

    .searchbar:focus {
        scale: 1.02;
    }
    
    .navbar {
        padding: 0.8rem;
    }
    
    .navbar a:first-child {
        font-size: 1.3rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
    }
    
    nav {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        padding-top: 0.5rem;
    }

    nav li {
        padding: 0.5rem 0;
    }
}