/* ============================================================
   TextKit OMEGA — Stylesheet (Sci-Fi Minimalist)
   ============================================================ */
:root {
    --bg: #0a0a0c; 
    --bg-el: #141416; 
    --bg-card: #1c1c1f; 
    --bg-input: #111112; 
    --bg-hover: rgba(224, 152, 64, 0.1);
    --fg: #f5f5f7; 
    --fg2: #c4bfb5; 
    --fg3: #8a8a93;
    --acc: #ff9d00; 
    --acc-l: #ffb84d; 
    --acc-d: #cc7a00; 
    --acc-s: rgba(255, 157, 0, 0.15); 
    --acc-ss: rgba(255, 157, 0, 0.08);
    --brd: rgba(255, 255, 255, 0.08); 
    --brd-s: rgba(255, 255, 255, 0.04);
    --ok: #10b981; 
    --ok-bg: rgba(16, 185, 129, 0.1); 
    --err: #f87171; 
    --err-bg: rgba(248, 113, 113, 0.1); 
    --inf: #60a5fa; 
    --inf-bg: rgba(96, 165, 250, 0.1);
    --r: 16px; 
    --rs: 12px; 
    --rx: 8px; 
    --hh: 60px; 
    --bh: 68px; 
    --fs: 14px; 
    --mono: 13px;
}

*, *::before, *::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

html, body { 
    height: 100%; 
    overflow: hidden; 
    background: var(--bg); 
}

body { 
    font-family: 'Space Grotesk', sans-serif; 
    color: var(--fg); 
    font-size: var(--fs); 
    background-image: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 157, 0, 0.04) 0%, transparent 60%), radial-gradient(ellipse 50% 35% at 10% 60%, rgba(255, 157, 0, 0.02) 0%, transparent 50%); 
}

::selection { 
    background: var(--acc-s); 
    color: var(--acc-l); 
}

.shell { 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
    height: 100dvh; 
    position: relative; 
    z-index: 10; 
}

.glow { 
    position: fixed; 
    pointer-events: none; 
    z-index: -1; 
    width: 400px; 
    height: 400px; 
    border-radius: 50%; 
    background: radial-gradient(circle, rgba(255, 157, 0, 0.04) 0%, transparent 70%); 
    top: -100px; 
    right: -100px; 
    animation: glowDrift1 20s ease-in-out infinite alternate; 
}

.glow2 { 
    width: 350px; 
    height: 350px; 
    top: auto; 
    right: auto; 
    bottom: -80px; 
    left: -120px; 
    background: radial-gradient(circle, rgba(255, 157, 0, 0.03) 0%, transparent 70%); 
    animation: glowDrift2 25s ease-in-out infinite alternate; 
}

@keyframes glowDrift1 { 
    0% { transform: translate(0, 0); } 
    100% { transform: translate(-30px, 40px); } 
}
@keyframes glowDrift2 { 
    0% { transform: translate(0, 0); } 
    100% { transform: translate(40px, -30px); } 
}

header { 
    height: var(--hh); 
    min-height: var(--hh); 
    display: flex; 
    align-items: center; 
    padding: 0 16px; 
    gap: 14px; 
    background: rgba(14, 14, 16, 0.85); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    border-bottom: 1px solid var(--brd-s); 
    z-index: 100; 
    position: relative; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.4); 
}

.ham { 
    width: 40px; 
    height: 40px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    gap: 5px; 
    background: transparent; 
    border: none; 
    cursor: pointer; 
    border-radius: var(--rx); 
    transition: background 0.2s; 
}
.ham:hover { background: var(--bg-hover); }
.ham span { 
    display: block; 
    width: 20px; 
    height: 2px; 
    background: var(--fg2); 
    border-radius: 2px; 
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); 
    transform-origin: center; 
}
.ham.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); background: var(--acc); }
.ham.open span:nth-child(2) { opacity: 0; }
.ham.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); background: var(--acc); }

