/* Body and HTML setup for sticky footer */
html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px; /* Match exact bottombar height */
    padding-top: 85px; /* Height of header only - adjusted from 125px */
}

#app {
    flex: 1 0 auto; /* This makes the content area expand to push footer down */
}

/* Custom Heading Styles with Gameria Font */
.cryptids-heading {
    font-family: 'Gameria', sans-serif;
    font-weight: normal;
    color: #212529;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1.cryptids-heading {
    font-size: 3rem;
}

h2.cryptids-heading {
    font-size: 2.5rem;
}

h3.cryptids-heading {
    font-size: 2rem;
}

h4.cryptids-heading {
    font-size: 1.75rem;
}

h5.cryptids-heading {
    font-size: 1.5rem;
}

h6.cryptids-heading {
    font-size: 1.25rem;
}

/* Header styles */
.site-header {
    background-color: #000000;
    border-bottom: 1px solid #333333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: fixed;
    top: 0; /* Changed from 40px to 0 since no topbar */
    left: 0;
    width: 100%;
    z-index: 1020;
    transition: top 0.3s ease-in-out;
}

/* Logo styling */
.navbar-brand {
    padding: 0;
}

.header-logo-lg {
    height: 50px;
    width: auto;
    display: block;
}

.header-logo-md {
    height: 40px;
    width: auto;
    display: none;
}

/* Nav items styling - common for both desktop and mobile */
.navbar-nav .nav-link {
    color: #ffffff;
    font-weight: 500;
    padding-left: 1.3rem;
    padding-right: 1.3rem;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: #0d6efd;
}

.navbar-nav .nav-link.active, .navbar-nav .nav-link.show {
    color: rgb(239 234 234);
}

