html,
body {
    height: 100%;
}

.wrap {
    min-height: 100%;
    height: auto;
    margin: 0 auto -60px;
    padding: 0 0 60px;
}

.wrap > .container {
    padding: 70px 15px 20px;
}

.footer {
    height: 60px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.jumbotron {
    text-align: center;
    background-color: transparent;
}
/* VCE Methods Practice - Modern Styles */

.eq {
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 1.25em;
    font-style: italic;
    color: #1a237e;
}

/* Question Card */
.question-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(13,71,161,0.08), 0 1px 4px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}

.question-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
}

.question-badge {
    color: #fff;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.3px;
}

.question-badge i {
    margin-right: 8px;
    opacity: 0.9;
}

.btn-tip-modern {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

/* World-Class Calculus Enhancement Styles */

/* Enhanced Remember Sections */
.remember-enhanced {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.08);
}

.remember-enhanced h4 {
    color: #1565c0;
    margin-bottom: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.concept-card {
    background: #ffffff;
    border: 1px solid #e1f5fe;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.04);
}

.concept-intro, .visual-concept, .real-world {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid #1565c0;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
    font-weight: 600;
}

/* Fill-in-the-blanks Styles */
.fillblanks-container {
    background: #fafafa;
    border: 2px dashed #bbb;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    line-height: 2.2;
}

.blank-input {
    background: #ffffff;
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-weight: bold;
    color: #333;
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.blank-input:focus {
    border-color: #1565c0;
    box-shadow: 0 0 8px rgba(21, 101, 192, 0.3);
    outline: none;
}

.blank-input.correct {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #2e7d32;
}

.blank-input.incorrect {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.blank-input.small {
    min-width: 50px;
}

.blank-input.final-answer {
    background: #fff3e0;
    border: 2px solid #ff9800;
    font-weight: bold;
    min-width: 120px;
}

.fillblanks-check {
    text-align: center;
    margin-top: 16px;
}

/* Fraction Display */
.fraction-display {
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    margin: 0 8px;
}

.fraction-display .numerator {
    display: block;
    border-bottom: 2px solid #333;
    padding-bottom: 2px;
    margin-bottom: 2px;
}

.fraction-display .denominator {
    display: block;
    padding-top: 2px;
}

/* Limit Definition Styles */
.limit-definition {
    background: #f3e5f5;
    border: 2px solid #9c27b0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    font-size: 1.1em;
    margin: 16px 0;
}

.limit-setup {
    background: #e8eaf6;
    border: 2px solid #3f51b5;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    font-size: 1.1em;
    margin: 16px 0;
}

/* Behavior Analysis Table */
.behavior-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.behavior-table th {
    background: #1565c0;
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: 600;
}

.behavior-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
}

.behavior-table tr:nth-child(even) {
    background: #f5f5f5;
}

/* Graph Container Enhancements */
.graph-container {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Enhanced Alerts */
.alert {
    border-radius: 8px;
    padding: 12px 16px;
    border: none;
    font-weight: 600;
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c8 100%);
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #f57c00;
    border-left: 4px solid #ff9800;
}

/* Interactive Elements */
.mcq-option {
    transition: all 0.3s ease;
    border-radius: 8px;
    cursor: pointer;
}

.mcq-option:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mcq-option.selected {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #1565c0;
    color: #0d47a1;
    font-weight: 600;
}

/* Mathematics Input Enhancement */
.math-input {
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.math-input:focus {
    border-color: #1565c0;
    box-shadow: 0 0 8px rgba(21, 101, 192, 0.3);
    outline: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fillblanks-container {
        padding: 12px;
        font-size: 0.9em;
    }

    .blank-input {
        min-width: 60px;
        font-size: 0.9em;
    }

    .concept-card {
        padding: 12px;
    }

    .remember-enhanced {
        padding: 16px;
    }
}

/* Animation Enhancements */
@keyframes highlight {
    0% { background-color: transparent; }
    50% { background-color: #fff3e0; }
    100% { background-color: transparent; }
}

.highlight-animation {
    animation: highlight 1s ease-in-out;
}

/* Loading State for Graphs */
.graph-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #1565c0;
    font-weight: 600;
}

.graph-loading::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #1565c0;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-tip-modern:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

.btn-tip-modern i {
    margin-right: 6px;
    color: #fbbf24;
}

.question-card-body {
    padding: 32px;
}

.question {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #1a1a2e;
    margin-bottom: 28px;
    font-weight: 500;
}

.answer-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid #e8eaf6;
}

.answer_wrapper.prob {
    flex: 1;
}

/* Math Preview */
.math-preview {
    margin-top: 16px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f3e5f5 0%, #e8eaf6 100%);
    border-radius: 12px;
    border: 1px solid #ce93d8;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    transition: opacity 0.2s ease;
}

.math-preview-label {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #7b1fa2;
    white-space: nowrap;
}

.math-preview-content {
    font-size: 1.5rem;
    color: #1a1a2e;
    flex: 1;
}

.math-preview-content .katex {
    font-size: 1.5em;
}

/* Input field */
.math-input {
    font-family: 'Courier New', 'Fira Code', monospace;
    font-size: 1.65rem;
    border: 2px solid #c5cae9;
    border-radius: 12px;
    padding: 12px 18px;
    background: #f8f9ff;
    color: #1a237e;
    min-width: 200px;
    transition: all 0.2s ease;
}

.math-input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 4px rgba(25,118,210,0.12);
    background: #fff;
}

.math-input::placeholder {
    color: #9fa8da;
    font-style: italic;
    font-size: 1.45rem;
}

.answer-tip {
    margin-top: 20px;
    padding: 10px 16px;
    background: #f0f4ff;
    border-left: 3px solid #5c6bc0;
    border-radius: 0 8px 8px 0;
    color: #3949ab;
    font-size: 0.92rem;
    line-height: 1.5;
}
.answer-tip strong {
    color: #283593;
}
.answer-tip em {
    background: #e8eaf6;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-style: normal;
    color: #1a237e;
}

/* Submit button */
.btn-submit-modern {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(46,125,50,0.3);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.btn-submit-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46,125,50,0.4);
}

