/* --- Global Link Styles --- */
a {
    color: #7aa6bb;
    text-decoration: none;
    background-color: transparent;
    font-size: 16px;
}

a:hover {
    text-decoration: underline;
}

a:hover,
a:focus {
    text-decoration: none;
}

b {
    font-weight: 700;
}

/* --- Form Input Styles --- */
button,
input,
select,
textarea {
    line-height: inherit;
    padding: .5rem; /* Added padding as per your previous CSS */
    border-radius: 25px; /* Apply rounded corners to all input-like elements */
}

/* --- Debugging Borders (Uncomment to visualize element boundaries) --- */
/*
body { border: 2px solid yellow!important; }
.mma-container-header { border: 2px solid cyan!important; }
.mma-container-main { border: 2px solid blue!important; }
#mma-demo-canvas { border: 2px solid red!important; }
.mma-spacer-container { border: 2px solid green!important; }
.mma-background-video { border: 2px solid purple!important; }
.mma-form-container { border: 2px solid orange!important; }
*/

/* --- Header Section (Video Background & Nav) --- */

.mma-container-header {
    position: relative;
    min-height: 5vh; /* Keep header relatively small */
    width: 100%;
    max-width: 1200px; /* Adjust this value as needed */
    margin: auto; /* Center it within the page */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}

.mma-background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.7);
}

.mma-nav-appbar {
    position: relative;
    z-index: 1;
    padding: 1rem;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px; /* Rounded corners for header */
}

.mma-wrapper-header {
    z-index: 14;
    align-items: center;
    display: flex;
    /* Allow navigation items to wrap if they exceed available width */
    flex-wrap: wrap;
}

.mma-content-container {
    height: auto;
    max-width: calc(1440px + 12rem);
    width: 100%;
    margin: 0 auto;
    align-items: center;
    display: flex;
    /* Allow content sections to wrap if they exceed available width */
    flex-wrap: wrap;
}

@media only screen and (min-width: 75rem) {
    .mma-content-container {
        padding-left: 6rem;
        padding-right: 6rem;
    }
}

.mma-content-wrapper {
    width: 100%;
    margin: 0 auto;
    align-items: center;
    display: flex;
    /* Ensure content wrapper also allows wrapping */
    flex-wrap: wrap;
}

.mma-section-content {
    display: flex;
    align-items: center;
    height: 100%;
    z-index: 1;
}

.mma-section-left {
    flex: 1 1;
    /* Allow items in left section to wrap */
    flex-wrap: wrap;
}

.mma-header-list {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
    align-items: center;
    /* Allow list items to wrap */
    flex-wrap: wrap;
}

.mma-header-list li {
    padding-left: 2.375rem;
    list-style-type: none;
    /* Add some vertical margin for wrapped items */
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.mma-header-list li:first-child {
    padding-left: 0;
}

.mma-tab-link {
    color: #00b5b5; /* Updated color */
    font-weight: 700;
}

.mma-tab-link:hover {
    text-decoration: none;
    cursor: pointer;
    color: #6400e4;
}

.mma-tab-logo { /* Assuming this was intended for a logo element */
    margin-left: -2.375rem;
}

a#logo img { /* Targeting the image within the logo link (ID not prefixed in TPL) */
    height: 40px;
    vertical-align: middle;
}

.mma-image-header { /* Assuming this was for a general header image */
    height: 2rem;
    margin-bottom: .05rem;
}

.mma-desktop-view {
    display: inherit;
}

.mma-section-right {
    justify-content: flex-end;
    flex: 1 1;
    /* Allow items in right section to wrap */
    flex-wrap: wrap;
}

/* --- Button Base Styles --- */
.mma-basic-button {
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    justify-content: center;
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: 2px; /* Default small border-radius, overridden by specific button classes */
    -moz-user-select: none;
    padding: .375rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    min-width: 8rem;
    transition: all .1s ease-in-out;
}

.mma-basic-button:active,
.mma-basic-button:focus,
.mma-basic-button:hover {
    outline: none;
    text-decoration: none;
}

.mma-btn-danger {
    background-color: #d71149;
    border-color: #d71149;
}

/* --- Specific Button Sizes & Styles --- */
.mma-btn-medium {
    border-radius: 20px;
}

.mma-btn-lg {
    font-size: 1.1em;
    width: 100%; /* Important for submit button to span full width */
}

.mma-btn-xlarge {
    padding: .75rem 1.25rem;
    font-size: 1.25rem;
    line-height: 1.33333;
    min-width: 10rem;
}

.mma-btn-submit {
    margin: 1rem 0;
    width: 100%;
}

button:focus {
    outline: 1px dotted;
    outline: 5px auto -webkit-focus-ring-color;
}

/* --- Button Color Variants --- */
.mma-btn-purple {
    color: #fff;
    background-color: #6400e4;
    border-color: transparent;
}

.mma-btn-purple:active,
.mma-btn-purple:hover {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .3);
    text-decoration: none;
    color: #fff;
}

.mma-btn-purple:active {
    color: #e6e6e6;
    background-color: #5000b6;
}

