/* ==== Magoods Enhanced Registration 2025 ==== */

/* === Base Layout === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--semi-dark);
    color: var(--light);
    overflow-x: hidden;
}

.master-breadcrumb {
    display: none !important;
}

#main-body {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
}

#main-body>.container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.primary-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.mg-register-page {
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    overflow: visible !important;
}

body.mg-register-mode .topo-canvas,
body.mg-register-mode #topoCanvas {
    display: none !important;
}

body.mg-register-mode::after {
    display: none !important;
    animation: none !important;
}

body.mg-register-mode #main-body,
body.mg-register-mode #main-body .mgp-main-container,
body.mg-register-mode #main-body .mgp-main-row,
body.mg-register-mode #main-body .mgp-main-content-col {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

#main-body .mgp-main-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#main-body .mgp-main-content-col {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* === Animated Background Canvas === */
#mg-grid {
    opacity: 0.6;
}

/* === Floating Particles Background === */
.mg-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(2px 2px at 20% 30%, rgba(0, 168, 232, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(0, 168, 232, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(0, 168, 232, 0.2), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(0, 168, 232, 0.25), transparent);
    background-size: 300px 300px, 400px 400px, 500px 500px, 350px 350px;
    background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
    animation: none;
}

@keyframes particlesFloat {
    0% {
        background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
    }

    100% {
        background-position: 300px 300px, 340px 360px, 430px 570px, 370px 400px;
    }
}

/* === Decorative Circles === */
.mg-decorative-circles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: none;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.4), transparent 70%);
    top: -200px;
    left: -200px;
    animation-duration: 25s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 126, 167, 0.3), transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.circle-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.25), transparent 70%);
    top: 50%;
    right: -100px;
    animation-duration: 28s;
    animation-delay: -10s;
}

@keyframes floatCircle {

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

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* === Center Container - FIXED FOR SCREEN FIT === */
.mg-register-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 1rem 0.35rem;
}

/* === Enhanced Glassmorphism Card - FIXED FOR SCROLLING === */
.mg-register-card {
    padding: 24px 28px 4px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.mg-register-card::before {
    inset: -12% !important;
}

.mg-register-card::-webkit-scrollbar {
    width: 8px;
}

.mg-register-card::-webkit-scrollbar-thumb {
    background: var(--mint);
    border-radius: 4px;
}

.mg-register-card::-webkit-scrollbar-thumb:hover {
    background: #00c9ff;
}

@keyframes cardFadeIn {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }

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

.mg-register-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.1) 0%, transparent 70%);
    animation: cardGlow 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cardGlow {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.5;
    }

    50% {
        transform: translate(10%, 10%);
        opacity: 0.8;
    }
}

/* === Header Section - COMPACT === */
.mg-register-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 18px;
    padding-top: 110px;
}

.mg-logo-wrapper {
    position: relative;
    margin-bottom: 12px;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

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

    50% {
        transform: translateY(-8px);
    }
}

.mg-register-logo {
    display: block;
    height: 42px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 168, 232, 0.5));
}

.mg-logo-glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.4), transparent 70%);
    filter: blur(20px);
    animation: logoGlowPulse 2s ease-in-out infinite;
    z-index: 0;
}

@keyframes logoGlowPulse {

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

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* === Title and Subtitle - COMPACT === */
.gradient-text {
    background: linear-gradient(135deg, #007ea7, #00a8e8, #00c9ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {

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

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

.mg-register-title {
    font-family: "Audiowide", "Poppins", sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.mg-register-subtitle {
    color: var(--darkGray);
    font-size: 13px;
    margin: 0;
    font-weight: 400;
}

.dl-register-discord {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px !important;
    width: 100%;
}

#registration .dl-register-discord .sub-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: auto;
    border-top: 0;
    margin-top: 14px !important;
    margin-bottom: 4px !important;
    min-height: 34px;
    text-align: center;
}

#registration .dl-register-discord .sub-heading::before,
#registration .dl-register-discord .sub-heading::after {
    content: "";
    flex: 1 1 auto;
    height: 2px;
    min-width: 48px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 232, 0.34), rgba(0, 126, 167, 0.26), transparent);
}

