/* ===== BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
    font-family: 'Orbitron', Verdana, sans-serif;
    background-image: url(../images/LMBG.jpg);
    background-size: cover;
    background-attachment: fixed;
    color: #000;
    transition: background 0.3s ease, color 0.3s ease;
}

html, body {
    overflow-x: hidden;
}

.dark-mode {
    background-image: url(../images/DMBG.jpg);
    color: #fff;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===== HEADER ===== */
header {
    position: relative;
    text-align: center;
    padding: 1em 1em;
}

.title {
    text-align: left;
    font-size: 25px;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 2px 2px 4px #000;
}

.dark-mode .title {
    color: #fff;
    text-shadow: 2px 2px 4px #fff;
}

/* ===== DARK MODE TOGGLE ===== */
#theme-toggle {
    position: absolute;
    top: 1em;
    right: 1em;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

#theme-toggle:hover {
    transform: scale(1.2);
    border-radius: 8px;
}

.icon {
    width: 100px;
    height: 100px;
}

/* ===== NAVBAR ===== */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2em;
    font-size: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    background-size: cover;
    padding: 0.5em 1em;
    margin-top: 3em;
    border-radius: 20px;
}

.navbar a {
    text-decoration: none;
    color: #000;
    font-size: 20px;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out, background-color 0.3s ease-in-out;
    border-radius: 8px;
    padding: 0.5em;
}

.navbar a:hover {
    color: #fff;
    background-color: #000;
    transform: scale(1.10);
    border-radius: 8px;
}


.dark-mode .navbar a {
    color: #fff;
}

.dark-mode .navbar a:hover {
    background-color: #000;
}

/* ===== SEARCH SECTION ===== */

#search-section {
    display: flex;
    flex-direction:row;
    align-items: center;
    gap: 10px;
    margin: 1em 0;
    padding: 0.5em;
    background-size: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    border-radius: 4px;
    width: 100%;
    height: fit-content;
}

.search-wrapper {
    display: flex;
    width: 60%;
    gap: 10px;

}

.search-text {
    font-size: 25px;
    width: 40%;
    font-weight: bold;
    color: darkgray;
    text-shadow: 1px 0 1px #000;
    text-align: center;
    margin-right: 1.5em;
}

#search-section input {
    margin: 0.5em 0;
    border-radius: 4px;
    font-size: 20px;
    font-family: 'Orbitron', sans-serif;
    color: #000;
    background-color: darkgrey;
    border: 1px solid #111;
    text-align: left;
    padding: 0.5em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    transition: background-color 0.3s ease-in-out, 
    color 0.3s ease-in-out;
}

#search-section input:hover {
    background-color: lightgray;
    color: #000;
}

::placeholder {
        color: black;
        opacity: 0.7;
        font-size: 20px;
        font-family: 'Orbitron', sans-serif;
        text-align: left;
    }


.dark-mode ::placeholder {
        color: #fff;
        opacity: 0.7;
        font-family: 'Orbitron', sans-serif;
    }


.dark-mode #search-section {
    background-size: cover;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.dark-mode .search-text {
    color: #fff;
}

.dark-mode #search-section input {
    background-color: #333;
    color: #fff;
    border: 1px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.dark-mode #search-section input:hover {
    background-color: #000;
    color: #fff;
}

.search-button {
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out, background-color 0.3s ease-in-out;
    padding: 0.5em;
    margin: 0.5em;
    background: darkgray;
    font-size: 17px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    
}

.search-button:hover {
    background: lightgray;
    color: #000;
    transform: scale(1.2);
}

.dark-mode .search-button {
    background: #333;
    color: #fff;
}

.dark-mode .search-button:hover {
    background: #000;
}

.empty-search {
    color: #000;
    text-align: center;
    margin-top: 1em;
    margin-bottom: 1em;
    font-weight: bold;
    font-size: 2em;
    font-style: oblique;
    filter: brightness(2);
}

.dark-mode .empty-search {
    color: #fff;
}

