/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General Styles */
html,
body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: #f4f4f4;
    color: #333;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
}

/* Header & Navigation */
header {
    background: #222;
    color: #fff;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
}

/* Main Content & Sections */
main {
    flex: 1;
    padding: 1.5rem;
    max-width: 1440px;
    margin: 0 auto;
}

/* Game Section */
.game-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.game-link {
    display: block;
    padding: 1.2rem;
    text-decoration: none;
    color: inherit;
}

.game-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    position: relative;
    overflow: hidden;
}

.game-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.game-card:hover .game-icon {
    transform: rotate(360deg);
}

.game-card h2 {
    font-size: 1.3rem;
    text-align: center;
    color: #222;
}

.game-card p {
    font-size: 0.85rem;
    text-align: center;
    color: #555;
}

/* Content Section */
.content-section {
    display: flex;
    flex-direction: column;
    padding: 40px 80px;
    background: #f8f8f8;
    color: #444;
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.content-title {
    font-size: 2.6rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 700;
}

.content-description {
    font-size: 1.2rem;
    margin-bottom: 25px;
    line-height: 1.8;
    color: #666;
}

.cta-button {
    background-color: #00bcd4;
    color: #fff;
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
}

.cta-button:hover {
    background-color: #0097a7;
    transform: translateY(-3px);
}

/* FAQ Section */
.faq-section {
    background: #e0f7fa;
    padding: 60px 0;
    margin: 50px auto;
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.faq-title {
    font-size: 2.8rem;
    color: #0288d1;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 1px;
}

.faq-wrapper {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 10px;
}

.faq-item {
    padding: 25px 35px;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 5px solid #0288d1;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.faq-question {
    font-size: 1.6rem;
    font-weight: 600;
    color: #0288d1;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.faq-answer {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    transition: color 0.3s ease;
}

/* Footer */
footer {
    background: #222;
    color: #fff;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer p {
    margin-top: 10px;
    font-size: 14px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    margin-bottom: 10px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease, padding 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .game-section {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 1rem !important;
    }
}

@media (max-width: 768px) {
    .game-section {
        grid-template-columns: 1fr !important;
    }

    .content-section {
        padding: 25px 20px !important;
    }

    .content-title {
        font-size: 2.2rem !important;
    }

    .content-description {
        font-size: 1rem !important;
    }

    .cta-button {
        font-size: 1rem !important;
        padding: 12px 24px !important;
    }

    .faq-title {
        font-size: 2.2rem !important;
    }

    .faq-item {
        padding: 20px !important;
    }

    main {
        padding: 1rem !important;
    }

    .game-card {
        max-width: 400px !important;
        margin: 0 auto !important;
    }

    header {
        padding: 0.3rem 1rem !important;
    }

    header h1 {
        font-size: 1.3rem !important;
    }

    footer {
        padding: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .faq-title {
        font-size: 1.8rem !important;
    }

    .faq-item {
        padding: 15px !important;
    }

    .footer-links {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .footer-links a {
        margin: 0 !important;
        padding: 0.25rem 0 !important;
    }

    .game-icon-wrapper {
        width: 80px !important;
        height: 80px !important;
    }

    .game-card h2 {
        font-size: 1.2rem !important;
    }

    .game-card p {
        font-size: 0.8rem !important;
    }
}

/* ===== Back to Top (responsive) ===== */
:root{
  /* Tweak these if you like */
  --btp-size: 52px;            /* desktop default */
  --btp-bg: #e53935;
  --btp-fg: #ffffff;
  --btp-bg-hover: #ffffff;
  --btp-fg-hover: #e53935;
  --btp-shadow: 0 8px 16px rgba(0,0,0,.25);
  --btp-right: 20px;           /* distance from right edge */
  --btp-bottom: 24px;          /* distance from bottom */
  --btp-z: 2147483000;         /* very high z-index */
}

.btp{
  position: fixed;
  right: var(--btp-right);
  bottom: var(--btp-bottom);
  width: var(--btp-size);
  height: var(--btp-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--btp-bg);
  background: var(--btp-bg);
  color: var(--btp-fg);
  box-shadow: var(--btp-shadow);
  cursor: pointer;
  z-index: var(--btp-z);
  outline: none;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease, opacity .2s ease;
  opacity: 0;                  /* hidden by default */
  pointer-events: none;
}

.btp:hover{
  background: var(--btp-bg-hover);
  color: var(--btp-fg-hover);
  border-color: var(--btp-fg-hover);
}

.btp:focus-visible{
  box-shadow: 0 0 0 3px rgba(229,57,53,.35), var(--btp-shadow);
}

/* Visible state (added by JS) */
.btp--show{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Hide state animation baseline */
.btp{
  transform: translateY(8px);
}

/* Size tweaks for tablet & mobile */
@media (max-width: 1024px){
  :root{ --btp-size: 48px; --btp-right: 18px; --btp-bottom: 20px; }
}
@media (max-width: 640px){
  :root{ --btp-size: 44px; --btp-right: 14px; --btp-bottom: 16px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .btp{ transition: none; }
}

/* If a chat widget overlaps, add a body class and offset more on small screens
   Example: body.has-chat .btp { bottom: 92px; } */


/* --- Desktop & Tablet Header Styles --- */

.site-header {
    background-color: #000000; /* Light black background */
    color: #fff;
    padding: 10px 0;
    width: 100%;
}

.header-top {
    padding: 0 140px;
    margin-bottom: 1px;
}

.logo {
    margin: 0;
    text-align: center; /* Centers the logo */
}

.logo a {
    text-decoration: none;
    color: #fff; /* White site title */
    font-size: 1.8rem;
}

.header-bottom {
    width: 2400px;
}

.main-nav ul {
    display: flex;
    justify-content: center; /* Center links on desktop */
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0 15px;
    flex-wrap: wrap; /* Allows links to wrap if screen is very narrow */
}

.main-nav a {
    display: block;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    background-color: #444;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: #666;
}



/* --- Mobile Header Styles (New Look) --- */

@media (max-width: 768px) {
    /* Hide the desktop nav container on mobile */
    .header-bottom {
        display: none;
    }
    
     .header-top {
        padding: 0 105px; /* Use a smaller padding for mobile */
        margin-bottom: 5px; /* Adjusted for better spacing */
    }

    /* New container for the scrollable menu */
    .mobile-nav-container {
        flex: 0 0 9%;
        overflow-x: auto; /* Use 'auto' for scrolling only when needed */
        white-space: nowrap;
        background-color: #000; /* Black background from your example */
        border-top: 2px solid #333;
        border-bottom: 2px solid #333;
        padding: 0 15px; /* Padding on the left and right */

        /* Hides the scrollbar but keeps it scrollable */
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }

    .mobile-nav-container::-webkit-scrollbar {
        display: none; /* Hides scrollbar for Chrome/Safari */
    }

    .mobile-nav-menu {
        display: flex;
        gap: 5px; /* Space between items */
        padding: 10px 0; /* Vertical padding for the items */
    }

    .mobile-nav-menu a {
        display: inline-block;
        padding: 8px 15px;
        background-color: #333;
        color: white;
        text-decoration: none;
        font-weight: bold;
        border-radius: 4px;
        text-transform: uppercase; /* Makes text uppercase like the example */
        font-family: sans-serif;
    }
}

/* --- Control Navigation Visibility --- */
/* --- Fix for Mobile Horizontal Scrolling --- */

html, body {
    width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}
/* Hide the mobile navigation by default on larger screens */
.mobile-nav-container {
    display: none;
}

/* Media query for mobile devices (screens 768px or smaller) */
@media (max-width: 768px) {
    /* Hide the original desktop/tablet navigation bar */
    .header-bottom {
        display: none;
    }

    /* Show the mobile-specific navigation bar */
    .mobile-nav-container {
        display: block; /* Or 'flex' if needed for its children */
    }
}

/* Container for the full-width game iframe */
.game-container-full-width {
    width: 100%;
    height: 500px; /* Or your desired height */
    background-color: #000; /* Optional: adds a background color */
    padding: 0;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container-full-width iframe {
    width: 100%;
    max-width: 1200px; /* Optional: sets a max width for the game on very large screens */
    height: 100%;
    border: none;
}
/* --- Force Full-Width on Mobile --- */

@media (max-width: 640px) {
    .game-container-full-width {
        width: 100vw; /* 100% of the viewport width */
        position: relative;
        left: 50%;
        margin-left: -50vw;

        /* Remove any extra spacing */
        border: none;
        padding: 0;
        border-radius: 0;
    }
}


/* Mobile-only footer styling */
@media (max-width: 640px) {
  footer{
    background:#000 !important;
    color:#fff !important;
    padding:24px 12px !important;
    text-align:center !important;
  }

  footer .footer-links{
    display:grid !important;
    grid-template-columns:repeat(3, 1fr) !important; /* 3 across like the screenshot */
    gap:22px 28px !important;                        /* row/column spacing */
    justify-items:center !important;
    align-items:center !important;
    max-width:100% !important;
    margin:0 auto 10px auto !important;
  }

  footer .footer-links a{
    color:#fff !important;
    text-decoration:none !important;
    font-size:14px !important;
    line-height:1.0 !important;
    font-weight:500 !important;
    padding:6px 4px !important;      /* bigger tap target */
    display:inline-block !important;
  }

  footer .footer-links a:hover,
  footer .footer-links a:active{
    color:#ddd !important;
  }

  footer p{
    margin:4px 0 0 !important;
    font-size:11px !important;
    line-height:1.0 !important;
    color:#fff !important;
  }
}