#registration .dl-register-discord .sub-heading span {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    top: 0;
    min-height: 30px;
    padding: 0 14px;
    border: 1px solid rgba(0, 168, 232, 0.18);
    border-radius: 999px;
    background: rgba(0, 52, 89, 0.24);
    color: rgba(230, 246, 255, 0.88);
    font-family: "Poppins", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#registration .dl-register-discord .dl-register-divider {
    font-family: "Poppins", sans-serif;
    color: rgba(230, 246, 255, 0.78);
    text-transform: none;
    letter-spacing: 0.02em;
}

/* === Unified Form Card - COMPACT === */
.mg-form-card {
    background: rgba(0, 52, 89, 0.2);
    border: 1px solid rgba(0, 168, 232, 0.15);
    border-radius: 20px;
    padding: 26px;
    box-shadow: inset 0 0 20px rgba(0, 168, 232, 0.05);
    margin-bottom: 0;
}

/* === Form Sections - COMPACT === */
.mg-form-section {
    margin-bottom: 24px;
}

.mg-form-section:last-of-type {
    margin-bottom: 0;
}

.mg-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mint);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 168, 232, 0.2);
}

.mg-section-title i {
    font-size: 20px;
    text-shadow: 0 0 10px rgba(0, 168, 232, 0.5);
}

.mg-section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 232, 0.3), transparent);
    margin: 20px 0;
    position: relative;
}

.mg-section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--mint);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0, 168, 232, 0.6);
}

/* === Form Groups - COMPACT === */
.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray);
    font-weight: 500;
    font-size: 13px;
    transition: color 0.3s ease;
}

.optional-badge {
    display: inline-block;
    background: rgba(0, 168, 232, 0.2);
    color: var(--mint);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
}

/* === Enhanced Input Fields === */
.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--mint);
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

input.field.form-control,
select.field.form-control,
textarea.field.form-control {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border-radius: 14px;
    border: 1.5px solid rgba(0, 168, 232, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s var(--transition);
    position: relative;
    z-index: 1;
}

/* === COUNTRY DROPDOWN FIX === */
select.field.form-control {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding-left: 44px !important;
    padding-right: 40px !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300a8e8' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--light) !important;
    height: auto !important;
    min-height: 45px !important;
}

select.field.form-control option {
    background: var(--darkBlue) !important;
    color: var(--light) !important;
    padding: 10px !important;
}

#inputCountry,
select[name="country"] {
    pointer-events: auto !important;
    z-index: 1 !important;
}

#inputCountry.mg-country-native,
select[name="country"].mg-country-native {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.mg-country-picker {
    position: relative;
    width: 100%;
    z-index: 6;
}

.mg-country-picker.is-open {
    z-index: 80;
}

.mg-country-picker__trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 42px 12px 44px;
    border: 1.5px solid rgba(0, 168, 232, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #e6f6ff;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mg-country-picker__flag,
.mg-country-picker__option-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    align-self: center;
    line-height: 0;
}

.mg-country-picker__flag-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.mg-country-picker__flag.is-empty .mg-country-picker__flag-box,
.mg-country-picker__option-flag.is-empty .mg-country-picker__flag-box {
    background: rgba(0, 35, 55, 0.3);
}

.mg-country-picker__flag-box .iti-flag {
    position: static;
    display: block;
    margin: 0;
}

.mg-country-picker__trigger:hover,
.mg-country-picker.is-open .mg-country-picker__trigger {
    border-color: rgba(0, 168, 232, 0.38);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
    background: rgba(0, 35, 55, 0.24);
}

.mg-country-picker__trigger.is-placeholder,
.mg-country-picker__trigger.is-placeholder .mg-country-picker__value {
    color: rgba(255, 255, 255, 0.52);
}

.mg-country-picker__value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mg-country-picker__code {
    flex: 0 0 auto;
    color: rgba(0, 168, 232, 0.65);
    font-family: "JetBrains Mono", monospace;
    font-size: 11.5px;
    font-weight: 500;
}

.mg-country-picker__arrow {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);
}

.mg-country-picker__arrow::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%2300a8e8' d='M6 8.8 1.8 4.6h8.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
    transition: transform 0.18s ease;
}