.header-icon { 
    width: 26px; 
    height: 26px; 
    border-radius: 6px; 
    object-fit: cover; 
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.3); 
}
.logo { 
    flex: 1; 
    font-size: 18px; 
    font-weight: 700; 
    letter-spacing: -0.3px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.logo span { 
    color: var(--acc); 
    text-shadow: 0 0 15px var(--acc-s); 
}

.hstats { display: flex; gap: 6px; }
.hs { 
    padding: 4px 12px; 
    background: var(--bg-card); 
    border: 1px solid var(--brd-s); 
    border-radius: 20px; 
    font-size: 11px; 
    color: var(--fg3); 
    font-family: 'JetBrains Mono', monospace; 
    white-space: nowrap; 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); 
}
.hs b { color: var(--acc-l); font-weight: 700; }

.dov { 
    position: fixed; 
    inset: 0; 
    z-index: 500; 
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(5px); 
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.3s, visibility 0.3s; 
}
.dov.open { opacity: 1; visibility: visible; }

/* Sidebar Drawer */
.drw { 
    position: fixed; 
    top: 0; 
    left: 0; 
    bottom: 0; 
    width: 290px; 
    max-width: 80vw; 
    background: var(--bg-el); 
    border-right: 1px solid var(--brd-s); 
    z-index: 600; 
    transform: translateX(-100%); 
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1); 
    display: flex; 
    flex-direction: column; 
    overflow-y: auto; 
    overflow-x: hidden; 
    box-shadow: 10px 0 30px rgba(0,0,0,0.5); 
}
.drw.open { transform: translateX(0); }
.drw-h { padding: 28px 20px 20px; position: relative; }
.drw-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.drw-ico { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; box-shadow: 0 4px 16px rgba(255, 157, 0, 0.2); border: 1px solid var(--acc-s); }
.drw-txt { font-size: 20px; font-weight: 700; }
.drw-txt span { color: var(--acc); }
.drw-ver { font-size: 11px; color: var(--fg3); margin-left: 54px; margin-top: 2px; }

.drw-sec { padding: 6px 8px; }
.drw-st { 
    font-size: 9px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    color: var(--fg3); 
    padding: 12px 14px 8px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

.di { 
    display: flex; 
    align-items: center; 
    gap: 14px; 
    padding: 12px 14px; 
    border-radius: var(--rs); 
    color: var(--fg2); 
    font-size: 14px; 
    font-weight: 500; 
    cursor: pointer; 
    transition: all 0.2s; 
    border: none; 
    background: none; 
    width: 100%; 
    text-align: left; 
    font-family: 'Space Grotesk', sans-serif; 
}
.di:hover { background: var(--bg-hover); color: var(--fg); transform: translateX(4px); }
.di i { width: 18px; text-align: center; color: var(--acc); font-size: 15px; filter: drop-shadow(0 0 4px var(--acc-ss)); }

.drw-div { height: 1px; background: linear-gradient(90deg, transparent, var(--brd), transparent); margin: 8px 16px; }

/* Toggles & Controls */
.sr { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--brd-s); border-radius: var(--rs); margin-bottom:8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);}
.sl { font-size: 13px; color: var(--fg); font-weight:500; }
.sl small { display: block; font-size: 11px; color: var(--fg3); margin-top: 2px; font-weight:400; }
.tgl { width: 44px; height: 24px; border-radius: 12px; background: var(--bg-input); cursor: pointer; position: relative; transition: background 0.3s; border: 1px solid var(--brd); flex-shrink: 0; box-shadow: inset 0 2px 4px rgba(0,0,0,0.3); }
.tgl.on { background: var(--acc-d); border-color: var(--acc); box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 0 10px var(--acc-s); }
.tgl::after { content: ''; position: absolute; top: 1px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--fg2); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.tgl.on::after { transform: translateX(18px); background: #fff; }

.fsc { display: flex; align-items: center; gap: 8px; background: var(--bg-input); padding: 4px; border-radius: var(--rx); border: 1px solid var(--brd-s); }
.fsc button { width: 30px; height: 30px; border-radius: var(--rx); background: transparent; border: none; color: var(--fg2); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; font-family: 'Space Grotesk', sans-serif; }
.fsc button:hover { background: var(--bg-hover); color: var(--acc); }
.fsc span { font-size: 12px; color: var(--fg); min-width: 32px; text-align: center; font-family: 'JetBrains Mono', monospace; font-weight:700;}

/* Main Content Container */
.main { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; position: relative; z-index: 1; padding-bottom: 20px;}
.pg { display: none; padding: 16px 14px 24px; min-height: 100%; max-width: 1000px; margin: 0 auto; }
.pg.active { display: block; animation: pgIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes pgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Panels & Inputs */
.es { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.ep { background: var(--bg-el); border: 1px solid var(--brd-s); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: all 0.3s ease; flex: 1; box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.ep:focus-within { border-color: var(--acc-s); box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 0 1px var(--acc-s); transform: translateY(-2px); }

.pb { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--brd-s); background: rgba(0,0,0,0.2); gap: 10px; }
.pl { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--fg2); white-space: nowrap; }
.pl .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); animation: pulseDot 2s ease-in-out infinite alternate; }
@keyframes pulseDot { 0% { opacity: 0.4; } 100% { opacity: 1; } }

