        :root {
            --yellow: #febf11;
            --blue: #4186cb;
            --dark-gray: #2c2c2c;
            --black: #121212;
            --white: #ffffff;
            --light-yellow: #fff2d6;
            --light-blue: #d4e6ff;
            --green: #5cb85c;
            --purple: #a64ac9;
            --red: #ff5a5f;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif;
        }
        
        html, body {
            height: 100%;
            margin: 0;
        }

        body {
            background-color: var(--light-blue);
            color: var(--dark-gray);
            line-height: 1.6;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="50" height="50" x="0" y="0" fill="%23d4e6ff"/><rect width="50" height="50" x="50" y="50" fill="%23d4e6ff"/><rect width="50" height="50" x="50" y="0" fill="%23c4dfff"/><rect width="50" height="50" x="0" y="50" fill="%23c4dfff"/></svg>');
            overflow-x: hidden;
        }
        
        p {
            margin-bottom: 1rem;
        }

        .clouds {
            position: fixed;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            pointer-events: none;
            z-index: -1;
            overflow: hidden;
        }
        
        .cloud {
            position: absolute;
            background: white;
            border-radius: 100px;
            opacity: 0.8;
        }
        
        .cloud:before, .cloud:after {
            content: '';
            position: absolute;
            background: white;
            border-radius: 50%;
        }
        
        .cloud-1 {
            width: 200px;
            height: 60px;
            top: 10%;
            left: -200px;
            animation: moveCloud 80s linear infinite;
        }
        
        .cloud-1:before {
            width: 80px;
            height: 80px;
            top: -40px;
            left: 30px;
        }
        
        .cloud-1:after {
            width: 60px;
            height: 60px;
            top: -30px;
            left: 110px;
        }
        
        .cloud-2 {
            width: 150px;
            height: 50px;
            top: 30%;
            left: -150px;
            animation: moveCloud 60s linear infinite;
            animation-delay: 15s;
        }
        
        .cloud-2:before {
            width: 60px;
            height: 60px;
            top: -30px;
            left: 25px;
        }
        
        .cloud-2:after {
            width: 50px;
            height: 50px;
            top: -25px;
            left: 80px;
        }
        
        .cloud-3 {
            width: 180px;
            height: 55px;
            top: 60%;
            left: -180px;
            animation: moveCloud 70s linear infinite;
            animation-delay: 30s;
        }
        
        .cloud-3:before {
            width: 70px;
            height: 70px;
            top: -35px;
            left: 28px;
        }
        
        .cloud-3:after {
            width: 55px;
            height: 55px;
            top: -27px;
            left: 100px;
        }
        
        @keyframes moveCloud {
            0% {
                left: -200px;
            }
            100% {
                left: calc(100% + 200px);
            }
        }
        
        header {
            background-color: var(--blue);
            padding: 1rem;
            position: relative;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            border-bottom: 5px solid var(--yellow);
            z-index: 10;
        }
        
        .logo-container {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 0.5rem;
        }
        
        .logo {
            font-size: 2.5rem;
            font-weight: bold;
            color: var(--yellow);
            display: flex;
            align-items: center;
            text-shadow: 2px 2px 0 var(--dark-gray);
            letter-spacing: 1px;
        }
        
        .logo span {
            color: var(--white);
        }
        
        .chess-icon {
            display: inline-block;  /* Ensures proper spacing */
            margin-right: 10px;
            width: 48px;
            height: 48px;
            transform: rotate(-5deg);
            filter: drop-shadow(2px 2px 0 var(--dark-gray));
            object-fit: contain; /* Ensures full image is shown */
            animation: bounce 2s ease-in-out infinite alternate;
        }
        
        
        .fa-info-circle {
            color: #ffffff;
            font-size: 1.25rem;
        }

        nav ul {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            list-style: none;
            gap: 0.5rem;
        }
        
        nav ul li a {
            color: var(--white);
            text-decoration: none;
            font-weight: 700;
            padding: 0.5rem 1rem;
            border-radius: 50px;
            transition: all 0.3s ease;
            background-color: var(--dark-gray);
            display: inline-block;
            border: 3px solid var(--yellow);
            box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
            text-transform: uppercase;
            font-size: 0.9rem;
        }
        
        nav ul li a:hover, 
        nav ul li a.active {
            background-color: var(--yellow);
            color: var(--dark-gray);
            transform: translateY(-3px);
            box-shadow: 3px 6px 0 rgba(0, 0, 0, 0.2);
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem 1rem;
        }
        
        .hero {
            text-align: center;
            padding: 2rem 1rem 3rem;
            background-color: var(--blue);
            border-radius: 20px;
            margin-bottom: 3rem;
            position: relative;
            overflow: hidden;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
            border: 5px solid var(--yellow);
        }
        
        .hero::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 30px;
            background: repeating-linear-gradient(
                45deg,
                var(--yellow),
                var(--yellow) 10px,
                var(--blue) 10px,
                var(--blue) 20px
            );
            bottom: 0;
            left: 0;
        }
        
        .chess-characters {
            position: absolute;
            bottom: 30px;
            height: 120px;
            width: 100%;
            display: flex;
            justify-content: space-around;
        }
        
        .chess-character {
            width: 100px;
            height: 100px;
            animation: bounce 2s ease-in-out infinite alternate;
            display: inline-block;
            object-fit: contain;
        }
        
        .chess-character:nth-child(1) { animation-delay: 0s; }
        .chess-character:nth-child(2) { animation-delay: 0.2s; }
        .chess-character:nth-child(3) { animation-delay: 0.4s; }
        .chess-character:nth-child(4) { animation-delay: 0.6s; }
        .chess-character:nth-child(5) { animation-delay: 0.8s; }
        
        @keyframes bounce {
            0% {
                transform: translateY(0) rotate(0deg);
            }
            100% {
                transform: translateY(-20px) rotate(10deg);
            }
        }
        
        .hero h1 {
            font-size: 3rem;
            color: var(--yellow);
            margin-bottom: 1rem;
            text-shadow: 3px 3px 0 var(--dark-gray);
            letter-spacing: 1px;
        }
        
        .hero p {
            font-size: 1.3rem;
            max-width: 800px;
            margin: 0 auto 7rem;
            color: var(--white);
            text-shadow: 1px 1px 0 var(--dark-gray);
        }
        
        .btn {
            display: inline-block;
            background-color: var(--yellow);
            color: var(--dark-gray);
            padding: 1rem 2rem;
            border-radius: 50px;
            text-decoration: none;
            font-weight: bold;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            font-size: 1.2rem;
            box-shadow: 0 6px 0 darken(var(--yellow), 10%);
            position: relative;
            text-transform: uppercase;
            border: 3px solid var(--dark-gray);
            z-index: 1;
        }
        
        .btn:hover {
            background-color: var(--white);
            transform: translateY(-3px);
        }
        
        .btn:active {
            transform: translateY(3px);
            box-shadow: 0 3px 0 darken(var(--yellow), 10%);
        }
        
        .games-heading {
            text-align: center;
            margin-bottom: 2rem;
            position: relative;
        }
        
        .section-title {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            color: var(--blue);
            text-shadow: 2px 2px 0 var(--dark-gray);
            display: inline-block;
            position: relative;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 80%;
            height: 6px;
            background-color: var(--yellow);
            border-radius: 3px;
        }
        
        .section-description {
            text-align: center;
            max-width: 800px;
            margin: 0 auto 2rem;
            font-size: 1.2rem;
            color: var(--dark-gray);
        }
        
        .hidden {
            display: none !important;
        }

        .games-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 2rem;
        }
        
        .game-card {
            background-color: var(--white);
            border-radius: 20px;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
            border: 5px solid var(--yellow);
            position: relative;
            display: flex; /* Add this */
            flex-direction: column; /* Add this */
        }
        
        .game-card:hover {
            transform: translateY(-15px) rotate(2deg);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
        }
        
        .game-card:nth-child(even):hover {
            transform: translateY(-15px) rotate(-2deg);
        }
        
        .game-image {
            height: 200px;
            width: 100%;
            background-color: var(--light-yellow);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }
        
        .game-placeholder {
            width: 100%;
            height: 100%;
            object-fit: contain; /* Ensures the image maintains its aspect ratio */
            transition: transform 0.3s ease; /* Add a smooth transition for hover effects */
        }
        
        .game-card:nth-child(1) .game-placeholder { color: var(--blue); }
        .game-card:nth-child(2) .game-placeholder { color: var(--green); }
        .game-card:nth-child(3) .game-placeholder { color: var(--purple); }
        .game-card:nth-child(4) .game-placeholder { color: var(--red); }
        .game-card:nth-child(5) .game-placeholder { color: var(--yellow); }
        .game-card:nth-child(6) .game-placeholder { color: var(--blue); }
        
        .game-difficulty {
            position: absolute;
            top: 15px;
            right: 15px;
            background-color: var(--yellow);
            color: var(--dark-gray);
            padding: 0.4rem 1rem;
            border-radius: 50px;
            font-weight: bold;
            font-size: 0.9rem;
            box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
            border: 2px solid var(--dark-gray);
            transform: rotate(5deg);
        }
        
        .game-details {
            padding: 1.5rem;
            flex-grow: 1; /* Add this to make the text container flexible */
            display: flex; /* Add this */
            flex-direction: column; /* Add this */
        }
        
        .game-title {
            font-size: 1.3rem;
            margin-bottom: 0.5rem;
            color: var(--blue);
            font-weight: bold;
            letter-spacing: 1px;
        }
        
        .game-description {
            margin-bottom: 1.5rem;
            font-size: 1rem;
            color: var(--dark-gray);
            flex-grow: 1; /* Add this to allow the description to take up remaining space */
        }
        
        .play-button {
            display: block;
            width: 100%;
            padding: 0.6rem;
            background-color: var(--light-yellow);
            color: var(--dark-gray);
            text-align: center;
            text-decoration: none;
            font-size: 1rem;
            font-weight: bold;
            border-radius: 10px;
            border: 2px solid var(--yellow);
            transition: background-color 0.3s ease, transform 0.3s ease;
            margin-top: auto; /* Add this to push the button to the bottom */
        }
        
        .play-button:hover {
            background-color: var(--yellow); /* Change color on hover */
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a shadow */
        }
        
        .play-button:active {
            transform: translateY(0); /* Reset lift effect on click */
        }
        
        .filters {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 2rem;
        }
        
        .filter-btn {
            background-color: var(--white);
            color: var(--dark-gray);
            border: 3px solid var(--blue);
            padding: 0.7rem 1.5rem;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: bold;
            font-size: 1rem;
            box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
        }
        
        .filter-btn:hover,
        .filter-btn.active {
            background-color: var(--blue);
            color: var(--white);
            transform: translateY(-3px);
            box-shadow: 3px 6px 0 rgba(0, 0, 0, 0.1);
        }
        
        .filter-btn.active {
            border-color: var(--yellow);
        }
        
        footer {
            background-color: var(--blue);
            padding: 2rem;
            text-align: center;
            margin-top: 3rem;
            position: relative;
            border-top: 5px solid var(--yellow);
        }
        
        footer::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 30px;
            background: repeating-linear-gradient(
                45deg,
                var(--yellow),
                var(--yellow) 10px,
                var(--blue) 10px,
                var(--blue) 20px
            );
            top: 0;
            left: 0;
            transform: translateY(-100%);
        }
        
        .footer-links {
            display: flex;
            justify-content: center;
            gap: 2rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }
        
        .footer-link {
            color: var(--white);
            text-decoration: none;
            transition: all 0.3s ease;
            font-weight: bold;
            font-size: 1.1rem;
            text-shadow: 1px 1px 0 var(--dark-gray);
        }
        
        .footer-link:hover {
            color: var(--yellow);
            transform: scale(1.1);
        }
        
        .copyright {
            color: var(--white);
            font-size: 1rem;
        }
        
        .social-icons {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        
        .social-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: var(--white);
            color: var(--blue);
            text-decoration: none;
            transition: all 0.3s ease;
            font-size: 1.5rem;
            font-weight: bold;
            box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
            border: 3px solid var(--yellow);
        }
        
        .social-icon:hover {
            background-color: var(--yellow);
            transform: translateY(-5px) rotate(10deg);
            box-shadow: 3px 8px 0 rgba(0, 0, 0, 0.2);
            color: var(--white);
        }
        
        /* Mobile menu */
        .menu-toggle {
            display: none;
            flex-direction: column;
            justify-content: space-between;
            width: 35px;
            height: 24px;
            cursor: pointer;
            position: absolute;
            top: 1.5rem;
            right: 1.5rem;
            z-index: 100;
        }
        
        .menu-toggle span {
            display: block;
            height: 4px;
            width: 100%;
            background-color: var(--white);
            border-radius: 4px;
            transition: all 0.3s ease;
        }
        
