/**
 * ePrepare Personal MCQ Bank - Styles
 * Clean, modern, responsive design with Inter font
 */

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

/* Root variables - Professional Design System */
:root {
    --ep-primary: #6366f1;
    --ep-primary-hover: #4f46e5;
    --ep-primary-light: #818cf8;
    --ep-secondary: #64748b;
    --ep-success: #22c55e;
    --ep-error: #ef4444;
    --ep-warning: #f59e0b;
    --ep-info: #3b82f6;
    --ep-bg: #0f172a;
    --ep-bg-card: #1e293b;
    --ep-bg-secondary: #334155;
    --ep-border: #334155;
    --ep-text: #f1f5f9;
    --ep-text-secondary: #94a3b8;
    --ep-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --ep-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --ep-radius: 12px;
}

/* Base styles - Themeable */
.ep-mcq-dashboard {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--ep-text);
    background: var(--ep-bg);
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

.ep-mcq-dashboard-inner {
    padding: 1rem;
    padding-bottom: 100px;
    max-width: 100%;
    overflow-x: hidden;
}

.ep-mcq-dashboard * {
    box-sizing: border-box;
}

/* Light theme overrides */
.ep-theme-light {
    --ep-primary: #3b82f6;
    --ep-primary-hover: #2563eb;
    --ep-primary-light: #60a5fa;
    --ep-secondary: #6b7280;
    --ep-success: #16a34a;
    --ep-error: #ef4444;
    --ep-warning: #f59e0b;
    --ep-info: #3b82f6;
    --ep-bg: #ffffff;
    --ep-bg-card: #ffffff;
    --ep-bg-secondary: #f3f4f6;
    --ep-border: #e5e7eb;
    --ep-text: #111827;
    --ep-text-secondary: #6b7280;
}

.ep-hidden {
    display: none !important;
}

.ep-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--ep-text);
}

/* Stats section - Compact Design */
.ep-mcq-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0;
}

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

.ep-stat-card {
    background: var(--ep-bg-card);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    padding: 0.875rem 0.75rem;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ep-stat-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ep-primary), var(--ep-primary-light));
    opacity: 0;
    transition: opacity 0.2s;
}

.ep-stat-card:hover::before {
    opacity: 1;
}

.ep-stat-card:hover {
    border-color: var(--ep-primary);
    background: var(--ep-bg-secondary);
}

.ep-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ep-primary-light);
    margin-bottom: 0.125rem;
    line-height: 1;
}

.ep-stat-label {
    font-size: 0.688rem;
    color: var(--ep-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabs - Sleek Design */
.ep-mcq-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    background: var(--ep-bg-card);
    padding: 0.375rem;
    border-radius: var(--ep-radius);
    border: 1px solid var(--ep-border);
}

.ep-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.625rem 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--ep-text-secondary);
    cursor: pointer;
    border-radius: calc(var(--ep-radius) - 2px);
    transition: all 0.2s;
    white-space: nowrap;
}

.ep-tab-btn:hover {
    color: var(--ep-text);
    background: var(--ep-bg-secondary);
}

.ep-tab-btn.active {
    color: white;
    background: var(--ep-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.ep-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.ep-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Filters - Compact & Professional */
.ep-mcq-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--ep-bg-card);
    border-radius: var(--ep-radius);
    border: 1px solid var(--ep-border);
}

.ep-practice-filters {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--ep-bg-card);
    border-radius: var(--ep-radius);
    border: 1px solid var(--ep-border);
}

.ep-input,
.ep-textarea,
.ep-select {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--ep-border);
    border-radius: calc(var(--ep-radius) - 2px);
    background: var(--ep-bg);
    color: var(--ep-text);
    transition: all 0.2s;
}

