/* ============================================================
   NSE Option Chain — Advanced UI (Final)
   Desktop table + Mobile mirrored-scroll view + Hamburger drawer
   ============================================================ */

* { box-sizing: border-box; }

html, body {
    overflow: hidden;
    height: 100%;
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }
::-webkit-scrollbar-corner { background: #0f172a; }

.number-format {
    font-family: 'JetBrains Mono', 'Segoe UI', monospace;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   HIDE MOBILE-ONLY ELEMENTS BY DEFAULT (desktop view)
   ============================================================ */
.mobile-topbar,
.mobile-info-strip,
.mobile-footer { display: none !important; }

#mtb-drawer { display: none !important; }

/* ============================================================
   MAIN SCROLL CONTAINER (desktop)
   ============================================================ */
#table-wrap {
    position: relative;
    overflow: auto;
    flex: 1 1 0;
    min-height: 0;
}

#chain-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    width: 100%;
    min-width: max-content;
}

/* ============================================================
   STICKY THEAD
   ============================================================ */
#chain-table thead tr:nth-child(1) th {
    position: sticky;
    top: 0;
    z-index: 27;
    background-color: #0f172a;
}

#chain-table thead tr:nth-child(2) th {
    position: sticky;
    top: 46px;
    z-index: 26;
    background-color: #0f172a;
    border-bottom: 1px solid #1e293b;
}

/* ============================================================
   STICKY STRIKE COLUMN (7th column)
   ============================================================ */
#chain-table thead th:nth-child(7),
#chain-table tbody td:nth-child(7) {
    position: sticky;
    left: 0;
    z-index: 15;
    background-color: #1e293b;
}

#chain-table thead th:nth-child(7) {
    z-index: 40 !important;
    background-color: #1f2937 !important;
    border-left: 1px solid #334155;
    border-right: 1px solid #334155;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.5);
}

#chain-table tbody td:nth-child(7) {
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
    border-left: 1px solid #334155;
    border-right: 1px solid #334155;
}

/* ============================================================
   TABLE BODY
   ============================================================ */
#chain-table tbody tr { transition: background-color 0.15s ease; }
#chain-table tbody tr:nth-child(even) { background: rgba(15, 23, 42, 0.5); }
#chain-table tbody tr:hover { background: rgba(51, 65, 85, 0.5); }

#chain-table tbody td {
    padding: 8px 6px;
    font-size: 13.5px;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(30, 41, 59, 0.7);
    white-space: nowrap;
}

/* ============================================================
   ATM ROW
   ============================================================ */
#chain-table tbody tr.spot-row {
    background: linear-gradient(90deg,
        rgba(59, 130, 246, 0.20) 0%,
        rgba(59, 130, 246, 0.32) 50%,
        rgba(59, 130, 246, 0.20) 100%) !important;
    box-shadow:
        inset 0 0 0 2px rgba(59, 130, 246, 0.75),
        inset 0 8px 24px rgba(59, 130, 246, 0.18),
        0 0 24px rgba(59, 130, 246, 0.35);
    position: relative;
}

#chain-table tbody tr.spot-row td {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    background: transparent;
}

#chain-table tbody tr.spot-row td:nth-child(7) {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: #ffffff !important;
    box-shadow:
        2px 0 12px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(59, 130, 246, 0.9) !important;
    z-index: 20 !important;
    position: sticky;
    left: 0;
}

#chain-table tbody tr.spot-row td:nth-child(7)::before {
    content: "★ ATM";
    position: absolute;
    bottom: 2px;
    right: 6px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #fbbf24;
    text-shadow: 0 0 6px #fbbf24;
}

#chain-table tbody tr.spot-row::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.22) 50%, transparent 100%);
    animation: atmSweep 3s ease-in-out infinite;
}

