/* Brain Game Styles */

.brain_game_section {
    background: #f8f9fa;
    padding-bottom: 80px;
}

/* Mobile Frame Container */
.mobile_frame {
    width: 320px;
    height: 640px;
    margin: 0 auto;
    background: #333;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 4px solid #444;
}

.mobile_frame::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #666;
    border-radius: 2px;
}

.mobile_screen {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

/* Screen Transitions and backgrounds */
.game_screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 5;
    color: #fff;
}

#screen-welcome,
#screen-user-selection,
#screen-profile,
#screen-quiz {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow-y: auto;
    justify-content: flex-start !important;
    padding-top: 40px;
    /* Space for top bar/fixed elements if any */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

#screen-quiz::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

#screen-results {
    background: url('../images/results_bg.png') no-repeat center center;
    background-size: cover;
    position: relative;
}

#screen-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Darken bg for better contrast */
    z-index: 1;
}

.branding-header,
.results-content {
    z-index: 2;
}

#screen-results .floating_element {
    opacity: 1 !important;
}

.screen_next {
    transform: translateX(100%);
}

.screen_prev {
    transform: translateX(-100%);
}

.screen_active {
    transform: translateX(0);
}

/* Feature Items Styling (Right Side) */
.game_features_content {
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.feature_item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 35px;
}

.feature_icon {
    width: 60px;
    height: 60px;
    background: #e91e63;
    color: #fff;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(233, 30, 99, 0.2);
}

.feature_text h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.feature_text p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

.techstream_branding_box {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
}

.techstream_branding_box img {
    height: 40px;
    margin-right: 15px;
}

.techstream_branding_box p {
    margin: 0;
    font-weight: 600;
    color: #888;
    font-size: 14px;
}