.ep-input:focus,
.ep-textarea:focus,
.ep-select:focus {
    outline: none;
    border-color: var(--ep-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: var(--ep-bg-secondary);
}

.ep-input {
    flex: 1;
    min-width: 200px;
}

.ep-select {
    min-width: 150px;
}

.ep-textarea {
    width: 100%;
    resize: vertical;
    min-height: 80px;
}

/* Buttons - Modern & Sleek */
.ep-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.813rem;
    font-weight: 600;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: calc(var(--ep-radius) - 2px);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.ep-btn:active {
    transform: scale(0.97);
}

.ep-btn-primary {
    background: var(--ep-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.ep-btn-primary:hover {
    background: var(--ep-primary-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.ep-btn-secondary {
    background: var(--ep-bg-secondary);
    color: var(--ep-text);
    border: 1px solid var(--ep-border);
}

.ep-btn-secondary:hover {
    background: var(--ep-border);
}

.ep-btn-danger {
    background: var(--ep-error);
    color: white;
}

.ep-btn-danger:hover {
    background: #dc2626;
}

.ep-btn-success {
    background: var(--ep-success);
    color: white;
}

.ep-btn-success:hover {
    background: #16a34a;
}

.ep-btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

/* MCQ List - Compact & Professional */
.ep-mcq-list {
    display: grid;
    gap: 0.75rem;
}

.ep-mcq-item {
    background: var(--ep-bg-card);
    border: 1px solid var(--ep-border);
    border-left: 3px solid var(--ep-primary);
    border-radius: var(--ep-radius);
    padding: 1rem;
    transition: all 0.2s;
    position: relative;
}

.ep-mcq-item:hover {
    border-color: var(--ep-primary);
    background: var(--ep-bg-secondary);
}

.ep-mcq-item.ep-status-mastered {
    border-left-color: var(--ep-success);
}

.ep-mcq-item.ep-status-correct {
    border-left-color: var(--ep-info);
}

.ep-mcq-item.ep-status-incorrect {
    border-left-color: var(--ep-error);
}

.ep-mcq-item.ep-status-unattempted {
    border-left-color: var(--ep-warning);
}

.ep-mcq-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
}

.ep-mcq-title {
    font-size: 0.938rem;
    font-weight: 600;
    color: var(--ep-text);
    margin: 0;
    flex: 1;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.ep-mcq-difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.ep-diff-easy {
    background: #d1fae5;
    color: #065f46;
}

.ep-diff-medium {
    background: #fef3c7;
    color: #92400e;
}

.ep-diff-hard {
    background: #fee2e2;
    color: #991b1b;
}

.ep-mcq-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--ep-text-secondary);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.ep-mcq-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--ep-bg-secondary);
    font-weight: 600;
    font-size: 0.688rem;
    text-transform: uppercase;
}

.ep-mcq-actions {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    word-break: break-word;
}

.ep-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--ep-text-secondary);
    font-size: 1.125rem;
}

/* Pagination */
.ep-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.ep-page-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--ep-border);
    background: var(--ep-bg);
    color: var(--ep-text);
    border-radius: var(--ep-radius);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s, border-color 0.2s;
}

.ep-page-btn:hover {
    background: var(--ep-bg-secondary);
}

.ep-page-btn.active {
    background: var(--ep-primary);
    color: white;
    border-color: var(--ep-primary);
}

.ep-page-dots {
    padding: 0 0.5rem;
    color: var(--ep-text-secondary);
}

/* Form - Dark Theme */
.ep-mcq-form {
    background: var(--ep-bg-card);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    padding: 1.5rem;
}

/* Rich Text Editor - Dark Theme */
.ep-rich-editor {
    background: var(--ep-bg);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    min-height: 180px;
    margin-bottom: 0.5rem;
}

.ep-rich-editor .ql-container {
    font-family: 'Inter', sans-serif;
    font-size: 0.938rem;
    min-height: 120px;
    border: none;
}

.ep-rich-editor .ql-editor {
    min-height: 120px;
    padding: 0.875rem;
    color: var(--ep-text);
}

.ep-rich-editor .ql-editor.ql-blank::before {
    color: var(--ep-text-secondary);
}

.ep-rich-editor .ql-toolbar {
    border: none;
    border-bottom: 1px solid var(--ep-border);
    background: var(--ep-bg-secondary);
    border-top-left-radius: var(--ep-radius);
    border-top-right-radius: var(--ep-radius);
    padding: 0.5rem;
}

.ep-rich-editor .ql-container {
    border-bottom-left-radius: var(--ep-radius);
    border-bottom-right-radius: var(--ep-radius);
}

