﻿/* Container Styling */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* APP LAYOUT */
.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* MAIN CONTENT AREA */
.app-content {
    flex: 1;
    /* center content */
    display: flex;
    justify-content: center;
    align-items: center;
    /* keep bootstrap container width */
    width: 100%;
    /* prevent navbar overlap */
    padding-top: 90px;
    padding-bottom: 20px;
}

.math-adventure {
    width: 100%;
}

/* FOOTER STAYS BOTTOM */
footer {
    margin-top: auto;
}

/* MOBILE */
@media (max-width: 991px) {
    .app-content {
        padding-top: 80px;
        padding-bottom: 15px;
        /* still centered on mobile */
        justify-content: center;
        align-items: center;
    }
}
.math-adventure .br-20 {
    border-radius: 20px;
    width: 100%;
}

/* BACK BUTTON */
.close-mission {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: #fff;
    color: #4facfe;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: 0.2s ease;
    outline: none;
}

    .close-mission:hover {
        transform: scale(1.08);
    }

/* Title & Icon Area */
.icon-circle {
    width: 60px;
    height: 60px;
    background: #ffcf2d; /* Gold for achievement */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -45px auto 10px;
    border: 5px solid white;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.color-primary {
    color: #2d3436;
}

/* Submenu Button Styling (Matches Counting Exercises) */
#mex .sub-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: bold;
}

    #mex .sub-item:hover {
        background: #4facfe;
        color: white;
        border-color: #4facfe;
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(79, 172, 254, 0.3);
    }

/* Remove default link styling */
.fac-button-link {
    text-decoration: none !important;
    display: block;
    height: 100%;
}

/* The 3D Tile Style */
.faccard {
    background: #ffffff;
    border: 2px solid #e0e6ed;
    border-radius: 15px; /* Softer corners */
    padding: 2px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* This creates the 'thick' 3D base */
    box-shadow: 0 4px 0 #d1d9e6;
    position: relative;
    min-height: 50px;
}

    /* Text inside the button */
    .faccard span {
        font-size: 1.2rem;
        font-weight: bold;
        color: #4a5568;
        line-height: 1.2;
    }

/* Emoji/Icon area */
.faccard-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

/* HOVER: Lift the button slightly */
.fac-button-link:hover .faccard {
    transform: translateY(-2px);
    border-color: #4facfe;
    box-shadow: 0 8px 0 rgba(79, 172, 254, 0.3);
}

/* ACTIVE: The "Click" Animation */
.fac-button-link:active .faccard {
    transform: translateY(4px); /* Moves down to 'press' the button */
    box-shadow: 0 2px 0 #cbd5e0; /* Shadow shrinks to look flat */
}

/* Individual Color Variation (using your bcolor1 class) */
.bcolor1 {
    border-color: #e0e6ed;
}

/* Optional: Add a little 'shine' to the top */
.faccard::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5%;
    width: 90%;
    height: 5%;
    background: rgba(255,255,255,0.4);
    border-radius: 20px;
}
