
/* =========================
   PAGE
========================= */
.calculator-page {
    padding: 70px 5%;
    background: var(--bg);
}

/* =========================
   UNIVERSAL SECTION CARD
========================= */
.calculator-box,
.comparison-box,
.graph-box,
.explanation-box,
.formula-box {
    max-width: 900px;
    margin: 35px auto;
    background: white;
    border-left: 5px solid var(--accent);
    border-radius: 8px;
    padding: 28px 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    position: relative;
}

.calculator-box::before,
.comparison-box::before,
.explanation-box::before,
.graph-box::before,
.formula-box::before {
    position: absolute;
    top: 18px;
    left: -18px;
    background: var(--accent);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.show { display: block; }
/* Icons */
.calculator-box::before {
    content: "⚙️";
}

.comparison-box::before {
    content: "📊";
}

.graph-box::before {
    content: "📈";
}

.formula-box::before {
    content: "⚡";
}

/* =========================
   HEADER
========================= */
.calculator-header {
    text-align: center;
    margin-bottom: 45px;
}

.calculator-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 14px;
}

.calculator-header p {
    color: var(--muted);
    max-width: 760px;
    margin: auto;
    font-size: 17px;
}

/* =========================
   SECTION TITLES
========================= */
.calculator-box h2,
.comparison-box h2,
.graph-box h2,
.formula-box h2 {
    margin-bottom: 18px;
    color: var(--accent-dark);
}

/* =========================
   INPUTS
========================= */
.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent);
}

/* =========================
   BUTTON
========================= */
.calculator-box button {
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.calculator-box button:hover {
    background: var(--accent-dark);
}

/* =========================
   RESULT
========================= */
.result-box {
    margin-top: 24px;
    padding: 22px;
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 6px;
    line-height: 2;
}

/* =========================
   TABLE
========================= */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px;
    border: 1px solid var(--border);
    text-align: center;
}

th {
    background: #f8fafc;
}

/* =========================
   GRAPH
========================= */
canvas {
    max-height: 420px;
}

/* =========================
   FORMULA STYLE
========================= */
.formula {
    display: block;
    background: #f8fafc;
    border: 1px dashed var(--border);
    padding: 14px 18px;
    margin: 14px 0;
    border-radius: 6px;
    font-family: "Courier New", monospace;
}

/* =========================
   TEXT
========================= */
.formula-box p,
.comparison-box p,
.graph-box p {
    color: var(--text);
    line-height: 1.8;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
    .calculator-page {
        padding: 40px 20px;
    }

    .calculator-box,
    .comparison-box,
    .graph-box,
    .formula-box {
        padding: 22px;
    }

    th, td {
        font-size: 14px;
        padding: 10px;
    }
}

