:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252542;
    --bg-card: #2d2d52;
    --text-primary: #f8f8ff;
    --text-secondary: #c8c8e0;
    --accent-primary: #8b5cf6;
    --accent-secondary: #a78bfa;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(167, 139, 250, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Score Board */
.score-board {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    animation: slideDown 0.6s ease-out;
    flex-wrap: wrap;
    gap: 15px;
}

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

.score-item {
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
    flex: 1;
}

.score-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.score-icon {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--accent-primary);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.score-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.score-value {
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 10px currentColor;
    transition: var(--transition);
}

.score-value.correct {
    color: var(--success);
    animation: pulse 2s infinite;
}

.score-value.wrong {
    color: var(--error);
    animation: pulse 2s infinite;
}

.score-value.progress {
    color: var(--warning);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Quiz Container */
.quiz-container {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    flex: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    animation: fadeIn 0.8s ease-out;
}

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

.quiz-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.quiz-title {
    margin-bottom: 20px;
}

.quiz-title h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: brightness(1); }
    to { filter: brightness(1.2); }
}

.quiz-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.quiz-info span {
    font-size: 1.1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-info i {
    color: var(--accent-primary);
}

.quiz-header p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Progress Bar */
.progress-bar-container {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-primary);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Questions */
.questions-container {
    margin-bottom: 40px;
}

.question-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    transition: var(--transition);
    border: 1px solid rgba(139, 92, 246, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.question-card:hover::before {
    opacity: 1;
}

.question-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: rgba(139, 92, 246, 0.3);
}

.question-text {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.7;
}

.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.option {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 15px 18px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: var(--transition);
    opacity: 0;
}

.option:hover::before {
    opacity: 1;
    left: 100%;
}

.option-label {
    flex: 1;
    font-weight: 500;
}

.option-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    margin-left: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    transition: var(--transition);
}