.btn-submit-modern:active {
    transform: translateY(0);
}

.btn-submit-modern i {
    margin-right: 8px;
}

/* Next Question button */
.btn-next-modern {
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(13,71,161,0.3);
}

.btn-next-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13,71,161,0.4);
}

.btn-next-modern i {
    margin-left: 8px;
}

/* Result card (incorrect) */
.result-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.result-incorrect {
    border-top: 4px solid #e53935;
}

.result-icon {
    font-size: 3rem;
    color: #e53935;
    margin-bottom: 12px;
}

.result-card .help-header {
    color: #c62828;
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0 0 8px 0;
}

.result-card .correct-answer-help {
    color: #666;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.result-card .answer_wrapper.correct {
    background: #e8f5e9;
    border: 2px solid #43a047;
    border-radius: 10px;
    padding: 14px 20px;
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 20px;
}

/* Explanation section */
.explanation-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Review card */
.review-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.review-card-header {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    color: #fff;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1.5rem;
}

.review-card-header i {
    margin-right: 8px;
}

.review-card-body {
    padding: 20px 24px;
}

.review-row {
    margin-bottom: 16px;
}

.review-row:last-child {
    margin-bottom: 0;
}

.review-row label {
    display: block;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #78909c;
    margin-bottom: 6px;
    font-weight: 700;
}

.review-row .answer_wrapper.wrong {
    background: #fce4ec;
    border: 2px solid #ef5350;
    border-radius: 10px;
    padding: 10px 16px;
    color: #c62828;
    font-weight: 600;
}

/* Solution card */
.solution-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.solution-card-header {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    color: #fff;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1.5rem;
}

.solution-card-header i {
    margin-right: 8px;
}

.solution-card .panel-body.solve {
    padding: 24px;
    font-size: 1.45rem;
    line-height: 1.9;
    color: #333;
}

.solution-card .panel-body.solve strong {
    color: #1b5e20;
}

/* Tip card */
.tip-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border-left: 4px solid #fbbf24;
}