#results {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: center;
}

.game-result {
    background-color: #e48520;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    padding: 1em;
    margin: 1em;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    width: 350px;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.result-filter {
    display: flex;
    justify-content: center;
    margin: 0;
    font-size: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    gap: 1em;
    background-size: cover;
}

.filter-input {
    width: 25px;
    height: 25px;
    cursor: pointer;
}

.filter-option {
    padding: 0.5em;
    color: #111;
    font-size: 25px;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out;
    border-radius: 8px;
    margin: 0;
    cursor: pointer;
}

.filter-option:hover {
    background-color: #000;
    color: #fff;
    transform: scale(1.05);
}

.dark-mode .filter-option {
    color: #fff;
}

.dark-mode .result-filter {
    color: #fff;
}

.game-result:hover {
    background-color: #d07410;
    transform: scale(1.05);
}

.dark-mode .game-result:hover {
    background-color: #0000d1;
    transform: scale(1.05);
}

.dark-mode .game-result {
    background-color: blue;
    color: #fff;
}

.game-thumbnail {
    border-radius: 8px;
    margin: 1em 0;
    width: 300px;
    height: 200px;
    object-fit: contain;
}

#normal-price {
    text-decoration: line-through;
    color: darkred;
    font-weight: bold;
    font-size: 20px;
    margin-left: 0.5em;
}

/* ===== GENRE SHOWCASE HEADING ===== */
#genre-showcase {
    text-align: center;
    font-size: 35px;
    padding: 1em;
    border-bottom: 3px solid #e48520;
    width: fit-content;
    margin: 0 auto;
}

.dark-mode #genre-showcase {
    border-bottom: 3px solid blue;
}

/* ===== CAROUSEL ===== */
.carousel-container {
    width: 100%;
    max-width: 900px;
    height: auto;
    position: relative;
    margin: 2em auto 0 auto;
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

.carousel-container:hover {
    transform: scale(1.05);
}

.slider-container{
    width:100%;
    margin: 0 auto;

}

/*smooth sliding for carousel */
.slider-carousel {
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 5;
    position: relative;
}

.slide {
    overflow: hidden;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease-in-out;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: filter 0.3s ease-in-out;
    border-radius: 16px;
}


.slide:hover img {
    filter: brightness(0.6);
}

/* Text overlaid on image */
.image-text {
    position: absolute;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
}

p{
    font-size: 25px;
}

.image-text p{
    display: none;
}

.image-text h3 {
    color: #fff;
    margin-bottom: 0.3em;
    font-size: 75px;
}

.carousel-description {
    text-align: center;
    padding: 2em;
    border-bottom: 3px solid #e48520;
    width: fit-content;
    margin: 0 auto;
}

.dark-mode .carousel-description {
    color: #fff;
    border-bottom: 3px solid blue;
}



/* ===== CAROUSEL NAV BUTTONS ===== */
.navigation-buttons .previous,
.navigation-buttons .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    text-decoration: none;
    user-select: none;
}

.navigation-buttons .next {
    right: 0;
}

.navigation-buttons .previous:hover,
.navigation-buttons .next:hover {
    background: #000;
}

/* ===== NAVIGATION DOTS ===== */
.navigation-dot-container {
    position: absolute;
    bottom: 10%;
    width: 100%;
    text-align: center;
    margin-top: 1em;
}

.navigation-dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background 0.3s ease-in-out;
}

.navigation-dot.active,
.navigation-dot:hover {
    background-color: #e48520;
}

.dark-mode .navigation-dot.active,
.dark-mode .navigation-dot:hover {
    background-color: blue;
}

/* ===== GENRE FILTER ===== */
#genre-filter {
    font-family: 'Orbitron', sans-serif;
    font-size: 30px;
    display: flex;
    justify-content: center;
    margin: 1em;
    padding: 0.5em;
    border-radius: 8px;
    background-size: cover;
    background-color: #e48520;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out;
    border: none;
}