.pbs { display: flex; gap: 6px; flex-shrink: 0; }
.pbn { padding: 6px 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--brd); border-radius: var(--rx); color: var(--fg3); font-size: 10px; font-weight: 600; font-family: 'Space Grotesk', sans-serif; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 4px; }
.pbn:hover { color: var(--fg); border-color: var(--acc-s); background: var(--bg-hover); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.pbn:active { transform: scale(0.96); }
.pbn.ok { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }

.eta { width: 100%; min-height: 120px; max-height: 40vh; padding: 16px; background: transparent; border: none; color: var(--fg); font-family: 'JetBrains Mono', monospace; font-size: var(--mono); line-height: 1.8; resize: vertical; outline: none; }
.eta::placeholder { color: var(--fg3); opacity: 0.5; font-style: italic; font-family: 'Space Grotesk', sans-serif; }
.eta::-webkit-scrollbar { width: 4px; }
.eta::-webkit-scrollbar-thumb { background: var(--brd); border-radius: 4px; }

/* Font Fallback fixes Android rendering issues for Math Alphanumeric Unicodes */
.oa { min-height: 90px; max-height: 40vh; padding: 16px; font-family: 'JetBrains Mono', monospace; font-size: var(--mono); line-height: 1.8; color: var(--acc-l); white-space: pre-wrap; word-break: break-word; overflow-y: auto; text-shadow: 0 0 15px rgba(255, 157, 0, 0.1); }
.oa::-webkit-scrollbar { width: 4px; }
.oa::-webkit-scrollbar-thumb { background: var(--brd); border-radius: 4px; }
.oa.empty { color: var(--fg3); opacity: 0.3; font-style: italic; font-family: 'Space Grotesk', sans-serif; font-size: var(--fs); text-shadow: none; display: flex; align-items: center; justify-content: center; flex-direction: column; }

/* Tools Grids */
.slbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--fg2); margin: 20px 0 12px; display: flex; align-items: center; gap: 12px; }
.slbl::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--brd), transparent); }

.bg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

/* Super Highlighted Buttons */
.cb { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; background: rgba(30, 30, 35, 0.5); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--rs); color: var(--fg); font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; text-align: left; box-shadow: 0 4px 15px rgba(0,0,0,0.1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cb::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--acc); transform: scaleY(0); transition: transform 0.3s ease; transform-origin: bottom; }
.cb::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, var(--acc-ss), transparent 70%); opacity: 0; transition: opacity 0.3s; }
.cb:hover { border-color: rgba(255, 255, 255, 0.15); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); background: var(--bg-hover); }
.cb:hover::before { transform: scaleY(1); }
.cb:hover::after { opacity: 1; }
.cb:active { transform: translateY(1px); }

.ci { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 157, 0, 0.1); border: 1px solid var(--brd-s); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--acc); flex-shrink: 0; position: relative; z-index: 1; transition: all 0.3s; }
.cb:hover .ci { background: var(--acc-s); border-color: var(--acc); box-shadow: 0 0 15px var(--acc-s); color: var(--acc-l); }
.ct { position: relative; z-index: 1; line-height: 1.3; }

/* Control Containers */
.tc { background: var(--bg-el); border: 1px solid var(--brd-s); border-radius: var(--r); padding: 18px; margin-bottom: 16px; box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.tr { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.tf { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 100px; }
.tf label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--fg2); margin-left: 2px; }