/* Confetti Animation Styles */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -10px;
    border-radius: 0;
    animation: fall 10s linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
    }
}


/* Small confetti styles */
.small-confetti {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.confetti.small {
    position: absolute;
    top: -5px;
    animation: smallfall 3s linear forwards;
}

@keyframes smallfall {
    to {
        transform: translateY(100px) rotate(720deg);
        opacity: 0;
    }
}

.text-page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.text-page-container {
    max-width: 980px;
    margin: 80px auto 0; /* Ensure it starts below the header */
    padding: 2rem;
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-15px) rotate(-2deg);
    border: 5px solid var(--yellow);
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
}

.image-page-container {
    max-width: 980px;
    margin: 80px auto 0;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-15px) rotate(-2deg);
    border: 5px solid var(--yellow);
    overflow: hidden; /* Hide overflow */
    max-height: calc(100vh - 100px);
    position: relative; /* For positioning the button */
}

.mySlides {display: none;}

/* Fading animation */
.fade {
    animation-name: fade;
    animation-duration: 4s;
  }
  
  @keyframes fade {
    from {opacity: .1} 
    to {opacity: 1}
  }

.product-container {
    width: 100%;
    height: 100%;
    position: relative; /* For positioning the button */
}

.product-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image covers the container without distortion */
    border-radius: 15px; /* Match the container's border radius */
    background-color: #d4e6ff;
    max-height: 490px;
}