.ep-rich-editor .ql-stroke {
    stroke: var(--ep-text-secondary);
}

.ep-rich-editor .ql-fill {
    fill: var(--ep-text-secondary);
}

.ep-rich-editor .ql-picker-label {
    color: var(--ep-text-secondary);
}

.ep-form-group {
    margin-bottom: 1rem;
}

.ep-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--ep-text);
}

.ep-form-group .ep-input,
.ep-form-group .ep-textarea,
.ep-form-group .ep-select {
    width: 100%;
}

.ep-option-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
    width: 100%;
}

.ep-option-row .ep-input {
    flex: 1;
    min-width: 0;
}

.ep-remove-option {
    padding: 0.5rem;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.ep-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

#ep-cancel-edit {
    display: none;
}

.ep-topic-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ep-topic-input-inner {
    position: relative;
    flex: 1;
}

.ep-topic-input-wrapper .ep-topic-input {
    flex: 1;
    padding-right: 2.5rem;
}

.ep-show-topics-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--ep-primary);
    color: white;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    z-index: 5;
}

.ep-show-topics-btn:hover {
    background: var(--ep-primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.ep-topic-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--ep-bg-card);
    border: 1px solid var(--ep-border);
    border-radius: 10px;
    box-shadow: var(--ep-shadow-lg);
    max-height: 240px;
    overflow-y: auto;
    display: none;
    padding: 0.35rem 0;
    z-index: 30;
}

.ep-topic-suggestion {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ep-topic-suggestion:hover {
    background: rgba(99, 102, 241, 0.12);
    transform: translateX(2px);
}

.ep-topic-suggestion-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ep-text);
}

.ep-topic-suggestion-meta {
    font-size: 0.75rem;
    color: var(--ep-text-secondary);
    margin-top: 0.1rem;
}

.ep-topic-suggestion-empty {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--ep-text-secondary);
    text-align: center;
}

.ep-topic-count {
    font-size: 0.85em;
    font-weight: 500;
    margin-left: 0.25rem;
    color: var(--ep-success);
}

.ep-topic-count-empty {
    color: var(--ep-text-secondary) !important;
}

.ep-btn.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

.ep-form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--ep-text-secondary);
    font-style: italic;
}

.ep-mcq-subject,
.ep-mcq-chapter,
.ep-mcq-topic {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.688rem;
    border: 1px solid;
    white-space: normal;
}

.ep-mcq-subject {
    background: rgba(59, 130, 246, 0.1);
    color: var(--ep-info);
    border-color: rgba(59, 130, 246, 0.3);
}

.ep-mcq-chapter {
    background: rgba(99, 102, 241, 0.1);
    color: var(--ep-primary-light);
    border-color: rgba(99, 102, 241, 0.3);
}

.ep-mcq-topic {
    background: rgba(245, 158, 11, 0.1);
    color: var(--ep-warning);
    border-color: rgba(245, 158, 11, 0.3);
}

/* Practice Mode - Professional Dark */
.ep-practice-container {
    max-width: 100%;
    margin: 0;
}

.ep-practice-question {
    background: var(--ep-bg-card);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.ep-practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ep-border);
}

.ep-practice-progress {
    font-weight: 700;
    color: var(--ep-primary-light);
    font-size: 0.875rem;
}

.ep-practice-q-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: var(--ep-text);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.ep-practice-q-text img,
.ep-result-explanation img,
.ep-rich-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0.5rem 0;
}

.ep-practice-options {
    display: grid;
    gap: 0.625rem;
}

.ep-practice-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--ep-border);
    border-radius: calc(var(--ep-radius) - 2px);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--ep-bg);
    position: relative;
    overflow: hidden;
    padding-right: 2.25rem;
    word-break: break-word;
}

/* Removed hover effect as requested - cleaner UX */

/* Make option and explanation text black when result shown for better contrast as requested */
.ep-practice-option.correct .ep-option-text,
.ep-practice-option.incorrect .ep-option-text {
    color: #111111;
    font-weight: 600;
}
.ep-result-explanation {
    color: #111111 !important;
}