.mg-country-picker.is-open .mg-country-picker__arrow::before {
    transform: rotate(180deg);
}

.mg-country-picker__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: min(380px, calc(100vh - 120px));
    overflow: hidden;
    border: 1px solid rgba(0, 168, 232, 0.3);
    border-radius: 16px;
    background: rgba(0, 15, 24, 0.99);
    box-shadow:
        0 26px 64px rgba(0, 0, 0, 0.72),
        0 0 0 1px rgba(0, 168, 232, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
}

.mg-country-picker__search {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px;
    border-bottom: 1px solid rgba(0, 168, 232, 0.16);
    background: rgba(0, 15, 24, 0.99);
}

.mg-country-picker__search::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 26px;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(0,168,232,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    pointer-events: none;
}

.mg-country-picker__search-input {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px 10px 36px;
    border: 1px solid rgba(0, 168, 232, 0.3);
    border-radius: 12px;
    background: rgba(0, 35, 55, 0.65);
    color: #e6f6ff;
    font-family: "Poppins", sans-serif;
    font-size: 12.5px;
}

.mg-country-picker__search-input::placeholder {
    color: rgba(255, 255, 255, 0.26);
}

.mg-country-picker__search-input:focus {
    outline: none;
    border-color: rgba(0, 168, 232, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.14);
}

.mg-country-picker__list {
    max-height: 312px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 168, 232, 0.42) transparent;
}

.mg-country-picker__list::-webkit-scrollbar {
    width: 4px;
}

.mg-country-picker__list::-webkit-scrollbar-track {
    background: transparent;
}

.mg-country-picker__list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 168, 232, 0.42);
}

.mg-country-picker__option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid rgba(0, 168, 232, 0.05);
    border-left: 2px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-family: "Poppins", sans-serif;
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.mg-country-picker__option:last-child {
    border-bottom: 0;
}

.mg-country-picker__option:hover,
.mg-country-picker__option.is-highlighted {
    background: rgba(0, 168, 232, 0.07);
    border-left-color: rgba(0, 168, 232, 0.35);
    color: #e6f6ff;
}

.mg-country-picker__option.is-selected {
    background: rgba(0, 168, 232, 0.1);
    border-left-color: #00a8e8;
    box-shadow: inset 6px 0 10px -8px rgba(0, 168, 232, 0.45);
    color: #e6f6ff;
}

.mg-country-picker__option-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mg-country-picker__option-code {
    flex: 0 0 auto;
    min-width: 32px;
    color: rgba(0, 168, 232, 0.65);
    font-family: "JetBrains Mono", monospace;
    font-size: 11.5px;
    font-weight: 500;
    text-align: right;
}

.mg-country-picker__option.is-selected .mg-country-picker__option-code {
    color: #00a8e8;
}

.mg-country-picker__empty {
    padding: 34px 16px;
    color: rgba(255, 255, 255, 0.35);
    font-family: "Poppins", sans-serif;
    font-size: 12.5px;
    text-align: center;
}

.mg-country-picker__empty::before {
    content: "";
    display: block;
    width: 38px;
    height: 38px;
    margin: 0 auto 12px;
    border: 1px solid rgba(0, 168, 232, 0.18);
    border-radius: 10px;
    background:
        rgba(0, 35, 55, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(0,168,232,0.58)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3Cline x1='8' y1='14' x2='14' y2='8'/%3E%3C/svg%3E") no-repeat center / 16px 16px;
}

.mg-register-form,
#containerNewUserSignup,
.mg-register-form .row {
    margin-bottom: 0;
}

#main-body .mgp-main-container,
#main-body .mgp-main-row,
#main-body .mgp-main-content-col {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

/* === International Phone Input === */
.intl-tel-input {
    display: block !important;
    width: 100%;
    position: relative;
    z-index: 6;
}

.intl-tel-input.allow-dropdown,
.intl-tel-input.separate-dial-code {
    width: 100%;
}

.intl-tel-input.mg-phone-active,
.intl-tel-input:focus-within {
    z-index: 80;
}

.intl-tel-input input,
.intl-tel-input input[type="tel"],
.intl-tel-input input[type="text"] {
    width: 100% !important;
    min-height: 48px;
    padding-left: 118px !important;
    padding-right: 14px !important;
    border-radius: 14px !important;
    border: 1.5px solid rgba(0, 168, 232, 0.2) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--light) !important;
    box-shadow: none !important;
}

