/* =========================================================
   mlbb2.css — Lightweight MLBB Product Page
   No heavy animations. Optimised for mobile & fast load.
   ========================================================= */

/* --- Self-hosted fonts --- */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/Plus_Jakarta_Sans/PlusJakartaSans-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron/Orbitron-VariableFont_wght.ttf') format('truetype');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

/* --- Variables --- */
:root {
    --pri: #6c5ce7;
    --pri-glow: rgba(108, 92, 231, 0.35);
    --sec: #00cec9;
    --acc: #fd79a8;
    --bg: #0a0b10;
    --card: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.09);
    --txt: #f0f0f5;
    --txt-dim: rgba(240, 240, 245, 0.55);
    --hdr: 80px;
    --radius-lg: 14px;
    --radius-sm: 8px;
    --flash: #ff4757;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--txt);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* --- Hero --- */
.m2-hero {
    padding-top: calc(var(--hdr) + 30px);
    padding-bottom: 28px;
    text-align: center;
    background:
        linear-gradient(to bottom, rgba(108, 92, 231, 0.08) 0%, transparent 100%),
        url('../images/mlbbbg.webp') center/cover no-repeat;
    border-bottom: 1px solid var(--border);
}

.m2-hero__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

.m2-hero__title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff 0%, #a29bfe 60%, var(--pri) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.m2-hero__sub {
    color: var(--txt-dim);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* --- Region Tabs --- */
.m2-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 8px;
}

.m2-tab {
    padding: 8px 16px;
    border-radius: 100px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--txt-dim);
    font-weight: 700;
    font-size: 0.8rem;
    font-family: 'Orbitron', sans-serif;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.m2-tab:hover {
    color: white;
    border-color: var(--pri);
    background: rgba(108, 92, 231, 0.12);
}

.m2-tab--active {
    background: var(--pri);
    border-color: var(--pri);
    color: white;
    box-shadow: 0 0 14px var(--pri-glow);
}

/* --- Main container --- */
.m2-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 16px 80px;
}

/* --- Category heading --- */
.m2-cat {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--txt-dim);
    margin: 28px 0 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.m2-cat::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* --- Product Grid --- */
.m2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

/* --- Product Card --- */
.m2-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 10px 12px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    overflow: hidden;
    /* will-change avoids layout thrash on hover */
    will-change: transform;
}

.m2-card:hover {
    border-color: var(--pri);
    background: rgba(108, 92, 231, 0.07);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.m2-card--preorder {
    border-color: var(--acc);
}

.m2-card--flash {
    border-color: var(--flash);
}

/* Card badge */
.m2-badge {
    position: absolute;
    top: 8px;
    left: -28px;
    padding: 3px 32px;
    font-size: 0.6rem;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    color: white;
    transform: rotate(-45deg);
    z-index: 2;
    pointer-events: none;
}

.m2-badge--pre {
    background: var(--acc);
}

.m2-badge--flash {
    background: var(--flash);
}

/* Card image */
.m2-card__img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}

/* Edit button (owner only) */
.m2-edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background 0.2s;
    z-index: 10;
    text-decoration: none;
}

.m2-edit-btn:hover {
    background: var(--pri);
    color: white;
}

/* Card name */
.m2-card__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
    line-height: 1.3;
    word-break: break-word;
}

/* Divider */
.m2-card::before {
    content: '';
    width: 60%;
    height: 1px;
    background: var(--border);
    opacity: 0.5;
    flex-shrink: 0;
}

/* Card price */
.m2-card__price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.m2-card__cur {
    font-size: 0.7rem;
    color: var(--txt-dim);
}

.m2-card__amount {
    font-size: 1.05rem;
    font-weight: 800;
    color: white;
}

.m2-card__old {
    font-size: 0.72rem;
    color: var(--txt-dim);
    text-decoration: line-through;
    opacity: 0.7;
}

/* Rank label */
.m2-card__rank-label {
    font-size: 0.65rem;
    color: #10b981;
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.m2-card__saving {
    color: var(--pri);
}

/* --- Error / Empty states --- */
.m2-error,
.m2-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--txt-dim);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    margin-top: 24px;
}

.m2-error {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.m2-error i,
.m2-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.6;
}

/* --- Mobile tweaks --- */
@media (max-width: 480px) {
    .m2-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .m2-card {
        padding: 10px 6px 10px;
        border-radius: var(--radius-sm);
        gap: 4px;
    }

    .m2-card__name {
        font-size: 0.75rem;
        min-height: 2em;
    }

    .m2-card__amount {
        font-size: 0.9rem;
    }

    .m2-card__cur {
        font-size: 0.6rem;
    }

    .m2-card__img {
        width: 48px;
        height: 48px;
    }

    .m2-tab {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .m2-hero__title {
        font-size: 1.6rem;
    }
}

@media (max-width: 360px) {
    .m2-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- New Layout & Components (Migrated from mlbb.php) --- */
.m2-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--hdr) + 40px) 20px 120px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
}