.tip-card-header {
    background: linear-gradient(135deg, #e65100 0%, #f57c00 100%);
    color: #fff;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tip-card-header i {
    margin-right: 8px;
}

.btn-tts-modern {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 1.28rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-tts-modern:hover {
    background: rgba(255,255,255,0.35);
}

.tip-card-body {
    padding: 24px;
    font-size: 1.45rem;
    line-height: 1.85;
    color: #444;
}

.tip-card-body strong {
    color: #e65100;
}

/* MCQ Options */
.mcq-options {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mcq-option {
    padding: 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mcq-option:before {
    content: attr(data-value);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8eaf6;
    color: #3949ab;
    font-weight: 700;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.2s;
}

.mcq-option:hover {
    border-color: #42a5f5;
    background: #f0f7ff;
    transform: translateX(4px);
}

.mcq-option:hover:before {
    background: #bbdefb;
}

.mcq-option.selected {
    border-color: #1565c0;
    background: linear-gradient(135deg, #e3f2fd 0%, #e8eaf6 100%);
    box-shadow: 0 2px 12px rgba(21,101,192,0.15);
}

.mcq-option.selected:before {
    background: #1565c0;
    color: #fff;
}

/* Fraction display */
.frac {
    display: inline-block;
    vertical-align: middle;
    text-align: center;
}

.frac .num {
    display: block;
    border-bottom: 2px solid #1a237e;
    padding-bottom: 3px;
    margin-bottom: 3px;
}

.frac .den {
    display: block;
    padding-top: 3px;
}

/* Graph container */
.graph-container {
    border: 2px solid #c5cae9;
    border-radius: 12px;
    background: #fff;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Step-by-step styling */
.step-by-step {
    background: linear-gradient(135deg, #e8eaf6 0%, #e3f2fd 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
}

.step {
    margin: 10px 0;
    padding: 12px 16px;
    border-left: 4px solid #1565c0;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #1565c0;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.45rem;
    margin-right: 10px;
}

/* Success flash */
.success-flash {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { box-shadow: inset 0 0 0 0 rgba(46,125,50,0); }
    50% { box-shadow: inset 0 0 0 4px rgba(46,125,50,0.3); }
    100% { box-shadow: inset 0 0 0 0 rgba(46,125,50,0); }
}

/* Container */
#container-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Responsive */
@media (max-width: 767px) {
    .question-card-body {
        padding: 20px;
    }
    .question {
        font-size: 1.8rem;
    }
    .answer-section {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-submit-modern {
        width: 100%;
        text-align: center;
    }
    .mcq-option {
        font-size: 1.5rem;
        padding: 12px 16px;
    }
    #container-main {
        padding: 0 8px;
    }
}

.page-help {
    clear: both;
}

.var-a { color: #1565c0; font-weight: bold; }
.var-b { color: #e53935; font-weight: bold; }
.var-c { color: #2e7d32; font-weight: bold; }
.var-d { color: #6a1b9a; font-weight: bold; }
.var-e { color: #e65100; font-weight: bold; }
.var-f { color: #00838f; font-weight: bold; }

/* ──────────────────────────────────────────────────
   Animation Framework
   ────────────────────────────────────────────────── */

/* Step reveal: fade up into view */
@keyframes stepReveal {
    0%   { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Highlight pulse: brief glow on key results */
@keyframes highlightPulse {
    0%   { background: transparent; }
    30%  { background: rgba(255,235,59,0.35); }
    100% { background: transparent; }
}

/* Underline draw: a line draws left to right */
@keyframes underlineDraw {
    0%   { width: 0; }
    100% { width: 100%; }
}

/* Scale pop: element pops in */
@keyframes scalePop {
    0%   { opacity: 0; transform: scale(0.7); }
    60%  { transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

/* Fade in */
@keyframes fadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

/* Slide in from left */
@keyframes slideInLeft {
    0%   { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Arrow indicator (pointing to the next step) */
@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(6px); }
}

/* ── Animated step blocks ── */
.anim-step {
    opacity: 0;
    animation: stepReveal 0.45s ease forwards;
    padding: 10px 14px;
    margin: 6px 0;
    border-left: 3px solid #1565c0;
    border-radius: 6px;
    background: rgba(227,242,253,0.4);
}

/* Stagger delays assigned by JS via style attribute, but provide defaults for up to 8 steps */
.anim-step:nth-child(1) { animation-delay: 0.1s; }
.anim-step:nth-child(2) { animation-delay: 0.35s; }
.anim-step:nth-child(3) { animation-delay: 0.6s; }
.anim-step:nth-child(4) { animation-delay: 0.85s; }
.anim-step:nth-child(5) { animation-delay: 1.1s; }
.anim-step:nth-child(6) { animation-delay: 1.35s; }
.anim-step:nth-child(7) { animation-delay: 1.6s; }
.anim-step:nth-child(8) { animation-delay: 1.85s; }

/* ── Highlight: key answer or result ── */
.anim-highlight {
    animation: highlightPulse 1.2s ease 0.3s;
    border-radius: 4px;
    padding: 2px 6px;
    display: inline-block;
}

/* ── Pop-in for final answer ── */
.anim-answer {
    opacity: 0;
    animation: scalePop 0.5s ease forwards;
    animation-delay: 0.5s;
    display: inline-block;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 8px 16px;
    border-radius: 10px;
    border: 2px solid #43a047;
    font-weight: 700;
    margin-top: 8px;
}

/* ── Fade-in sections (remember panels etc) ── */
.anim-fade {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* ── Slide-in from left (for sub-items, bullet points) ── */
.anim-slide {
    opacity: 0;
    animation: slideInLeft 0.4s ease forwards;
}

/* ── Arrow connector between steps ── */
.anim-arrow {
    display: block;
    text-align: center;
    color: #42a5f5;
    font-size: 1.2rem;
    margin: 2px 0;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards, arrowBounce 1s ease infinite;
}

/* ── Tip section rule/formula highlight box ── */
.anim-rule {
    background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%);
    border: 2px solid #ffb74d;
    border-radius: 10px;
    padding: 12px 18px;
    margin: 10px 0;
    opacity: 0;
    animation: stepReveal 0.5s ease forwards;
}

/* ── Tip section example box ── */
.anim-example {
    background: linear-gradient(135deg, #e8eaf6 0%, #e3f2fd 100%);
    border: 1px solid #90caf9;
    border-radius: 10px;
    padding: 12px 18px;
    margin: 10px 0;
    opacity: 0;
    animation: stepReveal 0.5s ease 0.3s forwards;
}

/* ── Reduce motion for accessibility ── */
@media (prefers-reduced-motion: reduce) {
    .anim-step,
    .anim-highlight,
    .anim-answer,
    .anim-fade,
    .anim-slide,
    .anim-arrow,
    .anim-rule,
    .anim-example {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Calculator button in question header ── */
.question-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-calc-modern {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.btn-calc-modern:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

.btn-calc-modern i {
    margin-right: 6px;
    color: #90caf9;
}

/* ── Scientific Calculator ── */
#calculatorModal .calc-modal-header {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 20px !important;
}

#calculatorModal .sc-calc {
    padding: 12px !important;
    background: #1a1a2e !important;
}

#calculatorModal .calc-display-wrap {
    background: #0f0f23 !important;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
    border: 1px solid #2a2a4a;
}

#calculatorModal .calc-status-bar {
    display: flex !important;
    gap: 8px;
    margin-bottom: 6px;
}

#calculatorModal .calc-status-btn {
    background: #2a2a4a !important;
    color: #90caf9 !important;
    border: none !important;
    padding: 3px 10px !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: auto !important;
    float: none !important;
}

#calculatorModal .calc-status-btn:hover {
    background: #3a3a5a !important;
}

#calculatorModal .calc-display {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #e0e0ff !important;
    font-family: 'Courier New', monospace !important;
    font-size: 1.7rem !important;
    text-align: right !important;
    outline: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    height: auto !important;
}

#calculatorModal .calc-history-panel {
    background: #0f0f23 !important;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #2a2a4a;
}

#calculatorModal .calc-history-item {
    display: flex !important;
    justify-content: space-between;
    padding: 4px 6px;
    font-size: 1.2rem;
    color: #8888aa;
    border-bottom: 1px solid #1a1a3a;
}

#calculatorModal .calc-history-item:last-child {
    border-bottom: none;
}

#calculatorModal .calc-history-expr {
    color: #8888aa;
}

#calculatorModal .calc-history-result {
    color: #90caf9;
    font-weight: 600;
}

#calculatorModal .calc-memory-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 8px;
}

#calculatorModal .calc-btn {
    padding: 12px 8px !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    line-height: 1 !important;
    width: auto !important;
    float: none !important;
    display: inline-block !important;
    text-align: center !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    box-shadow: none !important;
    margin: 0 !important;
    min-width: 0 !important;
}

#calculatorModal .calc-btn:active {
    transform: scale(0.94);
}

#calculatorModal .calc-btn.calc-btn-mem {
    font-size: 1.2rem !important;
    padding: 6px 4px !important;
    background: #1e1e3a !important;
    color: #7c7caa !important;
    border: 1px solid #2a2a4a !important;
}

#calculatorModal .calc-btn.calc-btn-mem:hover {
    background: #2a2a4a !important;
    color: #90caf9 !important;
}

#calculatorModal .calc-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
}

#calculatorModal .calc-btn-num {
    background: #2a2a4a !important;
    color: #e0e0ff !important;
    font-size: 1.5rem !important;
}

#calculatorModal .calc-btn-num:hover {
    background: #3a3a5a !important;
}

#calculatorModal .calc-btn-op {
    background: #1a3a6a !important;
    color: #64b5f6 !important;
    font-size: 1.5rem !important;
}