/* Navbar toggler (hamburger menu button) styling */
.navbar-toggler {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Desktop Navigation Specific Styles */
.desktop-nav {
    display: flex;
}

.desktop-nav .nav-item {
    margin: 0 1rem;
}

/* Fullwidth dropdown styling - primarily for desktop */
.position-static {
    position: static !important;
}

.fullwidth-dropdown {
    width: 100%;
    margin-top: 0;
    border-radius: 0;
    border-top: 1px solid #348f41;
    background-color: #3ab54a;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    left: 0;
    right: 0;
    padding: 0;
}

.dropdown-header {
    font-size: 1.1rem;
    color: #ffffff;
    padding: 0.5rem 1rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #ffffff;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Mobile Navigation Specific Styles */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background-color: #3ab54a;
    z-index: 1031;
    padding: 1.5rem;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    flex-direction: column;
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav.active::before {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
    padding-top: 0; /* Removed padding-top since no topbar */
}

.mobile-nav .navbar-nav {
    width: 100%;
}

.mobile-nav .nav-item {
    margin-bottom: 0.5rem;
}

.mobile-nav .nav-link {
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e9ecef;
    position: relative; /* Added for absolute positioning of children */
}

/* Added styles for chevron icon alignment */
.mobile-nav .nav-link i.fas.fa-chevron-right {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

/* Optional: add a rotation effect for open dropdowns */
.mobile-nav .nav-link[aria-expanded="true"] i.fas.fa-chevron-right {
    transform: translateY(-50%) rotate(90deg);
}

.mobile-nav .dropdown-menu {
    border: none;
    background-color: #f8f9fa;
    border-radius: 0;
    margin-top: 0;
    padding: 0.5rem 0;
    position: static !important;
    transform: none !important;
    float: none;
    width: 100%;
}

.mobile-nav .dropdown-menu .container,
.mobile-nav .dropdown-menu .row {
    width: 100%;
    padding: 0;
    margin: 0;
}

.mobile-nav .dropdown-header.cryptids-heading {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-top: 1rem;
    padding-bottom: 0.5rem;
}

.mobile-nav-footer {
    margin-top: auto;
    width: 100%;
    padding-top: 1.5rem;
}

/* Responsive navigation adjustments */
@media (min-width: 992px) {
    /* Show desktop nav, hide mobile nav on larger screens */
    .desktop-nav {
        display: flex !important;
    }
    
    .mobile-nav {
        display: none !important;
    }
}

@media (max-width: 991px) {
    /* Hide desktop nav in collapsed state, prepare mobile nav */
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    /* Tablet navigation (576px - 991px) */
    @media (min-width: 576px) {
        .mobile-nav {
            width: 100%;
            left: -100%;
        }
    }
    
    /* Small mobile devices (below 576px) */
    @media (max-width: 575.98px) {
        .mobile-nav {
            width: 100%;
            left: -100%;
        }
    }
    
    /* Logo adjustments for mobile */
    .header-logo-lg {
        display: none;
    }
    
    .header-logo-md {
        display: block;
    }
}

/* Mobile dismiss button styling */
.mobile-dismiss-btn {
    border-radius: 4px;
    padding: 0.6rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-top: 1rem;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.mobile-dismiss-btn:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.mobile-dismiss-btn:active {
    background-color: #dee2e6;
    border-color: #adb5bd;
}

/* Close icon styling */
.mobile-nav-close {
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mobile-nav-close:hover {
    color: #212529;
    background-color: #f8f9fa;
}

/* Extra small devices (phones, 320px - 480px) */
@media only screen and (min-width: 320px) and (max-width: 480px) {
    .header-logo-md {
        height: 30px;
    }
    
    .navbar-brand {
        max-width: 70%;
    }
}

/* Container for content alignment */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Bottombar styles */
.bottombar {
    width: 100%;
    background-color: #f8f9fa;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
}

/* Flexbox layout for the bottombar content - two columns */
.bottombar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Copyright column styling */
.bottombar-copyright {
    flex: 1;
}

.bottombar-copyright p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* Links column styling */
.bottombar-links {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.bottombar-links a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.bottombar-links a:hover {
    color: #212529;
}

/* Responsive adjustments for bottombar */
@media (max-width: 768px) {
    .bottombar-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .bottombar-copyright, .bottombar-links {
        width: 100%;
        text-align: center;
    }
    
    .bottombar-links {
        justify-content: center;
    }
    
    /* Adjust body padding for smaller screens */
    body {
        padding-bottom: 20px; /* Increased padding for the taller bottombar on mobile */
    }
    
    /* Adjust footer padding for smaller screens to account for taller bottombar */
    .site-footer {
        padding-bottom: 20px;
    }
}

/* Footer styles */
.site-footer {
    width: 100%;
    background-color: #000000;
    color: #fff;
    padding: 60px 0 50px; /* Add bottom padding to account for bottombar */
    margin-bottom: 0;
    flex-shrink: 0; /* Prevents the footer from shrinking */
}

/* Flexbox layout for the footer content - four columns */
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

/* Column styling */
.footer-column {
    flex: 1;
    min-width: 200px;
}

/* Branding column specific styles */
.footer-branding {
    flex: 2;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo-lg {
    max-width: 280px;
    height: auto;
    display: block;
    margin-bottom: 15px;
}

.footer-logo-md {
    display: none;
}

.footer-app-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.app-badge {
    max-width: 140px;
    height: auto;
}

/* Headings for columns */
.footer-heading {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Links styling */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

/* Responsive adjustments for footer */
@media (max-width: 992px) and (min-width: 769px) {
    .footer-content {
        flex-wrap: wrap;
    }
    
    .footer-column {
        flex-basis: 45%;
    }
    
    .footer-branding {
        flex-basis: 100%;
        margin-bottom: 20px;
    }
}

/* Mobile devices (320px - 768px) */
@media (min-width: 320px) and (max-width: 768px) {
    .footer-content {
        flex-wrap: wrap;
    }
    
    /* Full width for the branding section only */
    .footer-branding {
        flex-basis: 100%;
        margin-bottom: 30px;
    }
    
    /* Make the navigation columns 3-column layout for all mobile devices */
    .footer-menu, .footer-docs, .footer-terms {
        flex-basis: calc(33.33% - 20px);
        min-width: 0;
    }
    
    .footer-logo-lg {
        display: none;
    }
    
    .footer-logo-md {
        display: block;
        max-width: 200px;
        margin: 0 auto 15px;
    }
    
    .footer-app-links {
        justify-content: center;
    }
    
    .footer-heading {
        text-align: center;
        font-size: 1rem;
    }
    
    .footer-links {
        text-align: center;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }
}

/* Extra small devices specific adjustments (320px - 480px) */
@media (min-width: 320px) and (max-width: 480px) {
    /* Smaller fonts for very small screens */
    .footer-heading {
        font-size: 0.9rem;
    }
    
    .footer-links a {
        font-size: 0.8rem;
    }
    
    /* Tighten up the gap between columns */
    .footer-content {
        gap: 10px;
    }
    
    .footer-menu, .footer-docs, .footer-terms {
        flex-basis: calc(33.33% - 7px);
    }
}

/* Extra small devices (phones, 320px - 480px) */
@media only screen and (min-width: 320px) and (max-width: 480px) {
    /* Custom heading responsive sizes for extra small devices */
    h1.custom-heading {
        font-size: 1.8rem;
    }
    
    h2.custom-heading {
        font-size: 1.6rem;
    }
    
    h3.custom-heading {
        font-size: 1.4rem;
    }
    
    h4.custom-heading {
        font-size: 1.3rem;
    }
    
    h5.custom-heading {
        font-size: 1.2rem;
    }
    
    h6.custom-heading {
        font-size: 1.1rem;
    }
}

/* Small devices (large phones, 481px - 767px) */
@media only screen and (min-width: 481px) and (max-width: 767px) {
    /* Custom heading responsive sizes for small devices */
    h1.custom-heading {
        font-size: 2.2rem;
    }
    
    h2.custom-heading {
        font-size: 1.9rem;
    }
    
    h3.custom-heading {
        font-size: 1.7rem;
    }
    
    h4.custom-heading {
        font-size: 1.5rem;
    }
    
    h5.custom-heading {
        font-size: 1.3rem;
    }
    
    h6.custom-heading {
        font-size: 1.2rem;
    }
}

/* Medium devices (tablets, 768px - 1023px) */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
    /* Custom heading responsive sizes for medium devices */
    h1.custom-heading {
        font-size: 2.5rem;
    }
    
    h2.custom-heading {
        font-size: 2.2rem;
    }
    
    h3.custom-heading {
        font-size: 1.9rem;
    }
    
    h4.custom-heading {
        font-size: 1.6rem;
    }
    
    h5.custom-heading {
        font-size: 1.4rem;
    }
    
    h6.custom-heading {
        font-size: 1.2rem;
    }
}

/* Large devices (laptops/desktops, 1024px - 1199px) */
@media only screen and (min-width: 1024px) and (max-width: 1199px) {
    /* Custom heading responsive sizes for large devices */
    h1.custom-heading {
        font-size: 2.8rem;
    }
    
    h2.custom-heading {
        font-size: 2.4rem;
    }
    
    h3.custom-heading {
        font-size: 2rem;
    }
    
    h4.custom-heading {
        font-size: 1.7rem;
    }
    
    h5.custom-heading {
        font-size: 1.5rem;
    }
    
    h6.custom-heading {
        font-size: 1.25rem;
    }
}

/* Extra large devices (large desktops, 1200px - 1599px) */
@media only screen and (min-width: 1200px) and (max-width: 1599px) {
    /* Custom heading sizes already defined in the main styles above */
}

/* Extra extra large devices (larger desktops, 1600px and up) */
@media only screen and (min-width: 1600px) {
    /* Custom heading responsive sizes for extra large devices */
    h1.custom-heading {
        font-size: 3.5rem;
    }
    
    h2.custom-heading {
        font-size: 3rem;
    }
    
    h3.custom-heading {
        font-size: 2.5rem;
    }
    
    h4.custom-heading {
        font-size: 2rem;
    }
    
    h5.custom-heading {
        font-size: 1.75rem;
    }
    
    h6.custom-heading {
        font-size: 1.5rem;
    }
}

/* Full-page Games Dropdown */
.games-fullpage-dropdown {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: #3ab54a;
    z-index: 1050;
    overflow-y: auto;
    transition: right 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
}

/* About dropdown specific styling */
#aboutFullpageDropdown {
    background-color: #2b8e3a; /* Slightly darker green to differentiate */
}

/* Earn Mash dropdown specific styling */
#earnMashFullpageDropdown {
    background-color: #218f5f; /* Blue-green color */
}

/* Community & News dropdown specific styling */
#communityNewsFullpageDropdown {
    background-color: #1a7a4d; /* Darker blue-green color */
}

.games-fullpage-dropdown.show {
    right: 0;
}

.games-fullpage-dropdown .dropdown-header {
    font-size: 1.5rem;
    padding: 1rem;
    color: #ffffff;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.games-fullpage-dropdown .dropdown-item {
    color: #ffffff;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background-color 0.2s ease;
}

.games-fullpage-dropdown .dropdown-item:hover {
    background-color: rgba(255,255,255,0.15);
    color: #ffffff;
}

.games-dropdown-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.2);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.games-dropdown-close:hover {
    background: rgba(255,255,255,0.3);
}

.games-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.games-dropdown-title {
    font-family: 'Gameria', sans-serif;
    color: #ffffff;
    font-size: 2rem;
    margin: 0;
}

.games-dropdown-content {
    padding: 1.5rem;
}

/* Overlay for when games dropdown is active */
.games-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}

.games-dropdown-overlay.show {
    display: block;
}

/* Responsive adjustments for games dropdown */
@media (min-width: 992px) {
    .games-fullpage-dropdown {
        width: 450px;
    }
}

@media (max-width: 576px) {
    .games-dropdown-title {
        font-size: 1.5rem;
    }
    
    .games-dropdown-close {
        width: 35px;
        height: 35px;
    }
}

/* Create a wrapper for both sticky elements */
.sticky-header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    /* transition: transform 0.3s ease-in-out; */
}

/* When scrolling down, keep the header */

.scroll-down .site-header {
    top: 0;
}

/* Class for when the header is fully sticky */
.header-sticky .site-header {
    position: fixed;
    top: 0;
}

/* Header Game Card Styles */
.header-game-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    border: none;
}

.header-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.header-game-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.header-game-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
}

.header-game-card-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .header-game-card {
        margin-bottom: 1rem;
    }
    
    .header-game-card-title {
        font-size: 1rem;
    }
    
    .header-game-card-text {
        font-size: 0.85rem;
    }
}
