/* Reset and general styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* background-color: #1d1e1f; */
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

.header, .footer {
    background-color: #034261;
    color: #fff;
    width: 100%;
}

.header-content, .footer-content {
    max-width: 1780px;
    margin: 0 auto;
    padding: 1rem;
}

/* Footer section */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    margin: 0;
}

/* Container for the search, login, and register buttons */
.accounts {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Style for the search toggle button */
.search-toggle-button {
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    margin-left: 10px;
    transition: background 0.3s;
}

.search-toggle-button:hover {
    background: #45a049;
}

/* Hidden search box by default */
.search-box {
    display: none; /* Hidden initially */
    width: 100%;
    /* max-width: calc(100% - 300px); Adjust according to available space */
    margin: 5px auto;
    padding: 5px;
    background-color: #f1f1f1;
    border-radius: 25px;
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.search-box input[type="text"] {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 14px;
    border-radius: 25px;
    outline: none;
}

.search-box button {
    border: none;
    background: #4CAF50;
    color: #fff;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 25px;
    transition: background 0.3s;
    margin-left: 10px;
}

.search-box button:hover {
    background: #45a049;
}


.main-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-btn {
    background: linear-gradient(135deg, #b6b81d, #6f800e);
    padding: 10px 20px;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.login-btn:hover {
    background: linear-gradient(135deg, #a01a1a, #6e0b0b);
    transform: scale(1.05);
}

.login-btn:active {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.register-btn {
    background: linear-gradient(135deg, #2fb81d, #12800e);
    padding: 10px 20px;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.register-btn:hover {
    background: linear-gradient(135deg, #1a7aa0, #0b5e6e);
    transform: scale(1.05);
}

.register-btn:active {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.container {
    max-width: 1780px;
    margin: 0 auto;
    padding: 20px; /* Adds space on both sides */
}

/* Logo and navigation */
.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    margin: 0;
    font-weight: 600;
}

.logo-image {
    height: 40px;
    width: auto;
}

nav ul {
    list-style-type: none;
    display: flex;
    gap: 1rem;
}

.swipe-menu {
    list-style-type: none;
    display: flex;
    gap: 1rem;
}

.swipe-menu li {
    cursor: pointer;
    padding: 0.5rem 1rem;
    color: #fff;
    font-weight: 600;
}

.swipe-menu .active {
    border-bottom: 2px solid #fff;
}

/* Categories section */
.categories-section {
    background-color: #ecf0f1; /* Light background for contrast */
    padding: 20px; /* Add padding around the section */
    margin: 20px 0; /* Add margin above and below the section */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Shadow for depth */
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px;
    scrollbar-width: none;
}

.categories-section::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.categories-section h2 {
    text-align: center; /* Center the heading */
    margin-bottom: 15px; /* Space below the heading */
    font-size: 1.5em; /* Increase heading size */
    color: #2c3e50; /* Darker text color for visibility */
}

.categories-list {
    display: flex;
    justify-content:space-between;
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.categories-list li {
    display: flex;
    flex-direction: column; /* Stack image and text vertically */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
    width: 120px; /* Fixed width for each category */
    margin: 10px; /* Space between category items */
    padding: 10px; /* Padding inside the category item */
    border-radius: 15px; /* Rounded corners */
    background-color: #3498db; /* Base color for category items */
    color: #fff; /* Text color */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s, transform 0.3s; /* Smooth transition for hover effects */
    flex: 0 0 auto;
    display: flex;
}

.categories-list li img {
    width: 80px; /* Fixed width for images */
    height: 80px; /* Fixed height for images */
    border-radius: 50%; /* Circular image */
    object-fit: cover; /* Cover the area while maintaining aspect ratio */
    margin-bottom: 5px; /* Space between image and text */
}

.categories-list li.active,
.categories-list li:hover {
    background-color: #2980b9; /* Highlight color on hover and active */
    transform: scale(1.05); /* Scale effect on hover */
}

.categories-list li span {
    font-size: 14px;
    color: #333;
}

/* Optional: Add some basic styling for active item */
.categories-list li.active span {
    font-weight: bold;
}

/* Game list section */
#game-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.game-card {
    width: 200px;
    background-color: #f9f9f9;
    border-radius: 10px;
    position: relative;
    text-align: center;
    overflow: hidden;
    height: 150px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.game-name-overlay {
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-name-overlay {
    opacity: 1;
}

.game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s;
}

.game-card img:hover {
    transform: scale(1.05);
}

.game-card h3 {
    padding: 15px 0;
    font-size: 1.2em;
    color: #34495e;
}

.game-thumbnail,
.game-video {
    width: 100%;
    height: 150px;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.game-video {
    opacity: 0;
    pointer-events: none; /* Prevent interaction with video until hover */
}

/* .game-card:hover .game-thumbnail {
    opacity: 0;
} */

.game-card:hover .game-video {
    opacity: 1; /* Show video on hover */
}

.theme-card {
    width: 300px;
    background-color: #f9f9f9;
    border-radius: 10px;
    text-align: center;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.theme-card img {
    width: 300px;
    height: 200px;
}

.theme-card img:hover {
    transform: scale(1.05);
}

.theme-card h3 {
    padding: 15px 0;
    font-size: 1.2em;
    color: #34495e;
}

.theme-card h6 {
    padding: 15px 0;
    font-size: 1.2em;
    color: #34495e;
}

/* Game Display Section */
#game-display {
    display: flex;
    margin-top: 20px;
    gap: 20px;
}

.game-play-area {
    flex: 2;
    border: 2px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
}

.game-play-area iframe {
    width: 100%;
    height: 600px;
    border: none;
}

.game-info {
    flex: 1;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.game-info h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 10px;
}

.game-info p {
    margin-bottom: 10px;
}

.game-info .btn-primary {
    background-color: #61dafb;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Related Games Section */
#related-games {
    margin-top: 30px;
}

#related-games h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #333;
}

.related-games-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.related-game-card {
    width: 150px;
    padding: 15px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s;
}

.related-game-card:hover {
    transform: translateY(-5px);
}

.related-game-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.related-game-card h4 {
    font-size: 1em;
    color: #333;
    margin-bottom: 10px;
}

.related-game-card .btn-secondary {
    background-color: #282c34;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.social-media a {
    color: #fff;
    margin-left: 15px;
    text-decoration: none;
}

.social-media a:hover {
    text-decoration: underline;
}

/* Drawer toggle button (hamburger icon) */
.drawer-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    margin-left: 1rem; /* Adds space between logo and hamburger icon */
}

/* Drawer styles */
.drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100%;
    background-color: #0e438a;
    color: #fff;
    overflow: auto;
    transition: right 0.3s ease;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.close-drawer {
    align-self: flex-end;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.drawer-menu {
    list-style-type: none;
    margin-top: 1rem;
}

.drawer-menu li {
    padding: 0.5rem 0;
    cursor: pointer;
}

/* Container to hold both sidebar and button */
.gamehive-sidebar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 150px;
    height: 100%;
    transform: translateX(-100%); /* Initially hidden off-screen */
    transition: transform 0.3s ease;
    z-index: 1000;
}

.gamehive-sidebar-container.open {
    transform: translateX(0); /* Slide in from the left */
}

/* Sidebar styles */
.gamehive-sidebar {
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    padding: 20px;
    overflow-y: auto;
}

.gamehive-sidebar h4 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.gamehive-category-list {
    list-style: none;
    padding: 0;
}

.gamehive-category-list li {
    margin-bottom: 10px;
}

.gamehive-category-list li a {
    color: #007bff;
    text-decoration: none;
}

/* Floating button styles */
.gamehive-floating-button {
    position: absolute; /* Position relative to the container */
    top: 100px; /* Adjust as needed */
    right: -60px; /* Offset button outside of sidebar */
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* Responsive for mobile devices */
@media (max-width: 768px) {
    .swipe-menu {
        display: none; /* Hide the main menu on mobile */
    }

    #game-display{
        flex-direction: column;
    }

    .game-play-area iframe{
        height: 240px;
    }

    .drawer-toggle {
        display: block; /* Show the drawer toggle button on mobile */
    }

    .login-btn{
        display: none;
    }

    .register-btn{
        display: none;
    }

    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        background-color: #034261;
        color: #fff;
    }

    .main-head {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }

    .header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .logo h1 {
        margin: 0;
    }

    .nav-menu,
    .accounts {
        display: flex;
        gap: 15px;
    }

    .drawer-toggle {
        display: block; /* Show drawer toggle button in mobile view */
    }

    .drawer {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 250px;
        background-color: #074d70;
        color: #fff;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        display: flex;
        flex-direction: column;
        padding: 20px;
        z-index: 9999;
    }

    .drawer.open {
        transform: translateX(0);
    }

    .close-drawer {
        background: none;
        border: none;
        color: #fff;
        font-size: 24px;
        align-self: flex-end;
        cursor: pointer;
    }

    .drawer-menu {
        list-style: none;
        padding: 0;
        margin: 20px 0;
    }

    .drawer-menu li {
        padding: 10px 0;
    }

    #game-list {
        gap: 10px;
    }

    .game-card {
        width: 150px;
    }
    #sidebarContainer{
        display: none;
    }
}

/* Show drawer when active */
.drawer.open {
    right: 0;
}


/* Floating Settings Button */
#settingsButton {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #293ef8;
    color: white;
    font-size: 18px;
    padding: 5px;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Modal Styles */
.theme-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.theme-modal .modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 700px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.theme-modal h4{
    color: #034261;
}

.theme-modal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.theme-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

/* Initial style for the checkmark (hidden) */
.checkmark {
    display: none;
    color: green;
    font-size: 18px;
}

/* Show the checkmark when theme is selected */
.theme-card.selected .checkmark {
    display: inline;
}