#calculatorModal .calc-btn-op:hover {
    background: #1e4a7a !important;
}

#calculatorModal .calc-btn-func {
    background: #1e1e3a !important;
    color: #9e9ebe !important;
    font-size: 1.3rem !important;
}

#calculatorModal .calc-btn-func:hover {
    background: #2a2a4a !important;
    color: #c0c0e0 !important;
}

#calculatorModal .calc-btn-eq {
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%) !important;
    color: #fff !important;
    font-size: 1.4rem !important;
}

#calculatorModal .calc-btn-eq:hover {
    background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%) !important;
}

#calculatorModal .calc-btn-clear {
    background: #4a1a2a !important;
    color: #ef9a9a !important;
    font-size: 1.5rem !important;
}

#calculatorModal .calc-btn-clear:hover {
    background: #5a2a3a !important;
}

#calculatorModal .calc-btn-del {
    background: #3a2a1a !important;
    color: #ffcc80 !important;
    font-size: 1.5rem !important;
}

#calculatorModal .calc-btn-del:hover {
    background: #4a3a2a !important;
}

#calculatorModal .calc-btn-flash {
    animation: calcFlash 0.3s ease;
}

@keyframes calcFlash {
    0% { box-shadow: 0 0 0 0 rgba(144,202,249,0.6); }
    50% { box-shadow: 0 0 12px 4px rgba(144,202,249,0.4); }
    100% { box-shadow: 0 0 0 0 rgba(144,202,249,0); }
}