/* Style for the button */
.button-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px; /* Adjust spacing between buttons */
}

.overlay-button {
    position: relative; /* Position the button absolutely within the container */
    padding: 10px 20px; /* Add padding for better clickability */
    background-color: var(--dark-gray); /* Use your theme color */
    color: var(--white); /* Text color */
    border: none;
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Change cursor to pointer on hover */
    font-size: 14px; /* Adjust font size */
    font-weight: bold; /* Make the text bold */
    text-decoration: none; /* Remove underline if it's a link */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
    z-index: 10; /* Ensure the button is above the image */
}

/* Hover effect for the button */
.text-page-container1 .overlay-button:hover {
    background-color: var(--yellow); /* Darken the button on hover */
    color: var(--dark-grey); /* Use your theme color */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Increase shadow on hover */
}

.text-content {
    flex: 1;
    margin-right: 2rem;
}

.image-container {
    flex: 0 0 25%;
    max-width: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 1rem 0;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.text-page-container h1 {
    color: var(--blue);
    text-align: center;
    margin-bottom: 1rem;
}
.text-page-container p {
    font-size: 1.25rem;
    color: var(--dark-gray);
    line-height: 1.8;
    text-align: justify;
}

.address-info {
    flex: 1;
}

.address-info address {
    font-style: normal;
    line-height: 1.8; /* Improve readability */
}

.address-info .form-group {
    display: flex; /* Use flexbox to align icon and text */
    align-items: flex-start; /* Vertically center the icon and text */
    margin-bottom: 1rem; /* Add spacing between each contact detail */
}

.address-info .form-group i {
    color: var(--blue); /* Use the blue color from your palette */
    font-size: 1.2rem; /* Adjust the size as needed */
    margin-right: 1.5rem; /* Add some spacing between the icon and text */
    flex-shrink: 0; /* Prevent the icon from shrinking */
    margin-top: 0.6rem;
}

.address-info .form-group p {
    margin: 0; /* Remove default margin */
}

/* Specific rule for form-groups with multiple <p> elements (like URLs) */
.address-info .form-group.multiple-lines {
    flex-direction: column; /* Stack <p> elements vertically */
}

.address-info .form-group.multiple-lines p {
    margin-bottom: 0.5rem; /* Add spacing between stacked <p> elements */
}

.address-info .form-group.multiple-lines p:last-child {
    margin-bottom: 0; /* Remove margin from the last <p> element */
}

.address-info a {
    color: var(--blue); /* Use the blue color for links */
    text-decoration: none; /* Remove underline */
    transition: color 0.3s ease; /* Add a smooth transition */
}

.address-info a:hover {
    color: var(--yellow);
}

@media (max-width: 1024px) {
.text-page-container p {
    font-size: 1.1rem;
}
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }
    
    nav.active {
        max-height: 500px;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        padding-top: 1rem;
    }
    
    nav ul li {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    nav ul li a {
        display: block;
        padding: 0.8rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .chess-characters {
        height: 80px;
    }
    
    .chess-character {
        font-size: 50px;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .play-button {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    .text-page-container {
        flex-direction: column;
    }
    .text-content {
        margin-right: 0; /* Remove the margin between text and image */
        margin-bottom: 2rem; /* Add space below the text */
    }

    .image-container {
        flex: 0 0 auto; /* Reset flex for mobile */
        max-width: 100%; /* Take up full width on smaller screens */
        height: 300px; /* Set a fixed height for the image on mobile */
        margin: 0 0 2rem 0; /* Add margin below the image */
    }

    .image-container img {
        height: 100%; /* Ensure the image fills the height */
        width: auto; /* Allow the image to scale proportionally */
        max-width: 100%; /* Ensure the image doesn't overflow */
    }
    
    .text-page-container h1 {
        font-size: 1.8rem;
    }
    .text-page-container p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-image {
        height: 180px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 6rem;
    }
    
    .btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
    
    .footer-links {
        gap: 1rem;
    }

    .text-page-container {
        max-width: 95%;
        padding: 1rem;
        margin-top: 50px;
    }
    .text-page-container h1 {
        font-size: 1.5rem;
    }
    .text-page-container p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}