@keyframes atmSweep {
    0%   { transform: translateX(-100%); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* ============================================================
   SUPPORT / RESISTANCE
   ============================================================ */
#chain-table tbody tr.resistance-1 td:nth-child(-n+6) { background: rgba(239, 68, 68, 0.20); }
#chain-table tbody tr.resistance-2 td:nth-child(-n+6) { background: rgba(239, 68, 68, 0.13); }
#chain-table tbody tr.resistance-3 td:nth-child(-n+6) { background: rgba(239, 68, 68, 0.08); }

#chain-table tbody tr.support-1 td:nth-child(n+8) { background: rgba(16, 185, 129, 0.20); }
#chain-table tbody tr.support-2 td:nth-child(n+8) { background: rgba(16, 185, 129, 0.13); }
#chain-table tbody tr.support-3 td:nth-child(n+8) { background: rgba(16, 185, 129, 0.08); }

#chain-table tbody tr[class*="resistance"] td:nth-child(7)::after,
#chain-table tbody tr[class*="support"] td:nth-child(7)::after {
    content: "";
    position: absolute;
    top: 2px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 1px 4px;
    border-radius: 3px;
    z-index: 2;
}
#chain-table tbody tr[class*="resistance"] td:nth-child(7)::after { left: 6px; }
#chain-table tbody tr[class*="support"] td:nth-child(7)::after { right: 6px; }

#chain-table tbody tr.resistance-1 td:nth-child(7)::after { content: "R1"; background: #dc2626; color: #fff; }
#chain-table tbody tr.resistance-2 td:nth-child(7)::after { content: "R2"; background: #b91c1c; color: #fff; }
#chain-table tbody tr.resistance-3 td:nth-child(7)::after { content: "R3"; background: #991b1b; color: #fff; }
#chain-table tbody tr.support-1 td:nth-child(7)::after { content: "S1"; background: #059669; color: #fff; }
#chain-table tbody tr.support-2 td:nth-child(7)::after { content: "S2"; background: #047857; color: #fff; }
#chain-table tbody tr.support-3 td:nth-child(7)::after { content: "S3"; background: #065f46; color: #fff; }

/* ============================================================
   ITM / OTM
   ============================================================ */
#chain-table tbody tr.itm-ce td:nth-child(-n+6) { background: rgba(239, 68, 68, 0.06); }
#chain-table tbody tr.itm-pe td:nth-child(n+8) { background: rgba(16, 185, 129, 0.06); }

/* ============================================================
   TOP-2 RANK HIGHLIGHTS
   ============================================================ */
#chain-table tbody tr td.rank-ce-1 {
    background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%) !important;
    color: #fff !important;
    font-weight: 800 !important;
    border: 1px solid #f87171 !important;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.15), 0 0 8px rgba(239,68,68,0.6) !important;
    text-shadow: 0 0 4px rgba(0,0,0,0.7);
}
#chain-table tbody tr td.rank-ce-2 {
    background: linear-gradient(180deg, #ea580c 0%, #c2410c 100%) !important;
    color: #fff !important;
    font-weight: 800 !important;
    border: 1px solid #fb923c !important;
    box-shadow: inset 0 0 8px rgba(255,255,255,0.12), 0 0 6px rgba(251,146,60,0.55) !important;
    text-shadow: 0 0 4px rgba(0,0,0,0.7);
}
#chain-table tbody tr td.rank-pe-1 {
    background: linear-gradient(180deg, #059669 0%, #065f46 100%) !important;
    color: #fff !important;
    font-weight: 800 !important;
    border: 1px solid #34d399 !important;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.15), 0 0 8px rgba(16,185,129,0.6) !important;
    text-shadow: 0 0 4px rgba(0,0,0,0.7);
}
#chain-table tbody tr td.rank-pe-2 {
    background: linear-gradient(180deg, #ca8a04 0%, #a16207 100%) !important;
    color: #fff !important;
    font-weight: 800 !important;
    border: 1px solid #facc15 !important;
    box-shadow: inset 0 0 8px rgba(255,255,255,0.12), 0 0 6px rgba(250,204,21,0.55) !important;
    text-shadow: 0 0 4px rgba(0,0,0,0.7);
}