.results-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 25px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Internal SPA Styling */
.welcome_screen h1 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: bounceIn 1s;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes tada {
    from {
        transform: scale3d(1, 1, 1);
    }

    10%,
    20% {
        transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
    }

    30%,
    50%,
    70%,
    90% {
        transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
    }

    40%,
    60%,
    80% {
        transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
    }

    to {
        transform: scale3d(1, 1, 1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 15px rgba(102, 126, 234, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 25px rgba(102, 126, 234, 0.5);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 8px 15px rgba(102, 126, 234, 0.3);
    }
}

.pulse-btn {
    animation: pulse 2s infinite ease-in-out;
}

.hero_image_bounce {
    animation: heroBounce 3s infinite ease-in-out;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

@keyframes heroBounce {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

.star_element {
    position: absolute;
    color: #fff;
    font-size: 10px;
    animation: sparkle 2s infinite alternate;
    pointer-events: none;
}

@keyframes sparkle {
    0% {
        opacity: 0.2;
        transform: scale(0.8) rotate(0deg);
    }

    100% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

.floating_element {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: float 4s infinite ease-in-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.game-btn {
    background: #667eea;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.3);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 20px rgba(102, 126, 234, 0.4);
    background: #764ba2;
}

.game-btn-white {
    background: #fff;
    color: #667eea;
}

.whatsapp-btn {
    background: #25d366;
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background: #128c7e;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: #fff;
}

.game-btn {
    width: 100%;
    padding: 12px 25px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    background: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.parent-child-btns .game-btn {
    justify-content: flex-start !important;
    padding-left: 20px;
    padding-right: 50px;
    /* Space for absolute checkmark */
    white-space: nowrap;
}

.parent-child-btns .game-btn span {
    white-space: nowrap;
}

.selection-check {
    display: none;
    color: #2ecc71;
    font-size: 1.2rem;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.game-btn.selected .selection-check,
.quiz_option.selected .selection-check {
    display: block;
    animation: scaleInSimple 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleInSimple {
    from {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }

    to {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

.btn-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1rem;
    flex-shrink: 0;
}

.game-btn:hover .btn-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.quiz_option {
    width: 100%;
    padding: 15px 20px 15px 20px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.quiz_option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.options-container {
    padding-bottom: 100px;
    /* Space for sticky navigation */
}

.quiz-navigation {
    position: sticky;
    bottom: -20px;
    /* Offset parent bottom padding */
    margin-top: auto;
    margin-left: -20px;
    /* Offset parent left padding */
    margin-right: -20px;
    /* Offset parent right padding */
    margin-bottom: -20px;
    /* Offset parent bottom padding */
    width: calc(100% + 40px);
    padding: 20px 30px 25px;
    /* Extra padding for bottom-edge look */
    background: linear-gradient(to top, #764ba2 0%, #764ba2 80%, transparent 100%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.quiz-navigation .game-btn {
    margin-bottom: 0 !important;
    /* Remove bottom margin inside nav */
}

.quiz_option.selected {
    background: #fff !important;
    color: #667eea !important;
    border: 2px solid #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
    padding: 0 10px;
}

.back-btn {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.gender-selection {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.gender-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 800;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gender-btn img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.gender-btn.selected {
    background: #fff;
    color: #667eea;
}

.boy-btn.selected {
    color: #4facfe;
}

.girl-btn.selected {
    color: #ff0844;
}

.contact-box {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 24px;
    width: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-box input {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 12px;
    padding: 10px 15px;
    margin-bottom: 15px;
    width: 100%;
}

/* Quiz UI Enhancements */
.progress {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 6px !important;
    overflow: hidden;
    width: 100%;
}

.progress-bar {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    height: 100%;
    transition: width 0.4s ease;
}

.quiz-q-counter {
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    letter-spacing: 1px;
}

.question-icon-box {
    display: flex;
    justify-content: center;
    background: transparent;
}

.question-icon-box img {
    mix-blend-mode: screen;
    /* Helps with non-transparent backgrounds on dark themes */
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 99;
    overflow: hidden;
}

.loader-container {
    position: relative;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.webcam-box {
    width: 100%;
    height: 250px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.capture_btns {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

/* Animations */
@keyframes shiver {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(1px, 1px) rotate(0.5deg);
    }

    50% {
        transform: translate(0, -1px) rotate(-0.5deg);
    }

    75% {
        transform: translate(-1px, 1px) rotate(0.5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

.shiver-effect {
    animation: shiver 2.0s infinite;
    display: inline-block;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 1.5s ease-out forwards;
}

/* Input Error State */
.input-error {
    border: 2px solid #ff4d4d !important;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.3) !important;
}

/* Toast Notification */
.toast-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 85%;
}

.toast-box {
    background: rgba(255, 77, 77, 0.95);
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDownIn 0.3s ease-out;
    border-left: 5px solid #fff;
}

@keyframes slideDownIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-box.fade-out {
    animation: fadeOutDown 0.3s ease-in forwards;
}

@keyframes fadeOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-10px);
        opacity: 0;
    }
}

/* Consent Checkbox Styling */
.consent-container {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px 15px;
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    transition: all 0.3s;
}

.consent-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    flex-shrink: 0;
    margin-top: 2px;
}

.consent-container label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    line-height: 1.4;
    margin: 0;
    user-select: none;
}

.consent-container.error-highlight {
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Integrate & Boost Section Styling */
.integrate_boost_section {
    background: #ffffff;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.boost_content_box {
    padding-right: 30px;
}

.boost_content_box p {
    font-size: 18px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.strategy_highlight {
    background: rgba(102, 126, 234, 0.05);
    border-left: 5px solid #667eea;
    padding: 20px;
    border-radius: 0 15px 15px 0;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.strategy_highlight .icon_box {
    width: 45px;
    height: 45px;
    background: #667eea;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.strategy_highlight p {
    margin: 0;
    font-size: 15px;
    color: #444;
}

.boost-btn {
    width: fit-content !important;
    padding: 15px 40px !important;
}

.boost_img_box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp_mockup_img {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 8px solid #333;
    /* Simulate a phone frame */
    transition: transform 0.3s ease;
}

.whatsapp_mockup_img:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .boost_content_box {
        padding-right: 0;
        margin-bottom: 50px;
        text-align: center;
    }

    .heading_container.heading_center,
    .heading_container {
        justify-content: center;
    }

    .strategy_highlight {
        text-align: left;
    }

    .boost-btn {
        margin: 0 auto;
    }

    .whatsapp_mockup_img {
        max-width: 100%;
    }
}