.intl-tel-input .flag-container {
    left: 0 !important;
    right: auto !important;
    top: 0;
    bottom: 0;
    padding: 0;
    z-index: 4;
}

.intl-tel-input .selected-flag {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 94px !important;
    height: 100%;
    margin: 0;
    padding: 0 10px 0 12px !important;
    border: 0;
    border-right: 1px solid rgba(0, 168, 232, 0.14);
    border-radius: 14px 0 0 14px;
    background: transparent;
    box-shadow: none;
}

.intl-tel-input.separate-dial-code .selected-flag,
.intl-tel-input.allow-dropdown.separate-dial-code .selected-flag {
    display: flex !important;
}

.intl-tel-input .selected-flag .iti-flag {
    position: static;
    top: auto;
    bottom: auto;
    display: block;
    margin: 0;
    flex: 0 0 20px;
}

.intl-tel-input .selected-flag:focus,
.intl-tel-input .selected-flag:hover {
    background: rgba(0, 168, 232, 0.05);
    box-shadow: inset 0 0 0 1px rgba(0, 168, 232, 0.08);
}

.intl-tel-input .selected-dial-code {
    display: block;
    color: rgba(255, 255, 255, 0.74);
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.intl-tel-input .selected-flag .iti-arrow {
    position: static;
    top: auto;
    right: auto;
    margin-top: 0;
    border-top-color: var(--mint) !important;
    margin-left: 2px;
    flex: 0 0 auto;
    align-self: center;
}

.intl-tel-input .selected-flag .iti-arrow.up {
    border-top-color: transparent !important;
    border-bottom-color: var(--mint) !important;
}

.intl-tel-input .country-list,
.iti-mobile .intl-tel-input .country-list {
    left: 0 !important;
    right: auto !important;
    width: 100% !important;
    min-width: min(420px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
    margin-top: 8px;
    padding: 0;
    max-height: min(380px, calc(100vh - 120px));
    overflow-y: auto;
    border: 1px solid rgba(0, 168, 232, 0.3) !important;
    border-radius: 16px;
    background: rgba(0, 15, 24, 0.99) !important;
    box-shadow:
        0 26px 64px rgba(0, 0, 0, 0.72),
        0 0 0 1px rgba(0, 168, 232, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: var(--light) !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 168, 232, 0.42) transparent;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    overscroll-behavior: contain;
    z-index: 90;
}

.intl-tel-input .country-list.hide {
    display: none !important;
}

.intl-tel-input .country-list::-webkit-scrollbar {
    width: 4px;
}

.intl-tel-input .country-list::-webkit-scrollbar-track {
    background: transparent;
}

.intl-tel-input .country-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 168, 232, 0.42);
}

.intl-tel-input .country-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 168, 232, 0.56);
}

.intl-tel-input .country-list.dropup {
    margin-top: 0;
    margin-bottom: 8px;
}

.mg-phone-country-search-row {
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 12px;
    border-bottom: 1px solid rgba(0, 168, 232, 0.16);
    border-radius: 16px 16px 0 0;
    background: rgba(0, 15, 24, 0.99);
    list-style: none;
}

.mg-phone-country-search {
    position: relative;
    display: block;
}

.mg-phone-country-search::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 12px;
    width: 13px;
    height: 13px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(0,168,232,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 13px 13px;
    pointer-events: none;
    z-index: 2;
}

.mg-phone-country-search__input {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px 10px 34px;
    border: 1px solid rgba(0, 168, 232, 0.3);
    border-radius: 12px;
    background: rgba(0, 35, 55, 0.65);
    color: #e6f6ff;
    font-family: "Poppins", sans-serif;
    font-size: 12.5px;
    line-height: 1.25;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
    display: block;
}

.mg-phone-country-search__input::placeholder {
    color: rgba(255, 255, 255, 0.26);
}