.ti { padding: 12px 14px; background: var(--bg-input); border: 1px solid var(--brd-s); border-radius: var(--rs); color: var(--fg); font-family: 'JetBrains Mono', monospace; font-size: 13px; outline: none; transition: all 0.3s; width: 100%; box-shadow: inset 0 2px 6px rgba(0,0,0,0.3); }
.ti.color { padding: 4px; height: 42px; cursor: pointer; }
.ti:focus { border-color: var(--acc); box-shadow: inset 0 2px 6px rgba(0,0,0,0.3), 0 0 0 2px var(--acc-ss); background: rgba(0,0,0,0.7); }

.tbn { padding: 12px 24px; background: linear-gradient(135deg, var(--acc-l), var(--acc-d)); border: none; border-radius: var(--rs); color: #000; font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.5px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; box-shadow: 0 4px 15px rgba(255, 157, 0, 0.3), inset 0 1px 1px rgba(255,255,255,0.4); text-transform: uppercase; }
.tbn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 157, 0, 0.4), inset 0 1px 1px rgba(255,255,255,0.6); filter: brightness(1.1); }
.tbn:active { transform: translateY(1px); box-shadow: 0 2px 10px rgba(255, 157, 0, 0.3); }
.tbn.s { background: var(--bg-card); color: var(--fg); border: 1px solid var(--brd); box-shadow: 0 4px 15px rgba(0,0,0,0.2); text-transform: none; font-weight: 600; letter-spacing: 0; }
.tbn.s:hover { background: var(--bg-hover); border-color: var(--fg3); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

.tck { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fg2); font-weight: 500; cursor: pointer; padding: 8px 0; user-select: none; }
.tck input { appearance: none; width: 20px; height: 20px; border: 2px solid var(--brd); border-radius: 6px; background: var(--bg-input); cursor: pointer; position: relative; transition: all 0.2s; outline: none; }
.tck input:checked { background: var(--acc); border-color: var(--acc); box-shadow: 0 0 10px var(--acc-s); }
.tck input:checked::after { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; color: #000; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 11px; }

.srs { display: flex; flex-direction: column; gap: 12px; }
.sc { background: var(--bg-el); border: 1px solid var(--brd-s); border-radius: var(--rs); padding: 16px; transition: all 0.3s ease; animation: cardIn 0.4s ease both; position: relative; box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.sc:hover { border-color: var(--brd); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.sc.cpd { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); }
.sc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sc-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--acc); display: flex; align-items: center; gap: 8px; }
.sc-lbl .sc-cat { font-size: 9px; color: var(--fg3); font-weight: 600; padding: 2px 6px; background: rgba(255,255,255,0.05); border-radius: 4px; letter-spacing: 1px; }
.sc-acts { display: flex; gap: 4px; }
.sc-btn { background: rgba(255,255,255,0.03); border: 1px solid var(--brd-s); color: var(--fg2); cursor: pointer; padding: 6px 12px; font-size: 13px; transition: all 0.2s; border-radius: var(--rx); }
.sc-btn:hover { color: var(--acc); background: var(--bg-hover); border-color: var(--acc-s); }
.sc-btn.done { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }

/* FIX: Robust Font Fallback for Unicode Fancy Text to prevent [?] blocks on Android */
.sc-txt { font-family: "Noto Sans Math", "Cambria Math", "Segoe UI Symbol", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; font-size: 20px; color: var(--fg); word-break: break-word; line-height: 1.6; min-height: 32px; padding: 12px; background: var(--bg-input); border: 1px solid transparent; border-radius: var(--rx); cursor: pointer; transition: all 0.2s; user-select: text; -webkit-user-select: text; box-shadow: inset 0 2px 5px rgba(0,0,0,0.2); }
.sc-txt:hover { border-color: var(--brd); background: rgba(0,0,0,0.6); }
.sc-txt:active { border-color: var(--acc); box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 0 0 2px var(--acc-s); }
.scat { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--fg3); padding: 14px 0 6px; opacity: 0.45; }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Canvas Wrapper */
.t2i-canvas-wrap { width: 100%; display:flex; justify-content:center; align-items:center; background: var(--bg-input); border: 1px dashed var(--brd); border-radius: var(--rs); padding: 20px; overflow: auto; min-height: 150px; box-shadow: inset 0 5px 15px rgba(0,0,0,0.5); }
#t2iCanvas { max-width: 100%; height: auto; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); transition: transform 0.3s; }

