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

:root {
    --brand: #4f46e5;
    --brand-light: #eef2ff;
    --surface: #ffffff;
    --bg: #fdfdfd;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    color: #1e293b;
    background-image: radial-gradient(#e2e8f0 0.5px, transparent 0.5px);
    background-size: 24px 24px;
}

.card-flip { perspective: 2000px; }
.card-inner {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    cursor: pointer;
    position: relative;
}
.card-inner.is-flipped { transform: rotateY(180deg); }
.card-front, .card-back {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 1.5rem;
    padding: 2rem;
    min-height: 220px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}
.card-front { background: #ffffff; }
.card-inner:hover .card-front {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.15);
    border-color: #e0e7ff;
}
.card-back {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    transform: rotateY(180deg);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}
.test-backdrop {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.mastered-badge { background: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.is-mastered-card .card-front { background: #f8fafc; border-color: #10b981; }
.progress-fill { transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1); }
.sidebar-glass { background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(10px); border-right: 1px solid #f1f5f9; }

.quiz-option {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.quiz-option:not(.disabled):hover {
    transform: scale(1.02);
    border-color: var(--brand);
    background-color: var(--brand-light);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.1);
}
.quiz-option.correct {
    background-color: #10b981 !important;
    border-color: #059669 !important;
    color: white !important;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.3);
}
.quiz-option.incorrect {
    background-color: #ef4444 !important;
    border-color: #dc2626 !important;
    color: white !important;
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.3);
}

.bar { transition: height 1s ease-out; }