.m2-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 992px) {
    .m2-container {
        grid-template-columns: 1fr;
        padding-top: calc(var(--hdr) + 15px);
    }
    .m2-container .m2-sidebar {
        display: none;
    }
}

.m2-info-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(20px);
}

.m2-game-logo {
    width: 100%;
    border-radius: 14px;
    margin-bottom: 20px;
}

.m2-info-card h1 {
    font-family: 'Orbitron';
    font-size: 1.4rem;
    color: white;
    margin-bottom: 10px;
}

.m2-info-card p {
    font-size: 0.88rem;
    color: var(--txt-dim);
    line-height: 1.6;
}

.m2-info-card--steps h3 {
    font-family: 'Orbitron';
    font-size: 0.85rem;
    color: var(--pri);
    margin-bottom: 15px;
}

.m2-info-card--steps ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.m2-info-card--steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--txt-dim);
    font-size: 0.85rem;
}

.m2-info-card--steps li i {
    color: var(--sec);
    width: 16px;
    text-align: center;
}

.m2-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(20px);
}

.m2-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
    /* Prevent pushing children outside container */
    min-width: 0;
    overflow: hidden;
}

.m2-section-title {
    font-family: 'Orbitron';
    font-size: 1.2rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.m2-num {
    width: 30px;
    height: 30px;
    background: var(--pri);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
}

.m2-region-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    /* CRITICAL: prevent overflow */
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.m2-region-chip {
    padding: 6px 12px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--txt-dim);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
    /* CRITICAL: allow chip to shrink, prevent overflow */
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.m2-region-chip.active {
    background: var(--pri);
    color: white;
    border-color: var(--pri);
}

.m2-region-chip--promo {
    border-color: var(--acc);
    color: var(--acc);
}

.m2-region-chip--promo.active {
    background: var(--acc);
    color: black;
}

/* Saved ID Styles */
.m2-saved-ids {
    margin-bottom: 20px;
}

.m2-saved-ids label {
    display: block;
    font-size: 0.75rem;
    color: var(--txt-dim);
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.m2-saved-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Let mlbb.php control the columns */
    gap: 10px;
}

.m2-saved-chip {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 14px;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: row;
    /* Fix: Force horizontal layout */
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    color: inherit;
    font-family: inherit;
}

.m2-saved-chip:hover {
    border-color: var(--pri);
    background: rgba(108, 92, 231, 0.08);
}

.m2-saved-chip.active {
    border-color: var(--pri);
    background: rgba(108, 92, 231, 0.15);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.2);
}

.m2-saved-name {
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 5px;
}

.m2-saved-val {
    color: var(--txt-dim);
    font-size: 0.65rem;
}

.m2-verify-result {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.m2-verify-result.success {
    background: rgba(30, 215, 96, 0.05);
    color: #1ed760;
    border: 1px solid rgba(30, 215, 96, 0.15);
}

.m2-verify-result.error {
    background: rgba(255, 71, 87, 0.05);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.15);
}

.m2-input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: var(--txt-dim);
    font-weight: 600;
}

.m2-input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 18px;
    color: white;
    font-size: 0.95rem;
    transition: 0.3s;
}

.m2-input-group input:focus {
    border-color: var(--pri);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.m2-cat-title {
    font-family: 'Orbitron';
    font-size: 0.8rem;
    color: var(--pri);
    margin: 30px 0 15px;
    letter-spacing: 1px;
}

.m2-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.m2-product-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.m2-product-card.active {
    background: rgba(108, 92, 231, 0.12);
    border-color: var(--pri);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.m2-prod-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    height: 2.3em;
    overflow: hidden;
    line-height: 1.2;
}

.m2-prod-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--sec);
}

.m2-prod-old-price {
    font-size: 0.72rem;
    color: var(--txt-dim);
    text-decoration: line-through;
    opacity: 0.7;
}

.m2-prod-discount {
    font-size: 0.65rem;
    color: #10b981;
    font-weight: 700;
    margin-top: 2px;
}

