/* Use Flexbox for the sticky footer layout */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: #2c2c2c;
    background-size: 200% 200%;
    animation: gradientBG 10s ease infinite;
    color: #e0e0e0;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes full viewport height */
    overflow-x: hidden; /* Prevent horizontal overflow */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Main container remains flexbox for content alignment */
main {
    display: flex;
    justify-content: center; /* Center the content */
    align-items: flex-start; /* Align items at the top */
    flex: 1 0 auto; /* Grow to fill available space */
    padding-bottom: 20px;
    padding-left: 10px;
    padding-right: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* Wrapper for main content to keep it centered */
.content-wrapper {
    flex: 0 1 600px; /* Match your container's max-width */
    max-width: 600px; /* Consistent with your .container */
}

/* Side ad containers (visible on large screens only) */
.ad-container {
    position: fixed; /* Fixed to stay in viewport */
    width: 300px; /* Width for side ads */
    top: 10px; /* Distance from top of viewport */
    z-index: 10; /* Ensure ads stay above other content */
    display: none; /* Hidden by default */
}

.ad-container.ad-left {
    left: 10px; /* Positioned on the left side */
}

.ad-container.ad-right {
    right: 10px; /* Positioned on the right side */
}

/* Mobile ad containers (visible on small screens only) */
.mobile-ad-container {
    max-width: 600px; /* Match .container */
    margin: 20px auto; /* Center and space like other containers */
    display: none; /* Hidden by default */
}

/* Placeholder ad styling (replace with actual ad code) */
.ad {
    background-color: #444; /* Placeholder color */
    color: #fff;
    height: 600px; /* Default height for side ads */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 10px;
    opacity: 100%;
}

/* Match mobile ad height to faucet card if desired, or keep as placeholder */
.mobile-ad-container .ad {
    height: 150px; /* Example height, adjust to match faucet card if needed */
    width: 100%; /* Full width of container */
}

/* Media queries for ad visibility */
@media (min-width: 1350px) {
    /* Large screens: Show side ads, hide top/bottom ads */
    .ad-container {
        display: block !important;
    }
    .mobile-ad-container {
        display: none !important;
    }
}

@media (max-width: 1349px) {
    /* Small screens: Hide side ads, show top/bottom ads */
    .ad-container {
        display: none !important;
    }
    .mobile-ad-container {
        display: block !important;
    }
    .content-wrapper {
        flex: 1 1 auto; /* Allow content to take full width */
        max-width: 100%; /* Full width on smaller screens */
    }
}

/* Rest of your CSS remains unchanged */
.container {
    max-width: 600px;
}

h1.text-center.text-light {
    color: #00C4FF !important;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 196, 255, 0.7);
}

.card.bg-dark {
    background-color: #2c2c2c !important;
    border: none;
    box-shadow: 0 0 15px rgba(0, 196, 255, 0.5);
    transition: box-shadow 0.3s ease;
}

.card.bg-dark:hover {
    box-shadow: 0 0 25px rgba(0, 196, 255, 0.8);
}

.card-text {
    font-size: 1.2rem;
    color: #00C4FF !important;
    text-shadow: 0 0 5px rgba(0, 196, 255, 0.3);
}

#total-container {
    display: inline-block;
    position: relative;
}

#total {
    color: #e0e0e0;
    font-weight: bold;
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

#total.animate {
    animation: totalPop 0.5s ease;
}

@keyframes totalPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #00C4FF; }
    100% { transform: scale(1); }
}

p.mt-3 {
    color: #00C4FF !important;
    text-shadow: 0 0 5px rgba(0, 196, 255, 0.3);
}

#countdown {
    color: #e0e0e0;
    font-weight: bold;
}

.progress {
    background-color: #333;
    border-radius: 10px;
    height: 20px;
}

.progress-bar {
    background-color: #1a8754 !important;
    transition: width 1s linear;
}

.form-control {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}

.form-control::placeholder {
    color: #aaa;
}

.btn-success {
    background-color: #1a8754;
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.btn-success:not(:disabled) {
    animation: pulse 2s infinite;
}

.btn-success:hover:not(:disabled) {
    transform: scale(1.05);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(26, 135, 84, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(26, 135, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(26, 135, 84, 0); }
}

.btn-success:disabled {
    background-color: #555;
    opacity: 0.7;
    animation: none;
}

.btn-primary {
    background-color: #0d6efd;
    border: none;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

h3 {
    color: #00C4FF !important;
    text-shadow: 0 0 5px rgba(0, 196, 255, 0.3);
}

.text-warning {
    color: #ffcc00 !important;
}

#claim-result p {
    margin: 0;
    font-size: 1rem;
    transition: opacity 0.5s ease-out;
}

#claim-result p.text-success {
    color: #1a8754 !important;
}

/* reCAPTCHA styling */
.recaptcha-wrapper {
    max-width: 100%; /* Ensure it doesn't exceed container width */
    overflow: hidden; /* Prevent overflow */
    position: relative;
    margin: 0 auto; /* Center the reCAPTCHA */
}

.g-recaptcha {
    transform-origin: 0 0; /* Allow scaling */
    transform: scale(1); /* Default scale */
}

/* Additional adjustments for small screens */
@media (max-width: 768px) {
    .recaptcha-wrapper {
        width: 100%; /* Full width on mobile */
        padding: 0 10px; /* Add padding to prevent edge clipping */
    }

    .g-recaptcha {
        transform: scale(0.9); /* Slightly scale down on mobile to fit */
        transform-origin: 0 0;
    }

    main {
        padding-bottom: 10px; /* Reduce padding on mobile */
        padding-left: 5px;
        padding-right: 5px;
    }

    .content-wrapper {
        padding: 0 10px;
    }

    footer {
        padding: 10px 0; /* Reduce padding on mobile */
        font-size: 0.9rem; /* Smaller font size */
    }

    footer p {
        margin: 5px 0; /* Reduce spacing between paragraphs */
    }

    .container {
        padding: 0 15px; /* Ensure content isn’t too close to edges */
    }

    h1.text-center.text-light {
        font-size: 1.5rem; /* Smaller heading on mobile */
    }

    .card-text {
        font-size: 1rem; /* Adjust card text size */
    }

    #total {
        font-size: 1.2rem; /* Smaller total text */
    }
}

footer {
    width: 100%;
    background: rgba(26, 26, 26, 0.8);
    padding: 20px 0;
    backdrop-filter: blur(5px);
    color: #e0e0e0;
    flex-shrink: 0; /* Prevent footer from shrinking */
}