:root {
    --app-bg: #f3f4f6;
    --card-bg: #ffffff;
    --primary: #10b981; 
    --primary-hover: #059669;
    --primary-light: #d1fae5;
    --text-dark: #111827;
    --text-gray: #4b5563;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --correct-bg: #10b981;
    --wrong-bg: #ef4444;
    --wrong-light: #fee2e2;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body { background-color: var(--app-bg); color: var(--text-dark); line-height: 1.6; -webkit-font-smoothing: antialiased; }

.app-container { max-width: 98%; width: 100%; margin: 0 auto; padding: 1rem 1%; }

#practice-view, #revision-view, #favorites-view, #dashboard-view { max-width: 800px; margin: 0 auto; }
#all-questions-view { width: 100%; }

.app-header { margin-bottom: 1.5rem; text-align: center; } 
.app-header h1 { font-size: 2rem; font-weight: 700; color: var(--text-dark); letter-spacing: -0.025em; }
.app-header h1 span { color: var(--primary); }

.premium-card {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 1.5rem 2rem; 
    box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.5); margin-bottom: 1.5rem; 
}

.question-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.topic-badge { background-color: var(--primary-light); color: var(--primary-hover); padding: 0.3rem 0.8rem; border-radius: 99px; font-size: 0.85rem; font-weight: 600; }
.question-counter { color: var(--text-light); font-weight: 500; font-size: 0.9rem; }
.question-text { font-size: 1.4rem; font-weight: 600; color: var(--text-dark); margin-bottom: 1.5rem; line-height: 1.4; }
.question-image { width: 100%; max-height: 350px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 1.5rem; border: 1px solid var(--border-color); }

.options-grid { display: flex; flex-direction: column; gap: 0.75rem; } 
.option-btn {
    background-color: var(--card-bg); border: 2px solid var(--border-color); padding: 1rem 1.25rem; border-radius: var(--radius-md); font-size: 1.05rem; 
    font-weight: 500; color: var(--text-gray); cursor: pointer; text-align: left; transition: all 0.2s ease; display: flex; align-items: center;
}
.option-btn:hover:not(:disabled) { border-color: var(--primary); background-color: var(--primary-light); color: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.option-btn:disabled { cursor: default; opacity: 0.7; }
.option-btn.correct { background-color: var(--primary); border-color: var(--primary); color: white; }
.option-btn.wrong { background-color: var(--wrong-bg); border-color: var(--wrong-bg); color: white; }

.explanation-box { margin-top: 1.25rem; padding: 1rem 1.25rem; background-color: #f8fafc; border-left: 4px solid var(--primary); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.explanation-box h3 { font-size: 0.95rem; color: var(--text-dark); margin-bottom: 0.25rem; }
.explanation-box p { color: var(--text-gray); font-size: 0.95rem; }

.action-btn { width: 100%; padding: 1rem; border-radius: var(--radius-md); font-size: 1.1rem; font-weight: 600; cursor: pointer; border: none; margin-top: 1.5rem; transition: all 0.2s ease; }
.primary-btn { background-color: var(--primary); color: white; box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2); }
.primary-btn:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3); }

.spinner { width: 40px; height: 40px; border: 4px solid var(--border-color); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { text-align: center; color: var(--text-light); padding: 1.5rem 0; }

.wrong-list-grid { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.wrong-item { background: var(--wrong-light); border: 1px solid #fca5a5; padding: 1.5rem; border-radius: var(--radius-sm); }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.dash-card { background: var(--card-bg); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.dash-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.practice-card:hover { border-color: var(--primary); }
.wrong-card:hover { border-color: var(--wrong-bg); }
.favorite-card:hover { border-color: #ec4899; }
.all-qns-card:hover { border-color: #3b82f6; }

.icon-circle { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; color: white; }
.primary-bg { background-color: var(--primary); }
.error-bg { background-color: var(--wrong-bg); }
.dash-card h2 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--text-dark); }
.dash-card p { color: var(--text-gray); font-size: 1rem; }

.filter-section { padding: 1rem 1.5rem; }
.filter-controls { display: flex; align-items: center; gap: 0.5rem; }
.scroll-arrow { background: transparent; border: none; color: var(--text-gray); cursor: pointer; padding: 5px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.2s ease; flex-shrink: 0; }
.scroll-arrow:hover { color: var(--primary); background: var(--primary-light); }
.filters-scroll { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0; scroll-behavior: smooth; width: 100%; -ms-overflow-style: none; scrollbar-width: none; }
.filters-scroll::-webkit-scrollbar { display: none; }
.filter-btn { background: #f3f4f6; border: 1px solid transparent; padding: 0.5rem 1.2rem; border-radius: 99px; font-size: 0.95rem; font-weight: 500; color: var(--text-gray); cursor: pointer; white-space: nowrap; transition: all 0.2s ease; }
.filter-btn:hover { background: #e5e7eb; }
.filter-btn.active { background: var(--primary-light); color: var(--primary-hover); border-color: var(--primary); }

.revision-card { background: var(--card-bg); border: 1px solid var(--border-color); padding: 1.5rem; border-radius: var(--radius-md); }
.revision-card h4 { margin-bottom: 1rem; color: var(--text-dark); }

#all-qns-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
@media (max-width: 1000px) { #all-qns-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { #all-qns-list { grid-template-columns: minmax(0, 1fr); } }