#genre-filter:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    background-color: #000;
    color: #fff;
    transform: scale(1.15);
}

#genre-filter option {
    
    font-size: 30px;
    font-style: italic;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out;

}

#genre-filter option:hover {
    transform: scale(1.15);
}

.dark-mode #genre-filter {
    background-color: blue;
    color: #fff;
}

.dark-mode #genre-filter:hover {
    background-color: #000;
    color: #fff;
}

.dark-mode #genre-filter option {
    background-color: #000;
    color: #fff;
}

/* ===== GENRE SECTIONS ===== */

.genre-content {
    display: flex;
    align-items: flex-start;
    gap: 2em;
    padding: 2em;
}

.genre-content a {
    display: block;
}

.genre-card {
    background-image: url(../images/bannerLM.jpg);
    background-size: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    padding: 0.5em;
    overflow: hidden;
    margin-bottom: 2em;
    transition: transform 0.4s ease-in-out;
}

.genre-card.active-scale {
    transform: scale(0.8);
    filter: brightness(0.7);
    transition: transform 0.5s ease-in-out, filter 0.5s ease-in-out;
}

.dark-mode .genre-card {
    background-image: url(../images/bannerDM.jpg);
    color: #fff;
}

.genre-title {
    font-size: 60px;
    margin: 0.5em;
    border-left: #e48520 5px solid;

}

.dark-mode .genre-title {
    border-left: blue 5px solid;
}

.back-to-top {
    font-size: 65px;
    display: inline-block;
    margin-left: 1em;
    text-decoration: none;
    color: #e48520;
    transition: transform 0.6s ease-in-out, color 0.6s ease-in-out;
    vertical-align: middle;
    transform: rotateY(0deg);
}

.back-to-top:hover {
    color: #000;
    transform: rotateY(180deg);
    
}

.dark-mode .back-to-top:hover {
    color: #fff;
}

.dark-mode .back-to-top {
    color: blue;
}

.genre-text {
    font-size: 20px;
    padding: 0.5em;
    background-color: darkgray;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    border-radius: 8px;
}

span{
    font-weight: bold;
}

.dark-mode .genre-text {
    background-color: #333;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.genre-gif {
    width: 100%;
    height: 350px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    border-radius: 8px;
}

.genre-image:hover {
    filter: brightness(0.5) grayscale(100%);
    transform: scale(1.05);
    transition: filter 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.genre-image.disable-hover {
    pointer-events: none;
}

.genre-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    border-radius: 8px;
    transition: filter 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* ===== NEWSLETTER SIGNUP ===== */

.form-title {
    font-size: 60px;
    margin: 0.5em;
    border-left: #e48520 5px solid;

}

.dark-mode .form-title {
    border-left: blue 5px solid;
}

.user-form{
    text-align: center;
    max-width: 100%;
    margin: 2em;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.contact {
    font-weight: bold;
    font-style: italic;
}

.dark-mode .user-form {
    color: #fff;
}

.user-form label {
    display: block;
    margin-bottom: 0.5em;
    margin-top: 0.5em;
    font-style: oblique;
}

#newsletter .user-form input{
    width: 100%;
    max-width: 400px;
    padding: 0.5em;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: lightgray;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

#newsletter .user-form input:hover {
    background-color: #fff;
}

#search-section input {
    width: 100%;
    height: 100%;
}

#newsletter .user-form button {
    width: 100%;
    max-width: 400px;
    font-size: 1em;
    padding: 0.5em;
    background-color: #e48520;
    color: #111;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
    font-weight: bold;
    font-style: oblique;

}

.dark-mode #newsletter .user-form button {
    background-color: blue;
    color: #fff;
}

#newsletter .user-form button:hover {
    background: #d07410;
    transform: scale(1.05);
}

.dark-mode #newsletter .user-form button:hover {
    background: #0000d1;
    transform: scale(1.05);
}

.error-message {
    color: red;
    border-radius: 8px;
    margin-bottom: 1em;
    font-weight: bold;
    font-style: oblique;
    filter: brightness(2);

}

