/* Styles extracted from two_sample_tests.html */
:root {
            /* Neon Dark Palette */
            --bg-dark: #0f172a;
            --bg-card: #1e293b;
            --text-main: #e2e8f0;
            --text-muted: #94a3b8;
            --neon-green: #00ff9d;
            --neon-blue: #00f3ff;
            --neon-gold: #ffd700;
            --border-color: #334155;
            --sw: 260px;
            --hh: 70px;
        }
        * { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
        body {
            background-color: var(--bg-dark);
            color: var(--text-main);
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
            position: relative;
        }
        /* --- Background Formulas --- */
       
        header {
            height: var(--hh);
            background: rgba(15, 23, 42, 0.95);
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            backdrop-filter: blur(10px);
            z-index: 100;
            box-shadow: 0 4px 20px rgba(0, 255, 157, 0.1);
        }
        .logo-area {
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: bold;
            font-size: 1.2rem;
            color: var(--neon-green);
            text-shadow: 0 0 8px rgba(0, 255, 157, 0.4);
        }
        .lang-btn {
            background: transparent;
            border: 1px solid var(--neon-green);
            color: var(--neon-green);
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: 0.3s;
        }
        .lang-btn:hover { background: rgba(0, 255, 157, 0.1); box-shadow: 0 0 10px var(--neon-green); }
        .menu-btn { display: none; background: none; border: none; color: var(--text-main); cursor: pointer; }
        /* --- Layout --- */
        .main-c { display: flex; flex: 1; overflow: hidden; }
        aside {
            width: var(--sw);
            background: rgba(30, 41, 59, 0.8);
            border-left: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            backdrop-filter: blur(5px);
            transition: transform 0.3s;
            z-index: 99;
        }
        .nav-item {
            padding: 18px 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 12px;
            border-right: 3px solid transparent;
            transition: 0.3s;
            color: var(--text-muted);
            font-size: 0.95rem;
        }
        .nav-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-main); }
        .nav-item.active {
            background: linear-gradient(90deg, rgba(0, 255, 157, 0.1), transparent);
            color: var(--neon-green);
            border-right-color: var(--neon-green);
        }
        .nav-item svg { width: 20px; height: 20px; fill: currentColor; }
        main { flex: 1; padding: 30px; overflow-y: auto; position: relative; }
        /* --- Sections & Cards --- */
        .sec { display: none; max-width: 900px; margin: 0 auto; animation: fade 0.4s ease; }
        .sec.active { display: block; }
        @keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
        h2 {
            margin-bottom: 25px;
            color: var(--text-main);
            border-bottom: 2px solid var(--neon-blue);
            padding-bottom: 10px;
            display: inline-block;
            font-size: 1.5rem;
            text-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
        }
        .card {
            background: var(--bg-card);
            padding: 30px;
            border-radius: 12px;
            border: 1px solid var(--border-color);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            margin-bottom: 25px;
            position: relative;
            overflow: hidden;
        }
        .card::before {
            content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
            background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
        }
        /* --- Forms --- */
        .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
        .grp-box { background: rgba(15, 23, 42, 0.6); padding: 15px; border-radius: 8px; border: 1px solid var(--border-color); }
        .grp-title { font-weight: bold; color: var(--neon-green); margin-bottom: 10px; display: block; border-bottom: 1px solid var(--border-color); padding-bottom: 5px; }
        .f-grp { margin-bottom: 12px; }
        label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--neon-blue); }
        input[type="number"], select {
            width: 100%;
            padding: 10px;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-main);
            font-size: 0.95rem;
            transition: 0.3s;
        }
        input:focus, select:focus {
            border-color: var(--neon-green);
            box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
        }
        .rad-grp { display: flex; gap: 15px; margin-top: 5px; background: rgba(255, 255, 255, 0.03); padding: 10px; border-radius: 6px; border: 1px solid var(--border-color); }
        .rad-grp label { margin: 0; font-weight: normal; cursor: pointer; display: flex; align-items: center; gap: 5px; color: var(--text-muted); }
        .rad-grp input { accent-color: var(--neon-green); }
        button {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
            color: #0f172a;
            border: none;
            border-radius: 6px;
            font-size: 1rem;
            font-weight: bold;
            cursor: pointer;
            transition: 0.3s;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0 4px 15px rgba(0, 255, 157, 0.3);
        }
        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 243, 255, 0.4);
        }
        /* --- Results --- */
        .res-box {
            margin-top: 20px;
            padding: 20px;
            border-radius: 8px;
            text-align: center;
            display: none;
            border: 1px solid;
        }
        .res-box.show { display: block; animation: slide 0.3s; }
        .res-box.ok {
            background: rgba(0, 255, 157, 0.05);
            color: var(--neon-green);
            border-color: var(--neon-green);
            box-shadow: 0 0 15px rgba(0, 255, 157, 0.1);
        }
        .res-box.err {
            background: rgba(255, 0, 0, 0.05);
            color: #ff4d4d;
            border-color: #ff4d4d;
        }
        .stat-row { display: flex; justify-content: space-between; margin-bottom: 8px; border-bottom: 1px dashed var(--border-color); padding-bottom: 5px; }
        .stat-val { direction: ltr; font-family: 'Courier New', monospace; font-weight: bold; }
        .decision { margin-top: 15px; padding: 10px; border-radius: 6px; font-weight: bold; }
        .dec-rej { background: rgba(255, 0, 0, 0.1); color: #ff4d4d; border: 1px solid #ff4d4d; }
        .dec-acc { background: rgba(0, 255, 157, 0.1); color: var(--neon-green); border: 1px solid var(--neon-green); }
        @keyframes slide { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
        /* --- Trust Path (Math Box) --- */
        .math-box {
            background: rgba(15, 23, 42, 0.6);
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 20px;
            border: 1px dashed var(--border-color);
            display: none;
        }
        .math-box.show { display: block; }
        .math-title {
            font-weight: bold; color: var(--neon-gold); margin-bottom: 15px;
            font-size: 0.95rem; display: flex; align-items: center; gap: 10px;
        }
        .math-title::before {
            content: ''; display: inline-block; width: 4px; height: 18px;
            background: var(--neon-gold); border-radius: 2px; box-shadow: 0 0 5px var(--neon-gold);
        }
        .formula {
            font-family: 'Times New Roman', serif; font-size: 1.2rem;
            text-align: center; direction: ltr; padding: 10px 0; color: var(--text-main);
        }
        .fraction { display: inline-block; vertical-align: middle; text-align: center; margin: 0 5px; }
        .fraction > span { display: block; padding: 0 5px; }
        .fraction span.numerator { border-bottom: 1px solid var(--text-muted); }
        .sqrt { display: inline-flex; align-items: center; position: relative; margin: 0 2px; }
        .sqrt::before { content: "\221A"; font-size: 1.2em; margin-left: 2px; color: var(--neon-green); }
        .sqrt::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: var(--text-muted); z-index: -1; }
        .sqrt-inner { border-top: 1px solid var(--text-muted); padding-top: 1px; padding-left: 2px; }
        .sup { font-size: 0.7em; vertical-align: super; margin-left: 2px; }
        .sub { font-size: 0.7em; vertical-align: sub; margin-right: 2px; }
        .symbol { font-style: italic; color: var(--neon-green); }
        .symbol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; font-size: 0.8rem; }
        .symbol-item {
            background: rgba(255, 255, 255, 0.03); padding: 6px; border-radius: 4px;
            text-align: center; border: 1px solid var(--border-color);
        }
        .symbol-item span { display: block; font-family: 'Times New Roman', serif; font-weight: bold; font-size: 1.1rem; margin-bottom: 2px; color: var(--neon-gold); }
        .steps-list { list-style: none; counter-reset: step; }
        .steps-list li {
            position: relative; padding-right: 25px; margin-bottom: 10px;
            font-size: 0.9rem; line-height: 1.5; color: var(--text-muted);
        }
        .steps-list li::before {
            counter-increment: step; content: counter(step); position: absolute;
            right: 0; top: 2px; width: 20px; height: 20px; background: rgba(0, 255, 157, 0.1);
            color: var(--neon-green); border-radius: 50%; text-align: center;
            line-height: 20px; font-size: 0.75rem; font-weight: bold; border: 1px solid var(--neon-green);
        }
        .steps-list strong { color: var(--text-main); }
        /* --- Visualization Area --- */
        .viz-container {
            display: none;
            grid-template-columns: 1fr;
            gap: 20px;
            margin-top: 20px;
            animation: fade 0.5s;
        }
        .viz-container.show { display: grid; }
        .viz-box {
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 15px;
            display: flex;
            flex-direction: column;
            align-items: center;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }
        .viz-title {
            color: var(--neon-gold);
            font-size: 0.9rem;
            margin-bottom: 10px;
            font-weight: bold;
            text-align: center;
        }
        canvas {
            background: #0f172a;
            border-radius: 8px;
            max-width: 100%;
            box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
            border: 1px solid #334155;
        }
        /* --- Mobile --- */
        @media(max-width: 768px) {
            .menu-btn { display: block; }
            aside { position: fixed; top: var(--hh); right: -100%; height: calc(100vh - var(--hh)); width: 80%; box-shadow: -5px 0 20px rgba(0,0,0,0.5); }
            aside.open { transform: translateX(-150%); }
            .grid-2 { grid-template-columns: 1fr; }
            .bg-math { font-size: 1rem; opacity: 0.05; }
        }

        ::-webkit-scrollbar{
            background-color: #0f172a;
        }