@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: #f8fafc;
    position: relative;
    overflow-x: hidden;
}

/* Glossy overlay effect */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 20%,
    transparent 70%);
    animation: shine 15s linear infinite;
    pointer-events: none;
}

@keyframes shine {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.ad-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 970px;
    margin: 0 auto;
    text-align: center;
}

.ad-container p {
    font-size: 1rem;
}

.badge {
    background: linear-gradient(145deg, #374151 0%, #1f2937 100%);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transform: rotate(-5deg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
            45deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%
    );
    animation: shine-badge 3s infinite;
}

@keyframes shine-badge {
    from {
        transform: translateX(-100%) translateY(-100%);
    }
    to {
        transform: translateX(100%) translateY(100%);
    }
}

.badge:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.age-container {
    text-align: center;
    padding: 30px 20px;
    max-width: 970px;
    margin: 0 auto 4vh auto;
}

.age-container h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.age-options {
    display: grid;
    gap: 12px;
    max-width: 320px;
    margin: 1.5rem auto 0 auto;
}

.age-option {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    padding: 10px 32px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.age-option::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
            45deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%
    );
    transition: 0.5s;
    animation: shine-button 3s infinite;
}

.age-option:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

@keyframes shine-button {
    from {
        transform: translateX(-100%) translateY(-100%);
    }
    to {
        transform: translateX(100%) translateY(100%);
    }
}

.age-option:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.intro-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 40px;
    margin: 10px auto;
    max-width: 970px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.intro-box h1 {
    font-size: 1.6rem;
    color: #f8fafc;
    margin-bottom: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.intro-box h2 {
    font-size: 1rem;
    color: #f8fafc;
    margin-bottom: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.intro-box h3 {
    color: #f8fafc;
    margin-bottom: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.intro-box p {
    color: #cbd5e1;
    margin-bottom: 5px;
    font-size: 1rem;
}

.intro-box {
    color: #cbd5e1;
    margin-bottom: 5px;
    font-size: 1rem;
}

footer {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #f8fafc;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

footer p {
    color: #94a3b8;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .badge {
        width: 140px;
        height: 140px;
    }

    .badge .age {
        font-size: 3rem;
    }

    .intro-box {
        padding-block: 20px;
        padding-inline: 10px;
        margin: 10px;
    }

    .age-container h2 {
        font-size: 1.6rem;
    }

    .counter-container {
        width: 336px;
    }
}

.content-container {
    display: flex;
    flex-direction: column;
    max-width: 970px;
    padding: 20px;
    margin: 0 auto;
}

.content-container h1 {
    line-height: 5rem;
}

.content-container h3 {
    line-height: 2.4rem;
}

.content-container p {
    line-height: 1.5rem;
}

.counter-container {
    width: 100%;
    max-width: 970px;
    margin: 0 auto;
    font-size: 1.2rem;
    font-weight: 600;
    color: black;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.quiz-box {
    min-height: 40vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 10px 30px;
    width: 100%;
    max-width: 970px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header {
    display: grid;
    grid-auto-flow: column;
    align-content: center;
    gap: 4px;
}

.header h3 {
    color: #4CAF50;
    margin: 8px 0;
}

.svg {
    width: 25px;
    height: 25px;
    animation: loader-animation 1s linear infinite;
}

@keyframes loader-animation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#reward {
    font-size: 18px;
    color: #4CAF50;
    font-weight: bold;
    margin-bottom: 15px;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    max-width: 120px;
    padding: 12px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

#reward-text {
    color: #4CAF50;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}

h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

#question {
    font-size: 18px;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: bold;
}

#options {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    gap: 10px;
}

/* Option styling with fully darkened colors for correct and wrong answers */
.option {
    background: #f4f4f4;
    border-radius: 8px;
    padding: 12px;
    transition: background-color 0.3s, transform 0.2s;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.option:hover {
    transform: scale(1.02);
}

.option.correct {
    background-color: #006400; /* Full Dark Green for Correct Answer */
    color: #fff;
}

.option.wrong {
    background-color: #8b0000; /* Full Dark Red for Wrong Answer */
    color: #fff;
}

.option label {
    font-size: 16px;
    cursor: pointer;
    color: black;
    font-weight: bold;
}

#results {
    margin: 5px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    height: 20px;
}

.click-button {
    display: inline-block;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(90deg, #ff7e5f, #feb47b); /* Gradient background */
    border: none;
    border-radius: 8px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    margin-left: 20px;
    margin-top: 10px;
}

.hidden {
    display: none;
}

.click-button:disabled {
    background: #ccc; /* Greyed-out background */
    color: #666; /* Dimmed text */
    cursor: not-allowed; /* Show not-allowed cursor */
    box-shadow: none; /* Remove shadow */
    opacity: 0.6; /* Reduce opacity */
}

.click-button:disabled {
    background: #ccc; /* Greyed-out background */
    color: #666; /* Dimmed text */
    cursor: not-allowed; /* Show not-allowed cursor */
    box-shadow: none; /* Remove shadow */
    opacity: 0.6; /* Reduce opacity */
}

/* Hover Effect */
.click-button:hover {
    background: linear-gradient(90deg, #feb47b, #ff7e5f); /* Reverse gradient */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px); /* Lift effect */
}

/* Active Effect */
.click-button:active {
    transform: translateY(1px); /* Slightly pressed look */
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

#p-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 40;
    pointer-events: none;
    display: none;
}

#p-overlay.active {
    display: block;
    pointer-events: auto;
}

#p {
    position: fixed;
    top: 9rem;
    left: 2.5rem;
    right: 2.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    pointer-events: none;
}

#p.active {
    display: flex;
    pointer-events: auto;
}

.p-content {
    position: relative;
    background-color: #2d2d2d;
    border: 4px solid white;
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    width: 24rem;
    text-align: center;
    font-size: 1.6rem;
}

.close-btn {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #e3342f;
    color: white;
    width: 1.6rem;
    height: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.6rem;
    font-weight: bold;
    cursor: pointer;
}

.p-content h2 {
    font-size: 1.75rem;
    font-weight: bold;
    color: #38bdf8;
}

.p-content p {
    margin-top: 0.75rem;
    font-size: 1.4rem;
    font-weight: 500;
    text-align: center;
}

.progress-button {
    position: relative;
    overflow: hidden;
    background-color: gray;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    min-width: 200px;
    border-radius: 10px;
    margin-top: 20px;
}

.progress-button:hover {
    background-color: rgba(0, 100, 0, 0.8);
}

.progress-button:disabled {
    cursor: not-allowed;
    opacity: 1;
}

.button-text {
    position: relative;
    z-index: 2;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background-color: rgba(0, 100, 0);
    z-index: 1;
    transition: width 3s linear;
}

.bottom-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 100px;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 16px;
    z-index: 1000;
    transition: opacity 0.4s ease, transform 0.4s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.bottom-banner.closing {
    opacity: 0;
    transform: translateY(100%);
}

.close-banner {
    position: absolute;
    right: 15px;
    top: -5%;
    transform: translateY(-50%);
    background-color: white;
    border: none;
    color: black;
    font-size: 18px;
    cursor: pointer;
    border-radius: 15px;
}

.bottom-banner-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

#captcha-container input,
#captcha-container button {
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
}

#captcha-container button {
    background-color: #26609f;
    color: white;
    cursor: pointer;
}

#captcha-container button:hover {
    background-color: #1e4d7d;
}

#age {
    display: block;
}