.mma-btn-purple:focus {
    box-shadow: 0 0 0 3px rgba(100, 0, 228, .5);
}

/* --- GLOW ON HOVER EFFECT FOR OUTLINE BUTTON --- */
.mma-btn-purple.mma-btn-outline {
    /* Revert to original outline button styles */
    color: #6400e4; /* Original text color */
    background-color: transparent; /* Original transparent background */
    border: 1px solid #6400e4; /* Original border */
    border-radius: 20px; /* Match .mma-btn-medium's border-radius */

    /* Properties from glow-on-hover that are essential for the glow mechanism */
    outline: none;
    cursor: pointer;
    position: relative; /* CRITICAL for pseudo-elements */
    z-index: 0; /* CRITICAL for pseudo-elements stacking */
}

.mma-btn-purple.mma-btn-outline:before {
    content: '';
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 400%; /* Corrected from 8400% for proper glow animation */
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px); /* Re-enabled height for pseudo-element to cover button */
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity .3s ease-in-out;
    border-radius: 20px; /* Match button's border-radius for seamless glow */
}

.mma-btn-purple.mma-btn-outline:active {
    /* Keep original active state, but ensure glow effect is not broken */
    color: #6400e4; /* Revert text color to original */
    background-color: rgba(100, 0, 228, .4); /* Original active background */
    box-shadow: none; /* Original active box-shadow */
}

.mma-btn-purple.mma-btn-outline:active:after {
    background: transparent; /* Allows glow to show through on active */
}

.mma-btn-purple.mma-btn-outline:hover:before {
    opacity: 1;
}

.mma-btn-purple.mma-btn-outline:after {
    z-index: -1;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent; /* Make this transparent to show the button's original background */
    left: 0;
    top: 0;
    border-radius: 20px; /* Match button's border-radius for seamless glow */
}

@keyframes glowing {
    0% {
        background-position: 0 0;
    }

    50% {
        background-position: 400% 0;
    }

    100% {
        background-position: 0 0;
    }
}

/* --- END GLOW ON HOVER EFFECT --- */


.mma-btn-royalblue {
    color: #fff;
    background-color: #4b35ef;
    border-color: transparent;
}

.mma-btn-royalblue:active,
.mma-btn-royalblue:hover {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .3);
    text-decoration: none;
    color: #fff;
}

.mma-btn-royalblue:active {
    color: #e6e6e6;
    background-color: #3c2abf;
}

.mma-btn-royalblue:focus {
    box-shadow: 0 0 0 3px rgba(75, 53, 239, .5);
}

.mma-btn-red {
    color: #fff;
    background-color: #f65a5b;
    border-color: transparent;
}

.mma-btn-red:focus {
    box-shadow: 0 0 0 3px rgba(246, 90, 91, .5);
}

.mma-btn-red:active {
    color: #e6e6e6;
    background-color: #c54849;
}

.mma-btn-red:active,
.mma-btn-red:hover {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .3);
    text-decoration: none;
    color: #fff;
}

#mma-try-button a {
    opacity: 0.8; /* Apply transparency to the "See For Free" button's base state */
}