/* ============================================================
   LIVE CELL FLASH — DISABLED
   ============================================================ */
.cell-flash-up,
.cell-flash-down {
    animation: none !important;
    background: transparent !important;
}

/* ============================================================
   SPOT PRICE
   ============================================================ */
#spot-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 800;
    color: #60a5fa;
    letter-spacing: 0.3px;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.35);
    transition: color 0.3s ease;
    line-height: 1;
}
#spot-price.spot-up   { color: #34d399; text-shadow: 0 0 10px rgba(52, 211, 153, 0.55); }
#spot-price.spot-down { color: #f87171; text-shadow: 0 0 10px rgba(248, 113, 113, 0.55); }

#spot-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.3px;
}
#spot-change.spot-up   { color: #34d399; }
#spot-change.spot-down { color: #f87171; }

#spot-arrow.spot-up   { color: #34d399; }
#spot-arrow.spot-down { color: #f87171; }

/* ============================================================
   MODAL
   ============================================================ */
#disclaimer-modal.hidden { display: none !important; }
#disclaimer-modal:not(.hidden) { display: flex !important; }

.tab-btn {
    transition: all 0.2s ease;
    background: none;
    border: 0;
    cursor: pointer;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
}
.tab-btn.active {
    color: #34d399;
    border-bottom-color: #34d399;
}
.tab-pane { animation: fadeIn 0.3s ease; }
.tab-pane.hidden { display: none !important; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MARKET STATUS
   ============================================================ */
#market-status.open   { color: #34d399; }
#market-status.closed { color: #f87171; }
#market-status.pre    { color: #fbbf24; }

/* ============================================================
   HEADER / FOOTER
   ============================================================ */
.app-topbar { position: relative; z-index: 50; flex-shrink: 0; }
.app-footer { position: relative; z-index: 50; }

/* ============================================================
   HOVER / PULSE
   ============================================================ */
.data-cell { transition: background-color 0.15s ease; }
.data-cell:hover { background: rgba(59, 130, 246, 0.08); }

.highlight-cell { position: relative; animation: highlightPulse 0.6s ease; }
.highlight-cell::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    background: #fbbf24;
    border-radius: 50%;
    box-shadow: 0 0 7px #fbbf24;
}
@keyframes highlightPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ============================================================
   ============================================================
   MOBILE VIEW  (≤ 768px)
   ============================================================
   ============================================================ */

#mobile-view { display: none; }

