@font-face {
  font-family: 'KaTeX_Main_Minus';
  src: url('https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/fonts/KaTeX_Main-Regular.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/fonts/KaTeX_Main-Regular.woff') format('woff'),
       url('https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/fonts/KaTeX_Main-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  unicode-range: U+2212;
}

@font-face {
  font-family: 'KaTeX_Math_X';
  src: url('https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/fonts/KaTeX_Math-Italic.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/fonts/KaTeX_Math-Italic.woff') format('woff'),
       url('https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/fonts/KaTeX_Math-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  unicode-range: U+0078, U+0058;
}

:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --success-color: #10B981;
    --error-color: #EF4444;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-card: rgba(255, 255, 255, 0.6);
}

.exercise-wrapper {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border-radius: 16px;
    padding: 15px 20px;
    overflow: hidden;
}

.background-mesh {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.25) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: -1;
}
.background-mesh::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.2) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

.app-container {
    width: 100%;
    max-width: 680px;
    padding: 0px 10px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-header {
    text-align: center;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exercise-section {
    background: white;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    border: 1px solid #E5E7EB;
    overflow-x: auto;
    overflow-y: hidden;
}

.figure-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px 0;
}

.figure-container svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.choice-btn {
    background: white;
    border: 2px solid #CBD5E1;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1E293B;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.choice-btn:hover {
    border-color: #818CF8;
    background: #F5F3FF;
    transform: translateY(-1px);
}

.choice-btn.selected {
    border-color: #4F46E5;
    background: #EEF2FF;
    color: #4338CA;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.choice-btn.eval-selected {
    border-color: #DC2626;
    background: #FEF2F2;
    color: #991B1B;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.choice-btn.correct-choice {
    border-color: #10B981;
    background: #ECFDF5;
    color: #065F46;
}

.choice-btn.wrong-choice {
    border-color: #EF4444;
    background: #FEF2F2;
    color: #991B1B;
}

/* Primary Button */
.primary-btn {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 12px -2px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}

.feedback {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.solution-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-left: 4px solid #4F46E5;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    margin-top: 10px;
}

.solution-box strong {
    color: #1E293B;
}

/* Evaluation red theme button */
.eval-btn-red {
    background-color: #dc2626 !important;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2) !important;
}

.eval-btn-red:hover {
    background-color: #b91c1c !important;
    box-shadow: 0 6px 12px -2px rgba(220, 38, 38, 0.3) !important;
}