.stat-grd { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-top: 10px;}
.stat-bx { background: var(--bg-input); border: 1px solid var(--brd-s); border-radius: var(--rs); padding: 12px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: transform 0.2s; }
.stat-bx:hover { transform: translateY(-2px); border-color: var(--brd); }
.stat-bx b { display: block; font-size: 18px; color: var(--acc); font-family: 'JetBrains Mono', monospace; margin-bottom: 2px; text-shadow: 0 0 10px rgba(255, 157, 0, 0.2); }
.stat-bx span { font-size: 10px; color: var(--fg2); text-transform: uppercase; letter-spacing: 1px; font-weight: 700;}

/* Primary Action Buttons */
.btn-massive { width: 100%; border-radius: 0 0 var(--r) var(--r); padding: 16px; font-size: 15px; display:flex; justify-content: center; align-items: center; background: linear-gradient(135deg, var(--acc-l), var(--acc-d)); color: #000; border:none; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-family: 'Space Grotesk', sans-serif; box-shadow: 0 -5px 15px rgba(255, 157, 0, 0.15), inset 0 1px 2px rgba(255,255,255,0.5); }
.btn-massive:hover { filter: brightness(1.15); box-shadow: 0 -5px 25px rgba(255, 157, 0, 0.3), inset 0 1px 2px rgba(255,255,255,0.6); }

/* Highlighted Bottom Nav Dock */
bnav { height: var(--bh); min-height: var(--bh); display: flex; align-items: stretch; background: rgba(14, 14, 16, 0.9); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border-top: 1px solid var(--brd-s); z-index: 100; position: relative; padding-bottom: env(safe-area-inset-bottom, 0); overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; box-shadow: 0 -10px 40px rgba(0,0,0,0.5); }
bnav::-webkit-scrollbar { display: block; height: 6px; }
bnav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.ni { flex: 0 0 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: none; border: none; color: var(--fg3); font-family: 'Space Grotesk', sans-serif; font-size: 9px; font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; letter-spacing: 0.2px; padding: 0 5px; }
.ni i { font-size: 18px; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s; filter: drop-shadow(0 0 0 transparent); }
.ni:hover { color: var(--fg2); background: rgba(255,255,255,0.02); }
.ni.active { color: var(--acc); background: radial-gradient(ellipse at bottom, rgba(255, 157, 0, 0.15) 0%, transparent 60%); }
.ni.active i { transform: scale(1.15) translateY(-2px); color: var(--acc-l); filter: drop-shadow(0 4px 6px rgba(255, 157, 0, 0.4)); }
.ni.active span { font-weight: 700; color: var(--fg); }
.ni::before { content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%); width: 0; height: 3px; background: var(--acc); border-radius: 0 0 4px 4px; transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 0 12px rgba(255, 157, 0, 0.6); }
.ni.active::before { width: 30px; }