@media (max-width: 768px) {

    /* ---------- Hide desktop-only ---------- */
    .desktop-topbar,
    .desktop-info-strip,
    .desktop-footer,
    #table-wrap { display: none !important; }

    /* ---------- Show mobile-only ---------- */
    .mobile-topbar     { display: flex !important; }
    .mobile-info-strip { display: flex !important; }
    .mobile-footer     { display: flex !important; }
    #mtb-drawer        { display: block !important; }
    #mobile-view       { display: flex !important; }

    /* ============================================================
       MOBILE TOPBAR
       ============================================================ */
    .mobile-topbar {
        flex-direction: column;
        background: #0b1220;
        border-bottom: 1px solid #1e293b;
        flex-shrink: 0;
        z-index: 60;
        position: relative;
    }

    .mtb-row1 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px 6px;
        gap: 8px;
        min-height: 44px;
    }

    /* Brand */
    .mtb-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        min-width: 0;
    }
    .mtb-logo {
        background: #dc2626;
        color: #fff;
        width: 28px;
        height: 28px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .mtb-title {
        font-size: 12.5px;
        font-weight: 700;
        color: #e2e8f0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100px;
    }

    /* Spot price */
    .mtb-spot {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        line-height: 1.05;
        flex: 1;
        min-width: 0;
        margin-left: auto;
        margin-right: 4px;
    }
    .mtb-spot-price {
        font-family: 'JetBrains Mono', monospace;
        font-size: 14px;
        font-weight: 800;
        color: #60a5fa;
        white-space: nowrap;
    }
    .mtb-spot-change {
        font-family: 'JetBrains Mono', monospace;
        font-size: 9px;
        color: #94a3b8;
        white-space: nowrap;
    }
    .mtb-spot-change.up   { color: #34d399; }
    .mtb-spot-change.down { color: #f87171; }

    /* Hamburger button */
    .mtb-menu-btn {
        background: #1e293b;
        border: 1px solid #475569;
        border-radius: 8px;
        width: 40px;
        height: 40px;
        min-width: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s ease, border-color 0.15s ease;
    }
    .mtb-menu-btn:hover,
    .mtb-menu-btn:active,
    .mtb-menu-btn:focus {
        background: #334155;
        border-color: #64748b;
        outline: none;
    }

    /* Pure CSS 3-bar hamburger */
    .mtb-hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 18px;
        height: 14px;
        pointer-events: none;
    }
    .mtb-hamburger > span {
        display: block;
        height: 2px;
        width: 100%;
        background: #e2e8f0;
        border-radius: 2px;
        transition: transform 0.2s ease, opacity 0.2s ease;
        transform-origin: center;
    }

    /* Open state → X */
    .mtb-menu-btn[aria-expanded="true"] .mtb-hamburger > span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .mtb-menu-btn[aria-expanded="true"] .mtb-hamburger > span:nth-child(2) {
        opacity: 0;
    }
    .mtb-menu-btn[aria-expanded="true"] .mtb-hamburger > span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* Row 2 */
    .mtb-row2 {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 0 10px 8px;
    }
    .mtb-idx-group { display: flex; gap: 3px; flex-shrink: 0; }
    .mtb-idx {
        padding: 6px 10px;
        font-size: 11px;
        font-weight: 700;
        border-radius: 6px;
        background: #1e293b;
        color: #94a3b8;
        border: 1px solid #334155;
        cursor: pointer;
        min-height: 32px;
        -webkit-tap-highlight-color: transparent;
    }
    .mtb-idx:active { background: #334155; }
    .mtb-idx.bg-ce-red {
        background: #dc2626 !important;
        color: #fff !important;
        border-color: #dc2626 !important;
    }
    .mtb-expiry {
        flex: 1;
        min-width: 0;
        background: #1e293b;
        border: 1px solid #334155;
        color: #e2e8f0;
        font-size: 11.5px;
        padding: 7px 26px 7px 8px;
        border-radius: 6px;
        font-family: 'JetBrains Mono', monospace;
        min-height: 32px;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%222%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%2F%3E%3C%2Fsvg%3E");
        background-repeat: no-repeat;
        background-position: right 8px center;
    }

    /* ============================================================
       MOBILE DRAWER
       ============================================================ */
    .mtb-drawer {
        position: fixed;
        top: 96px;
        left: 0;
        right: 0;
        z-index: 55;
        background: rgba(15, 23, 42, 0.99);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-bottom: 1px solid #334155;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
    }
    .mtb-drawer.open {
        max-height: 82vh;
        overflow-y: auto;
    }
    .mtb-drawer-inner { padding: 14px 14px 20px; }

    .mtb-block { margin-bottom: 16px; }
    .mtb-label {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        color: #94a3b8;
        font-weight: 700;
        margin-bottom: 8px;
        display: block;
    }

    .mtb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
    .mtb-chip {
        padding: 8px 12px;
        background: #1e293b;
        border: 1px solid #334155;
        border-radius: 6px;
        color: #cbd5e1;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        min-height: 34px;
        -webkit-tap-highlight-color: transparent;
    }
    .mtb-chip:active { background: #334155; }
    .mtb-chip.active {
        background: #3b82f6 !important;
        color: #fff !important;
        border-color: #3b82f6 !important;
    }
    .mtb-chip.bg-pe-green {
        background: #059669 !important;
        border-color: #059669 !important;
        color: #fff !important;
    }
    .mtb-chip.bg-blue-600 {
        background: #2563eb !important;
        border-color: #2563eb !important;
        color: #fff !important;
    }

    .mtb-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .mtb-action-btn {
        padding: 11px 10px;
        background: #1e293b;
        border: 1px solid #334155;
        border-radius: 8px;
        color: #e2e8f0;
        font-size: 12.5px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        cursor: pointer;
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
    }
    .mtb-action-btn:active { background: #334155; }

    .mtb-stats {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }
    .mtb-stat {
        background: #1e293b;
        border: 1px solid #334155;
        border-radius: 8px;
        padding: 10px 4px;
        text-align: center;
    }
    .mtb-stat-label {
        display: block;
        font-size: 9px;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        font-weight: 700;
        margin-bottom: 3px;
    }
    .mtb-stat-val {
        font-family: 'JetBrains Mono', monospace;
        font-size: 13px;
        font-weight: 800;
        color: #e2e8f0;
    }
    .mtb-stat-val.ce { color: #f87171; }
    .mtb-stat-val.pe { color: #34d399; }

    .mtb-info-row {
        display: flex;
        justify-content: space-between;
        font-size: 11.5px;
        color: #94a3b8;
        padding: 5px 0;
        font-family: 'JetBrains Mono', monospace;
        gap: 8px;
    }
    .mtb-info-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mtb-info-row b { color: #e2e8f0; font-weight: 700; }
    .mtb-info-row b.red { color: #f87171; }
    .mtb-info-row b.green { color: #34d399; }
    .mtb-status.open { color: #34d399; }
    .mtb-status.closed { color: #f87171; }
    .mtb-status.pre { color: #fbbf24; }

    /* ============================================================
       MOBILE INFO STRIP
       ============================================================ */
    .mobile-info-strip {
        align-items: center;
        gap: 8px;
        padding: 6px 10px;
        background: #0b1220;
        border-bottom: 1px solid #1e293b;
        font-family: 'JetBrains Mono', monospace;
        font-size: 10.5px;
        color: #94a3b8;
        flex-shrink: 0;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .mobile-info-strip::-webkit-scrollbar { display: none; }
    .mis-item b { color: #e2e8f0; font-weight: 700; margin-left: 3px; }
    .mis-item b.red { color: #f87171; }
    .mis-item b.green { color: #34d399; }
    .mis-sep { color: #334155; }

    /* ============================================================
       MOBILE MIRRORED VIEW
       ============================================================ */
    #mobile-view {
        flex-direction: column;
        flex: 1 1 0;
        min-height: 0;
        overflow: hidden;
        background: #0f172a;
    }

    .mv-header {
        display: grid;
        grid-template-columns: 1fr 84px 1fr;
        background: #0f172a;
        border-bottom: 1px solid #1e293b;
        flex-shrink: 0;
        z-index: 30;
    }
    .mv-pane-h {
        text-align: center;
        padding: 8px 4px;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.6px;
    }
    .mv-pane-h.ce { color: #f87171; background: rgba(239, 68, 68, 0.1); }
    .mv-pane-h.pe { color: #34d399; background: rgba(16, 185, 129, 0.1); }
    .mv-pane-h.strike {
        color: #60a5fa;
        background: #1f2937;
        border-left: 1px solid #334155;
        border-right: 1px solid #334155;
        font-size: 12px;
    }

    .mv-body {
        display: grid;
        grid-template-columns: 1fr 84px 1fr;
        flex: 1 1 0;
        min-height: 0;
        overflow: hidden;
        position: relative;
    }

    .mv-pane {
        overflow-x: auto;
        overflow-y: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        position: relative;
        overscroll-behavior: contain;
    }
    .mv-pane::-webkit-scrollbar { display: none; }

    .mv-inner {
        display: flex;
        flex-direction: column;
        min-width: max-content;
    }

    .mv-row {
        display: flex;
        flex-shrink: 0;
        border-bottom: 1px solid rgba(30, 41, 59, 0.7);
    }

    .mv-cell {
        flex: 0 0 70px;
        padding: 8px 4px;
        text-align: center;
        font-size: 12px;
        font-family: 'JetBrains Mono', monospace;
        white-space: nowrap;
        color: #e2e8f0;
        border-right: 1px solid rgba(30, 41, 59, 0.4);
    }

    .mv-pane.ce .mv-cell { color: #fee2e2; }
    .mv-pane.pe .mv-cell { color: #d1fae5; }

    .mv-strike {
        background: #1e293b;
        border-left: 2px solid #334155;
        border-right: 2px solid #334155;
        overflow-y: auto;
        overflow-x: hidden;
        position: relative;
        z-index: 5;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .mv-strike::-webkit-scrollbar { display: none; }

    .mv-strike .mv-row {
        display: flex;
        justify-content: center;
        align-items: center;
        border-bottom: 1px solid rgba(30, 41, 59, 0.7);
    }
    .mv-strike .mv-cell {
        border: none;
        width: 100%;
        font-weight: 800;
        font-size: 13px;
        color: #ffffff;
        padding: 8px 2px;
        text-align: center;
        position: relative;
    }

    .mv-row.atm .mv-cell,
    .mv-strike .mv-row.atm .mv-cell {
        background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
        color: #fff !important;
        font-weight: 800;
    }
    .mv-strike .mv-row.atm .mv-cell::after {
        content: "★";
        position: absolute;
        top: 1px;
        right: 3px;
        font-size: 9px;
        color: #fbbf24;
    }

    .mv-pane.ce .mv-cell.rank-1 { background: #dc2626 !important; color: #fff !important; font-weight: 800; }
    .mv-pane.ce .mv-cell.rank-2 { background: #ea580c !important; color: #fff !important; font-weight: 800; }
    .mv-pane.pe .mv-cell.rank-1 { background: #059669 !important; color: #fff !important; font-weight: 800; }
    .mv-pane.pe .mv-cell.rank-2 { background: #ca8a04 !important; color: #fff !important; font-weight: 800; }

    .mv-pane.ce .mv-cell[data-field="ltp"] { font-weight: 800; color: #fff; }
    .mv-pane.pe .mv-cell[data-field="ltp"] { font-weight: 800; color: #fff; }

    .mv-strike .mv-row .mv-cell .badge {
        position: absolute;
        top: 1px;
        font-size: 8px;
        font-weight: 800;
        padding: 1px 3px;
        border-radius: 3px;
    }
    .mv-strike .mv-row .mv-cell .badge.r1 { left: 3px; background: #dc2626; color: #fff; }
    .mv-strike .mv-row .mv-cell .badge.r2 { left: 3px; background: #b91c1c; color: #fff; }
    .mv-strike .mv-row .mv-cell .badge.r3 { left: 3px; background: #991b1b; color: #fff; }
    .mv-strike .mv-row .mv-cell .badge.s1 { right: 3px; background: #059669; color: #fff; }
    .mv-strike .mv-row .mv-cell .badge.s2 { right: 3px; background: #047857; color: #fff; }
    .mv-strike .mv-row .mv-cell .badge.s3 { right: 3px; background: #065f46; color: #fff; }

    /* ============================================================
       MOBILE FOOTER
       ============================================================ */
    .mobile-footer {
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        background: #0b1220;
        border-top: 1px solid #1e293b;
        flex-shrink: 0;
    }
    .mf-btn {
        flex: 1;
        padding: 10px 10px;
        background: #1e293b;
        border: 1px solid #334155;
        border-radius: 8px;
        color: #e2e8f0;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 40px;
        -webkit-tap-highlight-color: transparent;
    }
    .mf-btn:active { background: #334155; }
    .mf-format {
        font-size: 10px;
        color: #94a3b8;
        font-family: 'JetBrains Mono', monospace;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .mf-format b { color: #e2e8f0; }
}