/* Styles extracted from hypothesis_testing.html */
:root {
    --bg: #0f172a;
    --p: #1e293b;
    --g: #ffd700; /* Gold */
    --c: #06b6d4; /* Cyan */
    --t: #e2e8f0;
    --w: 280px;
    --h: 70px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
    background: var(--bg);
    color: var(--t);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}



/* Layout */
header {
    height: var(--h);
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--c);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.btn-lang {
    background: transparent;
    border: 1px solid var(--c);
    color: var(--c);
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-lang:hover {
    background: var(--c);
    color: #000;
    box-shadow: 0 0 10px var(--c);
}

.menu-btn {
    background: none;
    border: none;
    color: var(--t);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    padding: 5px;
}

.menu-btn:hover {
    color: var(--g);
}

.c {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Overlay for Mobile Sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--h);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--h));
    background: rgba(0, 0, 0, 0.6);
    z-index: 98;
    backdrop-filter: blur(2px);
}

aside {
    width: var(--w);
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid #334155;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
}

main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Nav */
.nav {
    list-style: none;
    padding: 20px 0;
}

.nav li {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 3px solid transparent;
    color: #94a3b8;
    transition: 0.3s;
}

.nav li:hover {
    background: rgba(255, 255, 255, 0.03);
    padding-right: 25px;
    color: var(--t);
}

.nav li.active {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), transparent);
    color: var(--g);
    border-right-color: var(--g);
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.nav svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Content */
.sec {
    display: none;
    max-width: 900px;
    margin: 0 auto;
    animation: fd 0.4s;
}

.sec.active {
    display: block;
}

@keyframes fd {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    margin-bottom: 20px;
    color: var(--t);
    border-bottom: 2px solid var(--g);
    padding-bottom: 8px;
    display: inline-block;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Card & Form */
.card {
    background: var(--p);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #334155;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
}

.fg {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: var(--c);
    font-size: 0.9rem;
}

input,
select {
    width: 100%;
    padding: 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 6px;
    color: var(--t);
    transition: 0.3s;
}

input:focus,
select:focus {
    border-color: var(--g);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.rad-group {
    display: flex;
    gap: 15px;
    background: rgba(15, 23, 42, 0.5);
    padding: 10px;
    border-radius: 6px;
    flex-wrap: wrap;
}

.rad-group label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--c);
    color: var(--c);
    margin-top: 10px;
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* Result */
.res {
    margin-top: 20px;
    padding: 15px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--c);
    border-radius: 8px;
    display: none;
}

.res.show {
    display: block;
    animation: sd 0.3s;
}

.rw {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
    font-size: 0.9rem;
}

.rv {
    direction: ltr;
    font-family: sans-serif;
    font-weight: bold;
    color: var(--c);
}

.dec {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}

.dec.rej {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid #ef4444;
}

.dec.nrej {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    border: 1px solid #22c55e;
}

@keyframes sd {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Visualization Area --- */
.viz-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.viz-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.viz-title {
    color: var(--g);
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: bold;
}

canvas {
    background: #0f172a;
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.sim-stats {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
}

.sim-stats span {
    color: var(--c);
    font-weight: bold;
}

/* Math Box */
.math-box {
    background: rgba(30, 41, 59, 0.6);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px dashed #334155;
    display: none;
    overflow-x: auto; /* Scroll for long formulas */
}

.math-title {
    font-weight: bold;
    color: var(--g);
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.math-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--g);
    border-radius: 2px;
}

.formula {
    font-family: 'Times New Roman', serif;
    font-size: 1.3rem;
    text-align: center;
    direction: ltr;
    padding: 10px 0;
    color: #fff;
    white-space: nowrap;
}

.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: 2px solid var(--g);
}

.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(--g);
}

.sqrt-inner {
    border-top: 1px solid #fff;
    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(--c);
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    font-size: 0.8rem;
}

.symbol-item {
    background: rgba(15, 23, 42, 0.5);
    padding: 6px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #334155;
}

.symbol-item span {
    display: block;
    font-family: 'Times New Roman', serif;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 2px;
    color: var(--g);
}

.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: #94a3b8;
}

.steps-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    right: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background: rgba(245, 158, 11, 0.2);
    color: var(--g);
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid var(--g);
}

.steps-list strong {
    color: var(--t);
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .viz-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --h: 60px;
    }

    .menu-btn {
        display: block;
    }

    /* Sidebar Logic */
    aside {
        position: fixed;
        top: var(--h);
        right: 0;
        height: calc(100vh - var(--h));
        width: 80%;
        max-width: 300px;
        transform: translateX(100%); /* Hide off-screen to the right */
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    aside.open {
        transform: translateX(0); /* Slide in */
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Content Adjustments */
    main {
        padding: 15px;
    }

    .sec {
        max-width: 100%;
    }

    h2 {
        font-size: 1.4rem;
    }

    .card {
        padding: 20px;
    }

    /* Inputs & Buttons */
    input,
    select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px;
    }

    .btn {
        padding: 14px;
        font-size: 1rem;
    }

    /* Formula Adjustments */
    .formula {
        font-size: 1.1rem;
        overflow-x: auto;
        display: inline-block;
        min-width: 100%;
    }

    /* Symbol Grid */
    .symbol-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    h2 { font-size: 1.2rem; }
    .logo span { display: none; } /* Hide text logo on very small screens */
    .logo svg { width: 28px; height: 28px; }
}
::-webkit-scrollbar{
    background-color: #4e4e4e00;
   
}