/* --- Social Buttons (if used) --- */
.mma-heading-2 {
    font-family: MuseoSans;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.mma-btn-container-social {
    padding: 0;
    display: flex;
    justify-content: space-between;
}

.mma-btn-container-list-item {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 auto;
}

.mma-btn-container-list-item+.mma-btn-container-list-item {
    margin-left: .5rem;
}

.mma-btn-x-sm {
    display: inline-flex;
    justify-content: center;
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: 2px;
    -moz-user-select: none;
    padding: .375rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    min-width: 8rem;
    transition: all .1s ease-in-out;
}

/* --- Main Content Section (Canvas & Login Form) --- */
.mma-container-main {
    position: relative;
    /* Adjusted min-height for clear separation and content visibility */
    min-height: 80vh; /* Make main section much larger */
    width: 100%;
    overflow: hidden; /* Kept from second version */
    display: flex;   /* Kept from second version */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 50px; /* Rounded corners for main content area */
    z-index: 0;
}

#mma-demo-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

/* Removed max-width and margin-left/right from .mma-page-heading-h1
    because it will now be inside .mma-form-container and inherit its width.
*/
.mma-page-heading-h1 {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #32323b;
}

.mma-spacer-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mma-form-container {
    max-width: 96vw;
    /* Changed fixed width to a flexible percentage with a max-width */
    width: 90%; /* Kept from second version */
    max-width: 20rem; /* Keeps it from getting too wide on large screens */
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 10px; /* Kept from second version */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    z-index: 3;
    /* NEW: Added flex properties to manage its direct children
        This will help center the heading and the form base within the container
    */
    display: flex;
    flex-direction: column;
    align-items: center; /* This centers the h1 and the form */
}

.mma-container-content-form {
    display: flex;
    flex-direction: column;
    /* max-width: 20rem; Removed, as .mma-form-container now handles the max-width for its content */
    width: 100%; /* Ensure it takes full width of its parent (.mma-form-container's padded area) */
}

.mma-form-base {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center items like the login button within the form */
    width: 100%; /* Ensure the form takes full width of .mma-container-content-form */
}

.mma-screen-read-style {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    border: 0;
}

.mma-form-group1 {
    width: 100%;
    /* Flex properties for label-above-input layout */
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align label and input to the left within their group */
    margin-bottom: 1.5rem; /* Space between username and password fields */
}

.mma-form-group2 {
    /* Removed Min-width: 30vw; as it conflicts with the max-width of the form container.
       Setting width: 100% here makes it consistent with the input. */
    width: 100%;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align label and input to the left within their group */
}

.mma-form-group3 {
    margin-bottom: 1rem; /* Added margin for other form groups if present */
}

.mma-label-form-group {
    display: block;
    font-weight: 700;
    margin-bottom: .5rem;
    line-height: 1.25rem;
    font-size: .9rem!important;
    text-align: left; /* Ensure label text is left-aligned */
    width: 100%; /* Ensure label spans full width to push input down */
}

.mma-form-input { /* Renamed from .input__formGroup */
    font-size: 1rem;
    text-indent: .8rem;
    padding: .8rem 0;
    outline: none;
    width: 100%;
    border: 1px solid #e9eaea;
    border-radius: 25px; /* Input fields maintain smaller border-radius */
    transition: border-color .15s;
    font-weight: 400;
    box-sizing: border-box;
}

.mma-form-input:focus {
    border-color: #4c7ef3;
}

.mma-pad-bottom-if-not-empty {
    text-align: left;
}

.mma-container-forgot {
    position: relative;
    width: 100%;
}

.mma-forgot-style {
    font-size: .9rem;
    color: #2e4a99!important;
    margin-bottom: 1rem;
    font-weight: 700;
}

.mma-register-btn {
    padding: 0;
}

.mma-out-link {
    display: block;
    margin-top: 15px;
    color: #4169e1;
    text-decoration: none;
    font-weight: 500;
    text-align: center; /* Centered "Not a member yet?" link */
}

.mma-out-link:hover {
    text-decoration: underline;
}

.mma-out-link-register {
    text-align: right;
    display: block;
    color: #6400e4;
}

.mma-out-link-register:focus,
.mma-out-link-register:hover {
    color: #5900cb;
}

/* --- Notification & Popup Styles --- */
.mma-notification {
    display: none;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 10px;
    margin-top: 20px;
    text-align: center;
    opacity: 1;
    transition: opacity 1s ease-out;
    position: relative;
    z-index: 2;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    font-size: 18px;
    font-weight: bold;
}

.mma-notification.show {
    display: block;
}

.mma-popup {
    border-radius: 25px;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    width: 300px;
    padding: 20px;
    background: white;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    z-index: 1000;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s infinite ease-in-out;
}

.mma-popup-content {
    color: #333;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* --- Footer Section --- */
.mma-footer-page {
    background-color: #102c43; /* Updated color */
    padding-top: 0.8rem; /* Adjusted padding */
    padding-bottom: .5rem; /* Adjusted padding */
    color: hsla(0, 0%, 100%, .6);
    width: 100%;
    border-radius: 35px 35px 0 0; /* Rounded corners for footer */
    text-align: center;
}

.mma-container-main-page {
    max-width: 90rem!important;
    width: 100%;
    height: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media only screen and (min-width: 48rem) {
    .mma-container-main-page {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        justify-content: space-between;
        flex-direction: row;
    }
}

@media only screen and (min-width: 64rem) {
    .mma-container-main-page {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.mma-link-list-styles {
    display: flex;
    flex-direction: column;
    justify-self: end;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.mma-link-list-styles a {
    color: #141c3a;
}

@media only screen and (min-width: 48rem) {
    .mma-link-list-styles {
        flex-direction: row;
        align-items: center;
    }

    .mma-link-list-styles>li+li {
        margin-left: 3rem;
    }
}

.mma-social-list-styles {
    list-style-type: none;
    display: flex;
    padding: 0;
    margin: 0;
    align-items: center;
    height: 100%;
}

.mma-social-list-styles li+li {
    margin-left: 1.5rem;
}

@media only screen and (min-width: 48rem) {
    .mma-social-list-styles {
        justify-content: flex-end;
    }
}

/* --- Mobile Unsupported Message --- */
.mma-mobile-message {
    display: none;
    background-color: #ffe0b2;
    color: #e65100;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px auto;
    width: 90%;
    max-width: 500px;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 5;
    position: relative;
}

/* --- Responsive Design (General Adjustments) --- */
@media (max-width: 768px) {
    .mma-mobile-message {
        display: block;
    }

    .mma-nav-appbar.mma-content-wrapper { /* Specific selector for mobile nav */
        flex-direction: column;
        text-align: center;
    }

    .mma-section-content {
        width: 100%;
        margin-bottom: 10px;
    }

    .mma-desktop-view {
        display: none;
    }

    .mma-form-container {
        padding: 2px;
        max-width: 100%;
    }

    .mma-link-list-styles li {
        margin: 5px 10px;
    }

    .mma-page-heading-h1 {
        font-size: 2em;
    }
}

/* --- Card Styles (if used elsewhere) --- */
.mma-card {
    border: none;
}