.mg-phone-country-search__input:focus {
    outline: none;
    border-color: rgba(0, 168, 232, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.14);
    background: rgba(0, 35, 55, 0.72);
}

.mg-phone-country-empty-row {
    display: none;
    padding: 38px 16px 34px;
    list-style: none;
}

.mg-phone-country-search__empty {
    display: block;
    padding: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    font-family: "Poppins", sans-serif;
    font-size: 12.5px;
    text-align: center;
}

.mg-phone-country-search__empty::before {
    content: "\f3ed";
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 0 auto 12px;
    border: 1px solid rgba(0, 168, 232, 0.18);
    border-radius: 10px;
    background: rgba(0, 35, 55, 0.18);
    color: rgba(0, 168, 232, 0.58);
    font-family: "Font Awesome 5 Free";
    font-size: 14px;
    font-weight: 900;
}

.intl-tel-input .country-list .country {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 168, 232, 0.05);
    border-left: 2px solid transparent;
    background: transparent;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.intl-tel-input .country-list .country.highlight,
.intl-tel-input .country-list .country:hover {
    background: rgba(0, 168, 232, 0.07) !important;
    border-left-color: rgba(0, 168, 232, 0.35);
    color: #fff !important;
}

.intl-tel-input .country-list .country:last-of-type {
    border-bottom: 0;
}

.intl-tel-input .country-list .divider {
    position: relative;
    margin: 10px 14px 8px;
    padding: 12px 0 0;
    border: 0;
    background: transparent;
    line-height: 0;
}

.intl-tel-input .country-list .divider::before {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 232, 0.2), rgba(0, 168, 232, 0.2), transparent);
}

.intl-tel-input .country-list .divider::after {
    content: "ALL COUNTRIES";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 8px;
    background: rgba(0, 15, 24, 0.99);
    color: rgba(0, 168, 232, 0.35);
    font-family: "Orbitron", sans-serif;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.2em;
    line-height: 1;
}

.intl-tel-input .country-list .flag-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.intl-tel-input .country-list .country-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78);
    font-family: "Poppins", sans-serif;
    font-size: 12.5px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.intl-tel-input .country-list .dial-code {
    margin-left: auto;
    min-width: 54px;
    color: rgba(0, 168, 232, 0.65) !important;
    font-family: "JetBrains Mono", monospace;
    font-size: 11.5px;
    font-weight: 500;
    text-align: right;
}

.intl-tel-input .country-list .country:hover .country-name,
.intl-tel-input .country-list .country.highlight .country-name {
    color: #e6f6ff;
}

.intl-tel-input .country-list .country:hover .dial-code,
.intl-tel-input .country-list .country.highlight .dial-code {
    color: rgba(0, 168, 232, 0.9) !important;
}

.intl-tel-input .country-list .country.active {
    background: rgba(0, 168, 232, 0.1) !important;
    border-left-color: #00a8e8;
    box-shadow: inset 6px 0 10px -8px rgba(0, 168, 232, 0.45);
}

.intl-tel-input .country-list .country.active .country-name {
    color: #e6f6ff;
    font-weight: 500;
}

.intl-tel-input .country-list .country.active .dial-code {
    color: #00a8e8 !important;
}

.intl-tel-input .country-list .country.highlight:not(.active) {
    background: rgba(0, 168, 232, 0.06) !important;
    border-left-color: rgba(0, 168, 232, 0.25);
}

.intl-tel-input .country-list .country.preferred {
    background: rgba(0, 168, 232, 0.025);
}

.intl-tel-input .country-list .country.preferred:hover,
.intl-tel-input .country-list .country.preferred.highlight {
    background: rgba(0, 168, 232, 0.085) !important;
}

input.field.form-control:focus,
select.field.form-control:focus,
textarea.field.form-control:focus {
    outline: none;
    border-color: var(--mint);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.15);
    transform: translateY(-2px);
}

input.field.form-control:focus~.input-icon,
select.field.form-control:focus~.input-icon {
    color: var(--light);
    filter: drop-shadow(0 0 2px var(--mint));
    /* Removed text-shadow to prevent blurriness */
}

input.field.form-control:focus+.input-border,
select.field.form-control:focus+.input-border {
    opacity: 1;
    transform: scaleX(1);
}

