@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    background-attachment: fixed;
    color: #e2e8f0;
    margin: 0;
    min-height: 100vh;
}

.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.badge-not-visited {
    background-color: #94a3b8;
    color: #0f172a;
}
.badge-not-answered {
    background-color: #ef4444;
    color: #fff;
}
.badge-answered {
    background-color: #22c55e;
    color: #fff;
}
.badge-marked {
    background-color: #a855f7;
    color: #fff;
}
.badge-marked-answered {
    background-color: #a855f7;
    color: #fff;
    position: relative;
}
.badge-marked-answered::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    border: 1px solid #fff;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.4);
}

/* Transitions */
.btn-transition {
    transition: all 0.2s ease-in-out;
}
.btn-transition:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-transition:active {
    transform: translateY(0);
}

/* KaTeX Math Formatting & Line-break Fixes */
.katex-display {
    display: block !important;
    margin: 0.75em 0 !important;
    text-align: center;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap !important;
}
.katex {
    font-size: 1.05em;
    line-height: 1.2;
    white-space: nowrap !important;
    text-indent: 0;
}
.katex .katex-html {
    white-space: nowrap !important;
}
.katex .base,
.katex .msupsub,
.katex .mord,
.katex .vlist-t,
.katex .vlist-r,
.katex .vlist {
    white-space: nowrap !important;
}
#question-container p {
    display: inline;
}

/* Option Container Inline Math & Scientific Notation Fixes */
#q-options .katex-display {
    display: inline-block !important;
    margin: 0 !important;
    text-align: left !important;
}
#q-options .katex {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}
#q-options .katex .base {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}
#q-options p {
    display: inline-block !important;
    margin: 0 !important;
}

/* Question Detailed Analysis Styles */
.analysis-item {
    transition: all 0.2s ease-in-out;
}
.analysis-item:hover {
    transform: translateY(-2px);
}
.analysis-item-correct {
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(20, 83, 45, 0.25) 100%);
    box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.08);
}
.analysis-item-incorrect {
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(127, 29, 29, 0.25) 100%);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.08);
}
.analysis-item-unattempted {
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: rgba(30, 41, 59, 0.7);
}

.analysis-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.analysis-badge-correct {
    background-color: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}
.analysis-badge-incorrect {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.analysis-badge-unattempted {
    background-color: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.4);
}