.m2-prod-points {
    font-size: 0.65rem;
    color: var(--txt-dim);
    font-weight: 700;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.m2-quantity-box {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
}

.m2-qty-controls {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.m2-qty-controls button {
    background: none;
    border: none;
    color: white;
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.2s;
}

.m2-qty-controls button:hover {
    background: rgba(255, 255, 255, 0.05);
}

.m2-qty-controls input {
    width: 50px;
    text-align: center;
    background: none;
    border: none;
    color: white;
    font-weight: 800;
    -moz-appearance: textfield;
    appearance: textfield;
}

.m2-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.m2-mini-save {
    background: rgba(108, 92, 231, 0.12);
    border: 1px solid rgba(162, 155, 254, 0.3);
    color: #a29bfe;
    padding: 10px 20px;
    border-radius: 14px;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.m2-mini-save i {
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.m2-mini-save:hover {
    background: linear-gradient(135deg, var(--pri) 0%, #8e44ad 100%);
    border-color: var(--pri);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.5);
}

.m2-mini-save:hover i {
    transform: rotate(90deg);
}

.m2-mini-save:active {
    transform: translateY(-1px);
}

.m2-pay-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.m2-pay-card.active {
    border-color: var(--pri);
    background: rgba(108, 92, 231, 0.1);
}

.m2-pay-icon img {
    height: 28px;
}

.m2-pay-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

.m2-pay-balance {
    font-size: 0.75rem;
    color: var(--sec);
}

/* --- Order Type Swiper --- */
.m2-type-swiper {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.m2-type-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--txt-dim);
    font-family: 'Orbitron';
    font-size: 0.75rem;
    font-weight: 800;
    padding: 10px;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 9px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.m2-type-btn.active {
    color: white;
    background: var(--pri);
    box-shadow: 0 4px 12px var(--pri-glow);
}

.m2-type-btn i {
    font-size: 0.85rem;
}

.m2-type-btn--pre.active {
    background: var(--acc);
    box-shadow: 0 4px 12px rgba(253, 121, 168, 0.3);
}

/* Category Filter Logic */
.m2-cat-group {
    display: block;
}

.m2-cat-group.hidden {
    display: none;
}


.m2-upload-area {
    border: 2px dashed var(--border);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.m2-upload-area:hover {
    border-color: var(--pri);
    background: rgba(108, 92, 231, 0.05);
}

.m2-checkout-bar {
    position: fixed;
    bottom: -120px;
    left: 0;
    width: 100%;
    background: rgba(10, 11, 16, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    z-index: 1000;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.m2-checkout-bar.show {
    bottom: 0;
}

.m2-checkout-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.m2-order-summary #summaryPrice {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--sec);
    font-family: 'Orbitron';
}

.m2-buy-btn {
    background: linear-gradient(135deg, var(--pri) 0%, var(--sec) 100%);
    border: none;
    color: white;
    padding: 14px 35px;
    border-radius: 12px;
    font-family: 'Orbitron';
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.3);
}

@media (max-width: 480px) {
    .m2-container {
        padding: calc(var(--hdr) + 15px) 10px 120px;
    }

    .m2-section {
        padding: 18px 12px;
        overflow: hidden;
    }

    .m2-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .m2-pay-card {
        padding: 12px;
    }

    .m2-payment-grid {
        grid-template-columns: 1fr;
    }

    .m2-id-grid {
        grid-template-columns: 1fr;
    }

    .m2-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .m2-region-picker {
        width: 100%;
    }

    .m2-checkout-inner {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        text-align: center;
    }

    .m2-buy-btn {
        padding: 12px 18px;
        font-size: 0.78rem;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .m2-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .m2-saved-grid {
        grid-template-columns: 1fr;
    }

    .m2-region-chip {
        padding: 5px 8px;
        font-size: 0.65rem;
    }

    .m2-checkout-inner {
        flex-direction: column;
        text-align: center;
    }

    .m2-buy-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
}

/* --- Account Management UI (Premium Refined) --- */
.m2-toggle-switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}

.m2-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.m2-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.m2-toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input:checked + .m2-toggle-slider {
    background-color: var(--pri);
}

input:checked + .m2-toggle-slider:before {
    transform: translateX(14px);
}

.m2-modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 10, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.m2-modal.show {
    display: flex;
}

.m2-modal-content {
    background: linear-gradient(165deg, #1a1b25 0%, #11121a 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 35px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

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

.m2-modal h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 0.5px;
}

.m2-modal p {
    font-size: 0.88rem;
    color: var(--txt-dim);
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.5;
}

.m2-modal .m2-input-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    font-weight: 700;
}

.m2-modal .m2-input-group input {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    height: 50px;
    font-size: 0.9rem;
}

.m2-modal .m2-input-group input:focus {
    background: rgba(255, 255, 255, 0.05);
}

.m2-mini-save {
    height: 48px;
    border-radius: 14px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.m2-mini-save--cancel {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.m2-mini-save--cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.m2-mini-save--submit {
    background: linear-gradient(135deg, var(--pri) 0%, #8e44ad 100%);
    border: none;
    color: white;
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
}

.m2-mini-save--submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(108, 92, 231, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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