/* Graph MCQ Styles */
.graph-mcq-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
    padding: 10px;
}

.graph-mcq-option {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    text-align: center;
    position: relative;
    min-height: 200px;
}

.graph-mcq-option:hover {
    border-color: #1976d2;
    background: #f3f8ff;
    box-shadow: 0 4px 12px rgba(25,118,210,0.15);
}

.graph-mcq-option.selected {
    border-color: #0d47a1;
    background: #e3f2fd;
    box-shadow: 0 0 0 2px rgba(13,71,161,0.2);
}

.graph-mcq-label {
    font-weight: bold;
    font-size: 18px;
    color: #1976d2;
    margin-bottom: 12px;
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: #e3f2fd;
    border: 2px solid #1976d2;
}

.graph-mcq-option.selected .graph-mcq-label {
    background: #1976d2;
    color: white;
}

.graph-mcq-graph {
    margin: 0 auto;
    border-radius: 8px;
    background: white;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .graph-mcq-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .graph-mcq-option {
        min-height: 180px;
        padding: 12px;
    }
}

/* Graph Click Styles */
.graph-click-container {
    text-align: center;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    margin: 20px 0;
}

.graph-click-instructions {
    font-size: 16px;
    font-weight: bold;
    color: #1976d2;
    margin-bottom: 16px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #bbdefb;
}

.graph-click-graph {
    margin: 0 auto 16px auto;
    border-radius: 8px;
    background: white;
    border: 2px solid #1976d2;
    overflow: hidden;
    cursor: crosshair;
}

.graph-click-status {
    font-size: 14px;
    color: #555;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-top: 10px;
}

.graph-point-selected .graph-click-status {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #2e7d32;
    font-weight: bold;
}

.graph-click-container.correct {
    border-color: #4caf50;
    background: #e8f5e8;
}

.graph-click-container.incorrect {
    border-color: #f44336;
    background: #ffebee;
}

/* Graph Hover Tooltip */
.graph-hover-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
    z-index: 1000;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #ff9800;
    display: none;
}