/* Prevent bottom sticky nav overlapping content */
.ep-mcq-dashboard-inner {
    padding-bottom: 100px;
}

.ep-practice-options.answered .ep-practice-option {
    cursor: default;
}

/* Removed hover effect for answered state too */

.ep-practice-option.correct {
    border-color: var(--ep-success);
    background: #d1fae5;
}

.ep-practice-option.incorrect {
    border-color: var(--ep-error);
    background: #fee2e2;
}

.ep-option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ep-bg-secondary);
    font-weight: 700;
    font-size: 0.813rem;
    flex-shrink: 0;
    border: 2px solid var(--ep-border);
}

.ep-practice-option.correct .ep-option-letter {
    background: var(--ep-success);
    color: white;
}

.ep-practice-option.incorrect .ep-option-letter {
    background: var(--ep-error);
    color: white;
}

.ep-option-text {
    flex: 1;
    font-size: 1rem;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.ep-practice-result {
    margin-bottom: 1rem;
}

.ep-result-box {
    padding: 1.5rem;
    border-radius: var(--ep-radius);
    border: 2px solid;
}

.ep-result-success {
    background: #d1fae5;
    border-color: var(--ep-success);
}

.ep-result-error {
    background: #fee2e2;
    border-color: var(--ep-error);
}

.ep-result-status {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.ep-result-success .ep-result-status {
    color: var(--ep-success);
}

.ep-result-error .ep-result-status {
    color: var(--ep-error);
}

.ep-result-explanation {
    margin-bottom: 1rem;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.ep-result-stats {
    font-size: 0.875rem;
    color: var(--ep-text-secondary);
    font-weight: 500;
}

.ep-practice-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.ep-topic-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
}

.ep-topic-modal.is-open {
    display: flex;
}

.ep-topic-modal-content {
    background: var(--ep-bg-card);
    border-radius: 16px;
    border: 1px solid var(--ep-border);
    box-shadow: var(--ep-shadow-lg);
    width: min(460px, 100%);
    padding: 1.75rem;
    position: relative;
}

.ep-topic-modal h3 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ep-text);
}

.ep-topic-modal .ep-form-group {
    margin-bottom: 1rem;
}

.ep-topic-modal .ep-form-group:last-of-type {
    margin-bottom: 0;
}

.ep-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.ep-modal-error {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    font-size: 0.85rem;
    display: none;
}

.ep-theme-light .ep-modal-error {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.15);
}

/* Loading overlay */
.ep-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ep-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--ep-border);
    border-top-color: var(--ep-primary);
    border-radius: 50%;
    animation: ep-spin 0.8s linear infinite;
}

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

/* Messages */
.ep-message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--ep-bg);
    border-left: 4px solid;
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow-lg);
    z-index: 10000;
    min-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
}

.ep-message.show {
    opacity: 1;
    transform: translateX(0);
}

.ep-message-success {
    border-left-color: var(--ep-success);
    color: var(--ep-success);
}

.ep-message-error {
    border-left-color: var(--ep-error);
    color: var(--ep-error);
}

.ep-message-info {
    border-left-color: var(--ep-primary);
    color: var(--ep-primary);
}

/* Practice Question HTML Display */
.ep-practice-q-text {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 1.5rem 0;
    color: var(--ep-text);
    line-height: 1.8;
}

.ep-practice-q-text h1,
.ep-practice-q-text h2,
.ep-practice-q-text h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
}

.ep-practice-q-text ul,
.ep-practice-q-text ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.ep-practice-q-text p {
    margin: 0.75rem 0;
}

.ep-practice-q-text strong {
    font-weight: 600;
    color: var(--ep-primary);
}

.ep-practice-q-text em {
    font-style: italic;
}

