/* 
 * QMP Frontend Styles 
 * RTL & Responsive 
 */
.qmp-quiz-wrapper {
	max-width: 700px;
	margin: 20px auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 5px 20px rgba(0,0,0,0.08);
	overflow: hidden;
	font-family: inherit;
	direction: rtl;
	text-align: right;
}

.qmp-quiz-title {
	background: #f8f9fa;
	margin: 0;
	padding: 20px;
	text-align: center;
	font-size: 18px;
	color: #333;
	border-bottom: 1px solid #eee;
}

.qmp-screen {
	display: none;
	padding: 30px;
}
.qmp-screen.is-active {
	display: block;
	animation: qmpFadeIn 0.4s ease;
}

@keyframes qmpFadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.qmp-btn {
	display: inline-block;
	padding: 12px 25px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.3s;
	text-align: center;
}
.qmp-btn-start {
	background: #007bff;
	color: #fff;
	width: 100%;
}
.qmp-btn-start:hover { background: #0056b3; }
.qmp-btn-check {
	background: #28a745;
	color: #fff;
	width: 100%;
	margin-top: 15px;
}
.qmp-btn-check:hover { background: #1e7e34; }

/* Header & Timer */
.qmp-quiz-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px dashed #eee;
	font-weight: bold;
	color: #555;
}

/* Question Area */
.qmp-question-text {
	font-size: 18px;
	line-height: 1.6;
	margin-bottom: 20px;
	color: #222;
}
.qmp-drag-guide {
	font-size: 13px;
	color: #17a2b8;
	background: #e1f5fe;
	padding: 8px 12px;
	border-radius: 6px;
}

/* Options (Multiple Choice) */
.qmp-opt-btn {
	display: block;
	width: 100%;
	padding: 15px;
	margin-bottom: 10px;
	background: #fdfdfd;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	text-align: right;
	font-size: 15px;
	font-family: inherit;
	cursor: pointer;
	transition: 0.2s;
}
.qmp-opt-btn:hover:not(:disabled) {
	border-color: #007bff;
	background: #f0f7ff;
}
.qmp-opt-btn:disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

/* Drag & Drop */
.qmp-drag-item {
	display: inline-block;
	padding: 10px 15px;
	margin: 5px;
	background: #fff;
	border: 2px solid #007bff;
	border-radius: 6px;
	cursor: grab;
	user-select: none;
}
.qmp-drag-item:active { cursor: grabbing; }
.qmp-drop-zone {
	min-height: 100px;
	border: 2px dashed #ccc;
	border-radius: 8px;
	padding: 15px;
	margin-top: 20px;
	background: #fafafa;
}
.qmp-drop-zone.is-dragover {
	background: #e8f4f8;
	border-color: #007bff;
}

/* Feedback */
.qmp-feedback-area {
	margin-top: 15px;
	padding: 15px;
	border-radius: 8px;
	font-weight: bold;
	text-align: center;
	display: none;
}
.qmp-feedback-area.is-correct {
	display: block;
	background: #d4edda;
	color: #155724;
}
.qmp-feedback-area.is-incorrect {
	display: block;
	background: #f8d7da;
	color: #721c24;
}

/* Loading */
.qmp-spinner {
	width: 50px;
	height: 50px;
	border: 5px solid #f3f3f3;
	border-top: 5px solid #007bff;
	border-radius: 50%;
	animation: qmpSpin 1s linear infinite;
	margin: 0 auto 15px;
}
@keyframes qmpSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Results */
.qmp-result-title { text-align: center; color: #28a745; font-size: 24px; margin-bottom: 20px; }
.qmp-stats-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}
.qmp-stat-item {
	background: #f8f9fa;
	padding: 15px;
	border-radius: 8px;
	text-align: center;
	border: 1px solid #eee;
}
.qmp-stat-label { display: block; font-size: 13px; color: #666; margin-bottom: 5px; }
.qmp-stat-value { display: block; font-size: 20px; font-weight: bold; color: #007bff; }

/* Leaderboard */
.qmp-leaderboard-wrapper {
	max-width: 700px;
	margin: 30px auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 5px 20px rgba(0,0,0,0.05);
	padding: 20px;
	direction: rtl;
}
.qmp-leaderboard-title { margin-top: 0; color: #333; border-bottom: 2px solid #eee; padding-bottom: 10px;}
.qmp-leaderboard-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.qmp-leaderboard-table th { background: #f4f4f4; padding: 12px; text-align: right; color: #555; }
.qmp-leaderboard-table td { padding: 12px; border-bottom: 1px solid #eee; }
.qmp-current-user { background-color: #e6f2ff; font-weight: bold; }

/* User Card Styles (Different Themes) */
.qmp-user-card-wrap { display: inline-block; margin: 10px; }
.qmp-user-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 140px;
	height: 180px;
	border-radius: 12px;
	text-decoration: none !important;
	padding: 15px 10px;
	box-sizing: border-box;
	position: relative;
	transition: transform 0.3s, box-shadow 0.3s;
	overflow: hidden;
}
.qmp-user-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.qmp-card-badge { position: absolute; top: 10px; right: 10px; font-weight: bold; }
.qmp-circular-chart { display: block; margin: 0 auto; max-width: 70px; max-height: 70px; }
.qmp-circle-bg { fill: none; stroke: rgba(0,0,0,0.1); stroke-width: 3.8; }
.qmp-circle-fill { fill: none; stroke-width: 3.8; stroke-linecap: round; transition: stroke-dasharray 1s ease-out; }
.qmp-percentage { fill: currentColor; font-size: 8px; text-anchor: middle; font-weight: bold; }
.qmp-card-title { font-size: 13px; margin: 15px 0 5px; text-align: center; }
.qmp-card-hint { font-size: 11px; opacity: 0.7; }
.qmp-card-locked { font-size: 30px; margin-bottom: 15px; opacity: 0.5; }

/* Theme Blue */
.qmp-theme-blue .qmp-state-taken { background: linear-gradient(135deg, #e3f2fd, #cce5ff); color: #0056b3; }
.qmp-theme-blue .qmp-circle-fill { stroke: #0056b3; }
.qmp-theme-blue .qmp-state-pending { background: #f8f9fa; color: #6c757d; border: 1px solid #dee2e6; }

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

.qmp-quiz-wrapper, 
.qmp-leaderboard-wrapper, 
.qmp-user-card-wrap {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif !important;
}