/* shake animation for error message */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    5% { transform: translateX(-5px); }
    10% { transform: translateX(5px); }
    20% { transform: translateX(-10px); }
    30% { transform: translateX(10px); }
    40% { transform: translateX(-20px); }
    50% { transform: translateX(20px); }
    60% { transform: translateX(-15px); }
    70% { transform: translateX(15px); }
    80% { transform: translateX(-10px); }
    90% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s ease;
}

.success-message {
    color: green;
    border-radius: 8px;
    margin-bottom: 1em;
    font-weight: bold;
    font-style: oblique;
    filter: brightness(2);
}


/* fade-out for both error and success messages */
.message-fade-out {
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

/* ===== FOOTER ===== */

.footer {
    text-align: center;
    display: flex;
    padding: 2.5em;
    background-color: #e48520;
    margin-top: 5em;
    font-size: 15px;
}

.footer p {
    margin: 0.5em;
}

.game-result p, .game-result h3 {
    margin: 0.3em 0;
}

.dark-mode .footer {
    background-color: blue;
    color: #fff;
}

/*Back to top hidden by default */
.back-to-top-footer {
    font-size: 50px;
    display: inline-block;
    margin-left: 1em;
    text-decoration: none;
    color: #e48520;
    transition: color 0.5s ease-in-out;
    vertical-align: middle;
}

/* Show back to top button when user hovers over it */
.back-to-top-footer:hover {
    color: #000;
}

.dark-mode .back-to-top-footer {
    color: blue;
}

.dark-mode .back-to-top-footer:hover {
    color: #fff;
}

/* ===== MEDIA QUERIES ===== */


/* MOBILE */
@media (max-width: 480px) {

    header {
        padding: 0.5em;
    }

    .title h1 {
        font-size: 30px;
    }

    .navbar {
        flex-direction: column;
        align-items: center;
        gap: 0.5em;
        width: 100%;
    }

    .icon {
        width: 65px;
        height: 65px;
    }

    #search-section {
        flex-direction: column;
        align-items: center;
        gap: 0.5em;
    }

    .search-wrapper {
        flex-direction: column;
        gap: 0.5em;
    }

    #game-search {
        font-size: 16px;
        padding: 0.4em;
    }

    .search-button {
        font-size: 16px;
        padding: 0.4em;
    }

    .search-text {
        font-size: 25px;
        margin-right: 0;
    }

    #results {
        gap: 0.5em;
        grid-template-columns: 1fr;
    }

    .game-result {
        padding: 0.5em;
    }

    .carousel-container {
        width: 100%;
        margin: 1em auto;
    }

    .image-text h3 {
        font-size: 28px;
    }

    #genre-showcase {
        font-size: 20px;
    }

    #slide-description {
        font-size: 15px;
    }

    .genre-title {
        font-size: 50px;
    }

    .genre-content {
        flex-direction: column;
        align-items: center;
        padding: 1em;
        gap: 1em;
    }

    .genre-content a,
    .genre-text {
        width: 100%;
    }

    .shooter-text {
        width: 100%;
        font-size: 20px;
        padding: 0.5em;
        background-color: darkgray;
        box-shadow: 0 4px 8px rgba(0,0,0,0.5);
        border-radius: 8px;
    }

    .dark-mode .shooter-text {
        background-color: #333;
    }

    .genre-image {
        width: 100%;
        height: auto;
        max-height: 220px;
        transition: filter 0.3s ease-in-out, transform 0.3s ease-in-out;
    }

    .genre-gif {
        width: 100%;
        height: auto;
        max-height: 220px;
        margin: 0 auto;
    }

    .user-form {
        margin: 1em;
        padding: 1em;
    }

    #newsletter .user-form input {
        width: 75%;
        padding: 0.5em;
    }

    #search-section input {
    width: 100%;
    height: 100%;
    }

    #newsletter .user-form button {
        width: 75%;
        padding: 0.5em;
    }

    .form-title {
        font-size: 40px;
    }

    .footer {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
    }

    .back-to-top-footer {
        margin-left: 0;
    }
}