/* Practice Filter Toggle */
.ep-practice-back-filters {
    margin-bottom: 1rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .ep-mcq-dashboard {
        padding: 0;
    }
    
    .ep-mcq-dashboard-inner {
        padding: 0.75rem;
    }
    
    .ep-mcq-stats {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .ep-stat-card {
        padding: 0.75rem 0.5rem;
    }
    
    .ep-stat-value {
        font-size: 1.5rem;
    }
    
    .ep-stat-label {
        font-size: 0.625rem;
    }
    
    .ep-mcq-tabs {
        padding: 0.25rem;
        gap: 0.125rem;
        margin-bottom: 0.75rem;
    }
    
    .ep-tab-btn {
        padding: 0.5rem 0.375rem;
        font-size: 0.75rem;
    }
    
    .ep-mcq-filters {
        grid-template-columns: 1fr;
        padding: 0.75rem;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .ep-practice-filters {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .ep-input,
    .ep-select {
        min-width: 100%;
        width: 100%;
    }
    
    .ep-mcq-item {
        padding: 0.875rem;
        gap: 0.5rem;
    }
    
    .ep-mcq-header {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .ep-mcq-title {
        font-size: 0.875rem;
    }
    
    .ep-mcq-meta {
        gap: 0.375rem;
        margin-bottom: 0.5rem;
        font-size: 0.688rem;
    }
    
    .ep-mcq-actions {
        width: 100%;
    }
    
    .ep-mcq-actions .ep-btn {
        flex: 1;
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .ep-mcq-form {
        padding: 1rem;
    }
    
    .ep-form-group {
        margin-bottom: 0.875rem;
    }
    
    .ep-rich-editor {
        min-height: 180px;
    }
    
    .ep-rich-editor .ql-editor {
        min-height: 120px;
        padding: 0.75rem;
        font-size: 0.938rem;
    }
    
    .ep-rich-editor .ql-toolbar {
        padding: 0.5rem;
    }
    
    .ep-rich-editor .ql-toolbar .ql-formats {
        margin-right: 0.5rem;
    }
    
    .ep-form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .ep-form-actions .ep-btn {
        width: 100%;
    }
    
    .ep-topic-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ep-topic-input-wrapper .ep-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .ep-remove-option {
        width: 28px;
        height: 28px;
        padding: 0.375rem;
        font-size: 0.875rem;
    }
    
    .ep-option-row {
        gap: 0.375rem;
    }
    
    .ep-practice-question {
        padding: 1rem;
    }
    
    .ep-practice-q-text {
        font-size: 0.938rem;
        margin-bottom: 1rem;
    }
    
    .ep-practice-options {
        gap: 0.5rem;
    }
    
    .ep-practice-option {
        padding: 0.75rem 0.875rem;
    }
    
    .ep-option-text {
        font-size: 0.875rem;
    }
    
    .ep-message {
        right: 0.75rem;
        left: 0.75rem;
        top: 0.75rem;
        min-width: auto;
        padding: 0.75rem 1rem;
        font-size: 0.813rem;
    }
}

@media (max-width: 480px) {
    .ep-mcq-dashboard-inner {
        padding: 0.5rem;
    }
    
    .ep-stat-card {
        padding: 0.625rem 0.5rem;
    }
    
    .ep-stat-value {
        font-size: 1.25rem;
    }
    
    .ep-stat-label {
        font-size: 0.563rem;
    }
    
    .ep-mcq-form {
        padding: 0.875rem;
    }
    
    .ep-remove-option {
        width: 24px;
        height: 24px;
        padding: 0.25rem;
        font-size: 0.75rem;
    }
    
    .ep-option-row {
        gap: 0.25rem;
    }
    
    .ep-practice-question {
        padding: 0.875rem;
    }
}

/* Bottom Sticky Navigation */
.ep-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--ep-bg);
    border-top: 1px solid var(--ep-border);
    z-index: 999;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.ep-bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex: 1;
    padding: 0.625rem 0.5rem !important;
    font-size: 0.75rem !important;
    min-width: auto !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.ep-bottom-create {
    flex: 1.5 !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.ep-bottom-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
}

.ep-bottom-icon {
    font-size: 1.25rem;
    line-height: 1;
}

@media (max-width: 480px) {
    .ep-bottom-nav {
        padding: 0.5rem;
        gap: 0.375rem;
    }
    
    .ep-bottom-tab {
        font-size: 0.688rem !important;
        padding: 0.5rem 0.375rem !important;
    }
    
    .ep-bottom-icon {
        font-size: 1.125rem;
    }
    
    .ep-mcq-dashboard-inner {
        padding-bottom: 90px !important;
    }
}