/* Lock Modal */
.sys-ov { position: fixed; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; perspective: 1000px; display: none; }
.mod-ov { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(15px); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s; padding: 20px; perspective: 1000px; }
.mod-ov.open { opacity: 1; visibility: visible; }
.mod-box { background: rgba(20, 20, 22, 0.95); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--r); width: 100%; max-width: 500px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 30px 60px rgba(0,0,0,0.7), inset 0 1px 1px rgba(255,255,255,0.05); transform: translateY(40px) rotateX(5deg); opacity: 0; transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); pointer-events: auto; }
.mod-ov.open .mod-box { transform: translateY(0) rotateX(0); opacity: 1; }
.mod-hd { padding: 20px 24px; border-bottom: 1px solid var(--brd-s); display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 18px; color: var(--fg); letter-spacing: 0.5px; background: rgba(255,255,255,0.02); border-radius: var(--r) var(--r) 0 0; }
.mod-cls { background: rgba(255,255,255,0.05); border: 1px solid var(--brd-s); color: var(--fg2); width: 32px; height: 32px; border-radius: 50%; font-size: 14px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.mod-cls:hover { background: var(--err-bg); color: var(--err); border-color: var(--err); transform: rotate(90deg); }
.mod-bd { padding: 24px; overflow-y: auto; font-size: 14px; line-height: 1.8; color: var(--fg2); }

/* CSS Download Additions */
.circ-prog { position: relative; width: 140px; height: 140px; border-radius: 50%; background: conic-gradient(var(--ok) 0%, rgba(255,255,255,0.05) 0%); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; box-shadow: 0 0 30px rgba(16, 185, 129, 0.1); }
.circ-prog::before { content: ''; position: absolute; inset: 12px; background: rgba(20, 20, 22, 0.95); border-radius: 50%; box-shadow: inset 0 2px 10px rgba(0,0,0,0.5); }
.circ-prog-val { position: relative; font-size: 28px; font-weight: 700; color: var(--fg); font-family: 'JetBrains Mono', monospace; text-shadow: 0 0 10px rgba(255,255,255,0.2); }

.dev-hdr { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px dashed rgba(255,255,255,0.1); position: relative; }
.dev-av { width: 80px; height: 80px; border-radius: 20px; background: linear-gradient(135deg, var(--bg-card), var(--bg-input)); border: 2px solid var(--acc); display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--acc); box-shadow: 0 0 25px rgba(255, 157, 0, 0.3); overflow:hidden; position: relative;}
.dev-av::after { content: ''; position: absolute; inset:0; border-radius: 18px; box-shadow: inset 0 4px 10px rgba(255,255,255,0.2); pointer-events: none; }
.dev-av img { width: 100%; height: 100%; object-fit: cover; }
.dev-ttl { font-size: 26px; font-weight: 700; color: var(--fg); line-height: 1.2; letter-spacing: -0.5px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.bmc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #FFDD00; color: #000000; padding: 12px 24px; border-radius: 12px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; text-decoration: none; transition: all 0.3s; width: 100%; font-size: 16px; border: none; box-shadow: 0 4px 15px rgba(255, 221, 0, 0.3); }

.cust-lst { display: flex; flex-direction: column; gap: 10px; }
.cust-it { display: flex; align-items: center; background: rgba(0,0,0,0.3); border: 1px solid var(--brd-s); padding: 12px 16px; border-radius: var(--rs); gap: 16px; }
.cust-drg { display: flex; flex-direction: column; gap: 6px; color: var(--fg3); }
.cust-drg button { background: rgba(255,255,255,0.05); border: none; color: inherit; cursor: pointer; padding: 4px; border-radius: 4px; font-size: 10px; }
.cust-lbl { flex: 1; font-weight: 600; font-size: 14px; color: var(--fg); display: flex; align-items: center; gap: 12px; }
.cust-lbl i { color: var(--acc); width: 20px; text-align: center; font-size: 16px; }

.tb { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: max-content; max-width: 90vw; }
.tt { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: rgba(20, 20, 22, 0.95); border: 1px solid var(--brd); border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255,255,255,0.1); font-size: 14px; font-weight: 600; color: var(--fg); animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); white-space: nowrap; pointer-events: auto; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); letter-spacing: 0.5px; }
.tt.success { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.1); }
.tt.success i { color: var(--ok); filter: drop-shadow(0 0 5px var(--ok)); }
.tt.error { border-color: rgba(248, 113, 113, 0.4); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(248, 113, 113, 0.1); }
.tt.error i { color: var(--err); filter: drop-shadow(0 0 5px var(--err)); }
.tt.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-15px) scale(0.9); } }

@media (min-width: 768px) {
    .bg { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
    .pg { padding: 30px 40px 40px; }
    bnav { justify-content: flex-start; padding: 0 20px; border-radius: 20px 20px 0 0; margin: 0 auto; max-width: 1000px; border-left: 1px solid var(--brd-s); border-right: 1px solid var(--brd-s); } 
    .ni { flex: 0 0 90px; font-size: 11px; padding: 10px 0;} .ni i { font-size: 20px; }
}
@media (min-width: 1100px) {
    .es { flex-direction: row; gap: 20px; }
    .eta, .oa { min-height: 250px; max-height: 60vh; }
    .pg { max-width: 1060px; }
    .ec-controls { flex-direction: column; }
    .ec-dwn { display: none; }
    .ec-rgt { display: inline-block; }
}
