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

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

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #7c3aed 100%);
    min-height: 100vh;
    animation: gradientFlow 12s ease infinite;
    background-size: 600% 600%;
    -webkit-tap-highlight-color: transparent;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hindi-font {
    font-family: 'Hind', sans-serif;
    font-weight: 500;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card:hover, .glass-card:active {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.flashcard {
    perspective: 1200px;
    height: 300px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

@media (max-width: 640px) {
    .flashcard {
        height: 220px;
    }
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flashcard-front {
    background: linear-gradient(45deg, #ec4899, #f9a8d4);
    color: white;
}

.flashcard-back {
    background: linear-gradient(45deg, #06b6d4, #67e8f9);
    transform: rotateY(180deg);
    color: white;
}

.quiz-option {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
    font-weight: 500;
}

.quiz-option:hover, .quiz-option:active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.quiz-option.correct {
    border-color: #34d399;
    background: rgba(52, 211, 153, 0.25);
}

.quiz-option.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.25);
}

.progress-bar {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    height: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #06b6d4);
    border-radius: 12px;
    transition: width 0.5s ease-in-out;
}

.tab-button {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    font-weight: 500;
    color: white;
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.floating-action {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ec4899, #f9a8d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-action:hover, .floating-action:active {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 12px 28px rgba(236, 72, 153, 0.4);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

@media (max-width: 640px) {
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        padding: 20px;
    }
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-content input, .modal-content select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    transition: all 0.3s ease;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
}

.modal-content input:focus, .modal-content select:focus {
    border-color: #06b6d4;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

.footer {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
}

.score-badge {
    background: linear-gradient(45deg, #f59e0b, #fde047);
    color: #1e1b4b;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    animation: pulse 1.8s infinite;
    font-size: 15px;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

.loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #06b6d4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

button, select, input {
    transition: all 0.3s ease;
}

button:hover, button:active {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.category-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.progress-item-bar {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    height: 8px;
    margin-top: 6px;
}

.progress-item-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #06b6d4);
    border-radius: 12px;
    transition: width 0.5s ease-in-out;
}