/* TABLET */
@media (min-width: 481px) and (max-width: 768px) {

    .title h1 {
        font-size: 40px;
    }

    .carousel-container {
        max-width: 600px;
    }

    #genre-showcase {
        font-size: 25px;
    }

    #slide-description {
        font-size: 20px;
    }

    #newsletter .user-form input,
    #newsletter .user-form button {
        max-width: 400px;
    }

    #search-section input {
    width: 100%;
    height: 100%;
    }

    .genre-content {
        flex-direction: column;
        align-items: center;
        padding: 1em;
        gap: 2em;
    }

    .genre-content a,
    .genre-text {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

     .shooter-text {
        width: 100%;
        font-size: 20px;
        padding: 0.5em;
        background-color: darkgray;
        box-shadow: 0 4px 8px rgba(0,0,0,0.5);
        border-radius: 8px;
    }

    .dark-mode .shooter-text {
        background-color: #333;
    }

    .game-title {
        font-weight: bold;
        text-align: center;
    }

    .genre-image {
        width: 100%;
        height: auto;
        max-height: 300px;
        transition: filter 0.3s ease-in-out, transform 0.3s ease-in-out;
    }

    .genre-gif {
        width: 725px;
        height: auto;
        max-height: 300px;
    }

    .genre-title {
        font-size: 50px;
    }
}

/* LAPTOP */
@media (min-width: 769px) and (max-width: 1200px) {

    #genre-showcase {
        font-size: 30px;
    }

    .carousel-container {
        max-width: 700px;
    }

    .genre-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 2em;
        padding: 2em;
    }

    .genre-content a{
        width: 60%;
        
    }
    .genre-text {
        width: 40%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1em;
        font-size: 17.5px;
        margin: 0 auto;
    }

    .shooter-text {
        width: 40%;
        font-size: 17.5px;
        padding: 0.5em;
        background-color: darkgray;
        box-shadow: 0 4px 8px rgba(0,0,0,0.5);
        border-radius: 8px;
    }

    .dark-mode .shooter-text {
        background-color: #333;
    }

    .game-title {
        font-size: 20px;
        font-weight: bold;
        text-align: center;
    }

    .genre-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: filter 0.3s ease-in-out, transform 0.3s ease-in-out;
    }

    .genre-gif {
        width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
        object-fit: cover;
    }

    #newsletter .user-form input,
    #newsletter .user-form button {
        width: 50%;
    }

    #search-section input {
    width: 100%;
    height: 100%;
    }

    .title h1 {
        font-size: 50px;
    }

    .genre-title {
        font-size: 60px;
    }

    #slide-description {
        font-size: 25px;
    }
}

/* LARGE DESKTOP */
@media (min-width: 1201px) {
    .carousel-container {
        max-width: 1000px;
    }

    .title h1 {
        font-size: 50px;
    }

    .genre-title {
        font-size: 70px;
    }
    
    .genre-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 2em;
        padding: 2em;
    }

    .genre-content a {
        width: 60%;
    }

    .genre-text {
        width: 40%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1em;
        font-size: 25px;
        margin: 0 auto;
    }

    .shooter-text {
        width: 40%;
        font-size: 25px;
        padding: 0.5em;
        background-color: darkgray;
        box-shadow: 0 4px 8px rgba(0,0,0,0.5);
        border-radius: 8px;
    }

    .dark-mode .shooter-text {
        background-color: #333;
    }

    .game-title {
        font-size: 30px;
        font-weight: bold;
        text-align: center;
    }

    .genre-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: filter 0.3s ease-in-out, transform 0.3s ease-in-out;
    }

    .genre-gif {
        width: 800px;
        height: 500px;
        object-fit: cover;
        margin: 0 auto;
    }

    #slide-description {
        font-size: 30px;
    }
}