.option:hover {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.option:hover .option-number {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.option input[type="radio"] {
    margin-left: 12px;
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
    opacity: 0;
    position: absolute;
}

.option {
    cursor: pointer;
}

.option.correct {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(34, 197, 94, 0.15) 100%);
    border-color: var(--success);
    animation: correctPulse 0.6s ease-out;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.option.correct .option-number {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    animation: numberGlow 1s ease-in-out infinite alternate;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes numberGlow {
    from { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    }
    to { 
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.8);
    }
}

.option.wrong {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(239, 68, 68, 0.15) 100%);
    border-color: var(--error);
    animation: shake 0.5s ease-out;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.option.wrong .option-number {
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Buttons */
.quiz-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.submit-btn, .reset-btn, .restart-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn::before, .reset-btn::before, .restart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.submit-btn:hover::before, .reset-btn:hover::before, .restart-btn:hover::before {
    left: 100%;
}

.submit-btn:hover, .reset-btn:hover, .restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.submit-btn:active, .reset-btn:active, .restart-btn:active {
    transform: translateY(-1px);
}

.reset-btn {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.reset-btn:hover {
    background: var(--accent-gradient);
    border-color: transparent;
}

/* Results */
.results-container {
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.results-header h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.performance-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-gradient);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 30px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.performance-badge i {
    font-size: 1.5rem;
}

.results-summary {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.results-summary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

.result-item span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-item span:first-child i {
    color: var(--accent-primary);
}

.result-item span:last-child {
    font-weight: 700;
    font-size: 1.5rem;
}

.result-item .correct {
    color: var(--success);
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.result-item .wrong {
    color: var(--error);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.rating-stars {
    display: flex;
    gap: 5px;
    font-size: 1.5rem;
}

.rating-stars i {
    color: var(--warning);
    transition: var(--transition);
}

.rating-stars i.inactive {
    color: var(--bg-primary);
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.share-btn {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(29, 161, 242, 0.3);
}

.share-btn:active {
    transform: translateY(-1px);
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Floating Particles */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 15s infinite linear;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-duration: 25s;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 70%;
    animation-duration: 20s;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 40%;
    animation-duration: 30s;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 50px;
    height: 50px;
    left: 85%;
    animation-duration: 18s;
    animation-delay: 0s;
}

.particle:nth-child(5) {
    width: 70px;
    height: 70px;
    left: 25%;
    animation-duration: 22s;
    animation-delay: 3s;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .score-board {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px;
        justify-content: space-between;
    }
    
    .score-item {
        min-width: auto;
        width: calc(33.333% - 7px);
        flex: 1;
        padding: 10px 5px;
    }
    
    .score-icon {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
    
    .score-label {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    
    .score-value {
        font-size: 1.5rem;
    }
    
    .quiz-container {
        padding: 20px;
    }
    
    .quiz-title h1 {
        font-size: 2rem;
    }
    
    .quiz-info {
        flex-direction: row;
        gap: 8px;
        margin-bottom: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .quiz-info span {
        font-size: 1rem;
    }
    
    .quiz-header p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .progress-bar-container {
        margin-bottom: 25px;
    }
    
    .progress-text {
        font-size: 0.9rem;
    }
    
    .question-text {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    .options-container {
        grid-template-columns: 1fr;
        gap: 12px;
        display: flex;
        flex-direction: column;
    }
    
    .option {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .option input[type="radio"] {
        width: 18px;
        height: 18px;
        margin-left: 10px;
    }
    
    .option-number {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .quiz-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 25px;
    }
    
    .submit-btn, .reset-btn, .restart-btn, .share-btn {
        width: 100%;
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .results-header h2 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    
    .performance-badge {
        font-size: 1rem;
        padding: 8px 16px;
        margin-bottom: 25px;
    }
    
    .results-summary {
        padding: 25px;
        margin-bottom: 25px;
    }
    
    .result-item {
        font-size: 1.1rem;
        margin-bottom: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .result-item span:last-child {
        font-size: 1.3rem;
        align-self: flex-end;
    }
    
    .rating-stars {
        font-size: 1.2rem;
    }
    
    .results-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .question-card {
        padding: 20px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .score-board {
        padding: 12px;
        gap: 8px;
    }
    
    .score-item {
        width: calc(33.333% - 5px);
        padding: 8px 3px;
    }
    
    .score-icon {
        font-size: 1rem;
        margin-bottom: 3px;
    }
    
    .score-label {
        font-size: 0.7rem;
        margin-bottom: 3px;
    }
    
    .score-value {
        font-size: 1.3rem;
    }
    
    .quiz-container {
        padding: 15px;
    }
    
    .quiz-title h1 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .quiz-info span {
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .quiz-header p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    .progress-bar-container {
        margin-bottom: 20px;
    }
    
    .progress-text {
        font-size: 0.85rem;
    }
    
    .question-text {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .options-container {
        gap: 10px;
        display: flex;
        flex-direction: column;
    }
    
    .option {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .option input[type="radio"] {
        width: 16px;
        height: 16px;
        margin-left: 8px;
    }
    
    .option-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .quiz-actions {
        margin-top: 20px;
    }
    
    .submit-btn, .reset-btn, .restart-btn, .share-btn {
        padding: 12px;
        font-size: 1rem;
    }
    
    .results-header h2 {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .performance-badge {
        font-size: 0.9rem;
        padding: 6px 12px;
        margin-bottom: 20px;
    }
    
    .results-summary {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .result-item {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .result-item span:last-child {
        font-size: 1.2rem;
    }
    
    .rating-stars {
        font-size: 1.1rem;
    }
    
    .question-card {
        padding: 15px;
        margin-bottom: 15px;
    }
}

@media (max-width: 360px) {
    .score-board {
        flex-direction: column;
        gap: 10px;
    }
    
    .score-item {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
    }
    
    .score-icon {
        font-size: 1.2rem;
        margin-bottom: 0;
        margin-left: 10px;
    }
    
    .score-label {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    .score-value {
        font-size: 1.5rem;
    }
}

/* MathJax styling */
.MathJax {
    font-size: 1.1em !important;
    margin: 0 2px;
}

.MathJax_Display {
    margin: 0.5em 0 !important;
}

.question-text .MathJax {
    font-family: 'Tajawal', 'Times New Roman', serif !important;
}

/* Enhanced math equation styling */
.question-text mjx-container {
    margin: 0 3px;
    font-size: 1.05em;
}

.question-text mjx-container[jax="CHTML"][display="true"] {
    margin: 0.8em 0;
    text-align: center;
}

/* Math equation highlighting */
.question-text mjx-container[jax="CHTML"] {
    background: rgba(139, 92, 246, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
}

.question-text mjx-container[jax="CHTML"]:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    transform: scale(1.02);
}

/* Scientific notation styling */
.question-text .MathJax_CHTML {
    color: var(--text-primary);
}

.question-text .MathJax_CHTML .mjx-mi {
    color: var(--accent-primary);
}

.question-text .MathJax_CHTML .mjx-mn {
    color: var(--text-secondary);
}

.question-text .MathJax_CHTML .mjx-mo {
    color: var(--accent-secondary);
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 30px;
    text-align: center;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.footer p {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer {
        padding: 15px;
        margin-top: 20px;
    }
    
    .footer p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 12px;
        margin-top: 15px;
    }
    
    .footer p {
        font-size: 1rem;
    }
}