input.field.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Input Border Animation */
.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--mint), #00c9ff);
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.3s var(--transition);
    border-radius: 0 0 14px 14px;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--darkGray);
    cursor: pointer;
    font-size: 16px;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 4;
    pointer-events: auto;
}

.password-toggle:hover {
    color: var(--mint);
}

.password-toggle.active {
    color: var(--mint);
}

/* Country Detection Status */
.country-detect-status {
    display: block;
    margin-top: 6px;
    color: var(--mint);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.country-detect-status.active {
    opacity: 1;
}

/* === Password Strength Meter === */
.password-strength-meter {
    margin: 12px 0;
}

.password-strength-meter .progress {
    height: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.password-strength-meter .progress-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease, background 0.3s ease;
    background: linear-gradient(90deg, #ff4f4f, #ffa500);
}

.password-strength-meter .progress-bar.bg-success {
    background: linear-gradient(90deg, #00a8e8, #00d26a);
}

.password-strength-meter .small {
    color: var(--darkGray);
    margin-top: 6px;
    font-size: 12px;
}

/* === Generate Password Button === */
.mg-btn-generate {
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1.5px dashed rgba(0, 168, 232, 0.4);
    background: rgba(0, 168, 232, 0.08);
    color: var(--mint);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mg-btn-generate:hover {
    background: rgba(0, 168, 232, 0.15);
    border-color: var(--mint);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.mg-btn-generate i {
    font-size: 14px;
}

/* === Custom Checkbox === */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    user-select: none;
    margin-bottom: 14px;
    line-height: 1.2;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(0, 168, 232, 0.3);
    border-radius: 6px;
    margin-right: 0;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--mint);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked~.checkmark {
    background: rgba(0, 168, 232, 0.2);
    border-color: var(--mint);
    box-shadow: 0 0 12px rgba(0, 168, 232, 0.4);
}

.checkbox-wrapper input:checked~.checkmark::after {
    display: block;
}

.checkbox-label {
    color: var(--gray);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    transition: color 0.3s ease;
}

.checkbox-wrapper:hover .checkbox-label {
    color: var(--light);
}

/* === Marketing Message === */
.marketing-message {
    color: var(--darkGray);
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.5;
}

/* === TOS Section === */
.mg-tos-section {
    margin: 20px 0;
    padding: 16px;
    background: rgba(0, 168, 232, 0.05);
    border: 1px solid rgba(0, 168, 232, 0.2);
    border-radius: 10px;
}

.tos-link {
    color: var(--mint);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.tos-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--mint);
    transition: width 0.3s ease;
}

.tos-link:hover::after {
    width: 100%;
}

/* === Submit Button === */
.mg-form-actions {
    margin-top: 18px;
}

.mg-btn-submit {
    position: relative;
    display: block;
    width: 100%;
    padding: 14px 0;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #007ea7, #00a8e8);
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s var(--transition);
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.mg-btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.mg-btn-submit:hover::before {
    left: 100%;
}

.mg-btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 168, 232, 0.5);
}

.mg-btn-submit:active {
    transform: translateY(-1px);
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* === Already Registered Section === */
.mg-already-registered {
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid rgba(0, 168, 232, 0.2);
    text-align: center;
}

.already-text {
    color: var(--darkGray);
    font-size: 13px;
    margin-bottom: 10px;
}

.mg-login-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mint);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 20px;
    border: 1.5px solid var(--mint);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(0, 168, 232, 0.08);
}

.mg-login-link:hover {
    background: rgba(0, 168, 232, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.mg-login-link i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.mg-login-link:hover i {
    transform: translateX(-3px);
}

/* === Alerts === */
.alert {
    border-radius: 10px;
    border: 1px solid;
    padding: 14px 16px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.alert-error {
    background: rgba(255, 79, 79, 0.1);
    border-color: rgba(255, 79, 79, 0.3);
    color: #ffb3b3;
}

.alert-info {
    background: rgba(0, 168, 232, 0.1);
    border-color: rgba(0, 168, 232, 0.3);
    color: var(--mint);
}

/* === Responsive Design === */
@media (max-height: 900px) {
    .mg-register-container {
        padding: 0 0.85rem 1rem;
    }

    .mg-register-card {
        padding: 22px 24px 12px;
    }

    .mg-form-card {
        padding: 22px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .mg-form-section {
        margin-bottom: 20px;
    }
}

@media (max-height: 768px) {
    .mg-register-card {
        padding: 20px 22px 10px;
        max-height: calc(100vh - 30px);
    }

    .mg-form-card {
        padding: 18px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    input.field.form-control,
    select.field.form-control {
        padding: 10px 12px 10px 40px;
    }
}

@media (max-width: 768px) {
    .mg-register-card {
        padding: 20px 18px 10px;
    }

    .mg-form-card {
        padding: 20px 16px;
    }

    .mg-register-title {
        font-size: 21px;
    }

    .mg-section-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .mg-register-container {
        padding: 0 0.6rem 0.8rem;
    }

    .mg-register-card {
        padding: 16px 12px 8px;
    }

    .mg-form-card {
        padding: 16px 12px;
    }

    .mg-register-title {
        font-size: 19px;
    }

    .mg-section-title {
        font-size: 15px;
        gap: 6px;
    }

    .mg-register-header {
        margin-bottom: 14px;
    }

    .mg-logo-wrapper {
        margin-bottom: 8px;
    }

    .mg-register-logo {
        height: 38px;
    }

    .dl-register-discord {
        gap: 6px;
        margin-bottom: 10px !important;
    }

    .mg-already-registered {
        margin-top: 4px;
        padding-top: 4px;
    }

    .mg-register-page {
        margin-top: 0;
    }
}

/* Keep container/card overflow visible to avoid nested scrollbars in RTL mode. */
/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 3px;
}

.mg-register-card {
    max-height: none !important;
    scrollbar-width: none !important;
    scrollbar-width: none !important;
}

.btn:not(:disabled):not(.disabled):hover {
    color: #fff !important;
}

/* ==== MAGOODS GENERATE PASSWORD MODAL ==== */

/* Modal Overlay */
.mg-generate-password-modal .modal-backdrop {
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
}

/* Modal Content - Glassmorphism */
.mg-modal-generate {
    background: rgba(0, 23, 31, 0.9) !important;
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(0, 168, 232, 0.2);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.37),
        0 0 80px rgba(0, 168, 232, 0.2);
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

/* Modal Header */
.mg-modal-header {
    background: linear-gradient(135deg, rgba(0, 126, 167, 0.1), rgba(0, 168, 232, 0.1));
    border-bottom: 1px solid rgba(0, 168, 232, 0.2);
    padding: 24px;
}

.mg-modal-header .modal-title {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mg-modal-header .modal-title i {
    font-size: 20px;
    color: #00a8e8;
    text-shadow: 0 0 10px rgba(0, 168, 232, 0.5);
}

/* Modal Close Button */
.mg-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mg-modal-close:hover {
    background: rgba(255, 79, 79, 0.2);
    color: #ff4f4f;
    transform: rotate(90deg);
}

/* Modal Body */
.mg-modal-body {
    padding: 32px;
    color: rgba(255, 255, 255, 0.85);
}

/* Form Groups */
.mg-form-group {
    margin-bottom: 24px;
}

.mg-form-label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mg-form-label i {
    color: #00a8e8;
    font-size: 16px;
}

/* Input Wrapper */
.mg-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mg-input-number {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 168, 232, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mg-input-number:focus {
    outline: none;
    border-color: #00a8e8;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.15);
    transform: translateY(-2px);
}

/* Input Suffix */
.mg-input-suffix {
    position: absolute;
    right: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

/* Password Output Wrapper */
.mg-password-output-wrapper {
    position: relative;
    display: flex;
    gap: 8px;
}

.mg-password-output {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 168, 232, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #00d26a;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.mg-password-output:focus {
    outline: none;
    border-color: #00a8e8;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.15);
}

/* Copy Button */
.mg-btn-copy {
    background: rgba(0, 168, 232, 0.15);
    border: 1.5px solid rgba(0, 168, 232, 0.3);
    color: #00a8e8;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.mg-btn-copy:hover {
    background: rgba(0, 168, 232, 0.25);
    border-color: #00a8e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.mg-btn-copy:active {
    transform: translateY(0);
}

/* Button Group */
.mg-button-group {
    margin: 24px 0;
}

.mg-btn-generate-new {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #007ea7, #00a8e8);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.mg-btn-generate-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 168, 232, 0.5);
}

.mg-btn-generate-new:active {
    transform: translateY(0);
}

/* Password Info */
.mg-password-info {
    background: rgba(0, 168, 232, 0.05);
    border-left: 3px solid #00a8e8;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
}

.mg-password-info i {
    color: #00a8e8;
    margin-right: 6px;
}

/* Alert */
.mg-alert-danger {
    background: rgba(255, 79, 79, 0.1);
    border: 1px solid rgba(255, 79, 79, 0.3);
    border-radius: 10px;
    color: #ffb3b3;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mg-alert-danger i {
    color: #ff4f4f;
}

/* Modal Footer */
.mg-modal-footer {
    background: rgba(0, 52, 89, 0.2);
    border-top: 1px solid rgba(0, 168, 232, 0.2);
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.mg-btn-secondary {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(0, 168, 232, 0.2);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mg-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 168, 232, 0.4);
    transform: translateY(-1px);
}

.mg-btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, #007ea7, #00a8e8);
    border: none;
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.mg-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 168, 232, 0.5);
}

.mg-btn-primary:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
    .mg-modal-body {
        padding: 24px;
    }

    .mg-modal-header {
        padding: 20px;
    }

    .mg-modal-footer {
        flex-direction: column-reverse;
    }

    .mg-btn-secondary,
    .mg-btn-primary {
        width: 100%;
    }

    .mg-password-output-wrapper {
        flex-direction: column;
    }

    .mg-btn-copy {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mg-modal-generate {
        color-scheme: dark;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .mg-modal-generate,
    .mg-btn-copy,
    .mg-btn-generate-new,
    .mg-btn-primary,
    .mg-btn-secondary {
        animation: none;
        transition: none;
    }
}

/* Focus visible for keyboard navigation */
.mg-btn-copy:focus-visible,
.mg-btn-generate-new:focus-visible,
.mg-btn-primary:focus-visible,
.mg-btn-secondary:focus-visible,
.mg-input-number:focus-visible,
.mg-password-output:focus-visible {
    outline: 2px solid #00a8e8;
    outline-offset: 2px;
}

/* Success Toast */
.mg-success-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #00a8e8, #00d26a);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 168, 232, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    z-index: 10000;
    animation: toastSlideIn 0.3s ease;
    opacity: 0;
    transform: translateX(400px);
}

.mg-success-toast.show {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }

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

@media (max-width: 480px) {
    .mg-success-toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
}

/* === Register Layout Rebuild (2026-04-05) === */
body.mg-register-mode,
body.mg-register-mode #main-body,
body.mg-register-mode #main-body>.container,
body.mg-register-mode #main-body .row,
body.mg-register-mode #main-body .primary-content {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

body.mg-register-mode #main-body {
    position: relative;
}

body.mg-register-mode #mg-grid {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: block !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

body.mg-register-mode .mg-register-page {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0 0 18px;
    overflow: visible !important;
}

body.mg-register-mode .mg-register-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px 18px;
}

body.mg-register-mode .mg-register-card {
    position: relative;
    isolation: isolate;
    overflow: visible !important;
    max-height: none !important;
    padding-bottom: 8px;
}

body.mg-register-mode .mg-register-card::before {
    content: "";
    position: absolute;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 20px;
    pointer-events: none;
    transform: none !important;
    animation: none !important;
    opacity: 0.32;
}

body.mg-register-mode .mg-register-header {
    padding-top: clamp(86px, 10vh, 118px) !important;
}

@media (max-width: 768px) {
    body.mg-register-mode .mg-register-header {
        padding-top: 76px !important;
    }
}

@media (max-width: 480px) {
    body.mg-register-mode .mg-register-header {
        padding-top: 68px !important;
    }
}

body.mg-register-mode .mg-form-card {
    margin-bottom: 0;
}
