/* =============================================
   قضية - ستايل الواجهة الأمامية
   Day 3: Single Case + Archive + Profile + Points
   ============================================= */

:root {
    --q-primary: #3b82f6;
    --q-primary-dark: #2563eb;
    --q-primary-light: #dbeafe;
    --q-secondary: #8b5cf6;
    --q-secondary-light: #ede9fe;
    --q-success: #10b981;
    --q-success-light: #d1fae5;
    --q-danger: #ef4444;
    --q-danger-light: #fee2e2;
    --q-warning: #f59e0b;
    --q-warning-light: #fef3c7;
    --q-info: #06b6d4;
    --q-info-light: #cffafe;
    --q-dark: #1e293b;
    --q-gray: #64748b;
    --q-gray-light: #94a3b8;
    --q-light: #f8fafc;
    --q-white: #ffffff;
    --q-border: #e2e8f0;
    --q-radius: 12px;
    --q-radius-lg: 16px;
    --q-radius-xl: 24px;
    --q-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --q-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --q-shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --q-shadow-xl: 0 8px 40px rgba(0,0,0,0.15);
    --q-font: 'Tajawal', 'Segoe UI', sans-serif;
    --q-transition: all 0.3s ease;
}

* { box-sizing: border-box; }

/* =============================================
   القواعد العامة
   ============================================= */
.qadiyah-single-case,
.qadiyah-archive,
.qadiyah-profile,
.qadiyah-profile-login,
.qadiyah-game,
.qadiyah-cases-embed {
    direction: rtl;
    font-family: var(--q-font);
    color: var(--q-dark);
    -webkit-font-smoothing: antialiased;
}

.qadiyah-single-case a,
.qadiyah-archive a {
    text-decoration: none;
    color: inherit;
}

/* =============================================
   SINGLE CASE - قالب القضية الواحدة
   ============================================= */

/* ===== Hero ===== */
.case-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding: 60px 24px 50px;
    position: relative;
    overflow: hidden;
}

.case-hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.case-hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.case-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 20px;
    border-radius: 50px;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
}

.badge-icon { font-size: 18px; }

.case-hero-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.3;
}

.case-hero-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.case-hero-meta .meta-item {
    color: #cbd5e1;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.case-hero-meta .difficulty-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
}

.case-hero-hashtags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.hashtag-link {
    color: rgba(255,255,255,0.7) !important;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    transition: var(--q-transition);
}

.hashtag-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
}

/* ===== Content Wrapper ===== */
.case-content-wrapper {
    max-width: 900px;
    margin: -20px auto 0;
    padding: 0 20px 40px;
    position: relative;
    z-index: 2;
}

/* ===== User Level Bar ===== */
.user-level-bar {
    background: var(--q-white);
    border-radius: var(--q-radius-lg);
    padding: 20px 24px;
    box-shadow: var(--q-shadow-lg);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.level-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-emoji { font-size: 28px; }

.rank-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--q-dark);
}

.rank-points {
    color: var(--q-warning);
    font-weight: 700;
    font-size: 14px;
}

.level-progress {
    flex: 1;
    min-width: 200px;
}

.progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--q-primary), var(--q-secondary));
    border-radius: 10px;
    transition: width 1s ease;
}

.next-rank {
    font-size: 12px;
    color: var(--q-gray);
}

.level-stats-mini {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: var(--q-gray);
}

.level-stats-mini span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.level-stats-mini .fa-check-circle { color: var(--q-success); }
.level-stats-mini .fa-fire { color: var(--q-danger); }

/* ===== Victim Card ===== */
.victim-section { margin-bottom: 24px; }

.victim-card-fancy {
    background: linear-gradient(135deg, #fef2f2, #fff5f5);
    border: 2px solid #fecaca;
    border-radius: var(--q-radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--q-shadow);
}

.victim-icon-wrap {
    width: 60px;
    height: 60px;
    background: var(--q-danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    flex-shrink: 0;
}

.victim-info h3 { font-size: 14px; color: var(--q-danger); margin: 0 0 4px; font-weight: 600; }
.victim-name-text { font-size: 20px; font-weight: 800; color: var(--q-dark); margin: 0 0 4px; }
.victim-desc-text { font-size: 14px; color: var(--q-gray); margin: 0; line-height: 1.6; }

/* ===== Section Headers ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--q-border);
}

.section-icon { font-size: 24px; }

.section-header h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    flex: 1;
}

.evidence-count,
.suspects-count {
    background: var(--q-primary-light);
    color: var(--q-primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

/* ===== Story Section ===== */
.case-story-section {
    background: var(--q-white);
    border-radius: var(--q-radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--q-shadow);
}

.story-content {
    font-size: 16px;
    line-height: 2;
    color: #475569;
}

.story-content p { margin: 0 0 12px; }

/* ===== Evidence Accordion ===== */
.evidence-section-full {
    background: var(--q-white);
    border-radius: var(--q-radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--q-shadow);
}

.evidence-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.evidence-accordion-item {
    border: 2px solid var(--q-border);
    border-radius: var(--q-radius);
    overflow: hidden;
    transition: var(--q-transition);
}

.evidence-accordion-item:hover { border-color: var(--q-primary-light); }

.evidence-accordion-item.open {
    border-color: var(--q-primary);
    box-shadow: var(--q-shadow-md);
}

.evidence-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    background: var(--q-light);
    border: none;
    cursor: pointer;
    font-family: var(--q-font);
    font-size: 15px;
    color: var(--q-dark);
    transition: var(--q-transition);
}

.evidence-accordion-item.open .evidence-accordion-header { background: var(--q-primary-light); }

.evidence-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.evidence-icon-lg { font-size: 24px; }
.evidence-title-text { font-weight: 700; font-size: 15px; }

.evidence-toggle {
    transition: transform 0.3s;
    color: var(--q-gray);
}

.evidence-accordion-item.open .evidence-toggle {
    transform: rotate(180deg);
    color: var(--q-primary);
}

.evidence-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 20px;
}

.evidence-accordion-item.open .evidence-accordion-body {
    max-height: 300px;
    padding: 16px 20px 20px;
}

.evidence-accordion-body p {
    font-size: 14px;
    line-height: 1.8;
    color: #475569;
    margin: 0;
}

/* ===== Suspects Section ===== */
.suspects-section-full {
    background: var(--q-white);
    border-radius: var(--q-radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--q-shadow);
}

.suspects-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.suspect-card-full {
    background: var(--q-light);
    border: 3px solid var(--q-border);
    border-radius: var(--q-radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: var(--q-transition);
    position: relative;
    overflow: hidden;
}

.suspect-card-full:hover:not(.disabled) {
    border-color: var(--q-primary);
    transform: translateY(-3px);
    box-shadow: var(--q-shadow-lg);
}

.suspect-card-full.selected {
    border-color: var(--q-primary);
    background: var(--q-primary-light);
}

.suspect-card-full.selected .suspect-select-indicator {
    opacity: 1;
    background: var(--q-primary);
}

.suspect-card-full.is-culprit {
    border-color: var(--q-success) !important;
    background: var(--q-success-light) !important;
}

.suspect-card-full.is-culprit::after {
    content: '✅ المجرم';
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--q-success);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.suspect-card-full.is-wrong {
    border-color: var(--q-danger) !important;
    background: var(--q-danger-light) !important;
}

.suspect-card-full.is-wrong::after {
    content: '❌ خطأ';
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--q-danger);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.suspect-card-full.disabled { cursor: default; opacity: 0.85; }
.suspect-avatar { margin-bottom: 12px; }
.suspect-emoji-lg { font-size: 48px; display: block; }
.suspect-name-full { font-size: 18px; font-weight: 800; margin: 0 0 4px; color: var(--q-dark); }
.suspect-role-full { font-size: 13px; color: var(--q-gray); margin: 0 0 10px; font-weight: 600; }
.suspect-desc-full { font-size: 14px; line-height: 1.7; color: #475569; margin: 0 0 12px; }

.suspect-alibi-box {
    background: rgba(0,0,0,0.04);
    border-radius: 10px;
    padding: 12px 14px;
    border-right: 3px solid var(--q-primary);
}

.alibi-label {
    font-size: 12px;
    color: var(--q-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.suspect-alibi-box p {
    font-size: 13px;
    color: var(--q-gray);
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.suspect-select-indicator {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--q-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    opacity: 0.5;
    transition: var(--q-transition);
}

/* ===== Verdict Section ===== */
.verdict-section {
    text-align: center;
    padding: 40px 24px;
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border: 2px dashed var(--q-primary);
    border-radius: var(--q-radius-xl);
    margin-bottom: 24px;
}

.verdict-section.played {
    border-color: var(--q-success);
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
}

.verdict-icon { font-size: 48px; margin-bottom: 12px; }
.verdict-section h2 { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.verdict-section p { color: var(--q-gray); margin: 0 0 20px; font-size: 15px; }

.btn-verdict {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--q-primary), var(--q-secondary));
    border: none;
    color: #fff;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--q-font);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--q-transition);
    box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.btn-verdict:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

.btn-verdict:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-back-archive {
    background: linear-gradient(135deg, var(--q-success), #059669);
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}

.verdict-hint { font-size: 13px; color: var(--q-gray-light); margin-top: 12px; }

/* ===== Verdict Modal ===== */
.verdict-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.verdict-modal {
    background: var(--q-white);
    border-radius: var(--q-radius-xl);
    max-width: 480px;
    width: 100%;
    padding: 40px;
    text-align: center;
    position: relative;
    animation: modalIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--q-gray);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--q-transition);
}

.modal-close:hover { background: var(--q-light); color: var(--q-dark); }

.modal-header .modal-icon { font-size: 48px; margin-bottom: 8px; }
.modal-header h2 { font-size: 22px; font-weight: 800; margin: 0 0 20px; }

.modal-suspect-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--q-light);
    border-radius: var(--q-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.modal-suspect-emoji { font-size: 40px; }
.modal-suspect-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 2px; }
.modal-suspect-card p { font-size: 13px; color: var(--q-gray); margin: 0; }

.modal-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--q-warning-light);
    border: 1px solid #fde68a;
    border-radius: var(--q-radius);
    padding: 14px 16px;
    margin-bottom: 20px;
    text-align: right;
}

.modal-warning i { color: var(--q-warning); font-size: 20px; flex-shrink: 0; }
.modal-warning p { font-size: 13px; color: #92400e; margin: 0; line-height: 1.5; }

.modal-actions { display: flex; flex-direction: column; gap: 10px; }

.btn-confirm-verdict {
    background: var(--q-danger);
    color: #fff;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--q-font);
    border-radius: var(--q-radius);
    cursor: pointer;
    transition: var(--q-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-confirm-verdict:hover:not(:disabled) { background: #dc2626; }
.btn-confirm-verdict:disabled { opacity: 0.6; cursor: wait; }

.btn-cancel-verdict {
    background: var(--q-light);
    color: var(--q-gray);
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--q-font);
    border-radius: var(--q-radius);
    cursor: pointer;
    transition: var(--q-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cancel-verdict:hover { background: var(--q-border); }

/* ===== Result Section ===== */
.result-section-full { margin-bottom: 24px; }

.result-card {
    border-radius: var(--q-radius-xl);
    padding: 48px 32px;
    text-align: center;
    box-shadow: var(--q-shadow-xl);
}

.result-correct {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 3px solid var(--q-success);
}

.result-wrong {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 3px solid var(--q-danger);
}

.result-big-emoji {
    font-size: 72px;
    display: block;
    margin-bottom: 16px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.result-heading { font-size: 28px; font-weight: 800; margin: 0 0 16px; }

.result-points-earned {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    background: var(--q-warning-light);
    border: 2px solid var(--q-warning);
    border-radius: 50px;
    padding: 10px 28px;
    margin-bottom: 20px;
}

.points-number { font-size: 32px; font-weight: 800; color: var(--q-warning); }
.points-label { font-size: 16px; font-weight: 600; color: #92400e; }

.result-culprit-reveal { font-size: 18px; margin-bottom: 20px; }
.result-culprit-reveal strong { color: var(--q-danger); font-size: 20px; }

.result-solution-box {
    background: var(--q-white);
    border-radius: var(--q-radius);
    padding: 24px;
    margin: 20px auto;
    max-width: 600px;
    text-align: right;
    border-right: 4px solid var(--q-primary);
    box-shadow: var(--q-shadow);
}

.result-solution-box h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: var(--q-primary); }
.result-solution-box p { font-size: 14px; line-height: 1.8; color: #475569; margin: 0; }

.result-actions { margin-top: 24px; }

.btn-result {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--q-font);
    text-decoration: none !important;
    transition: var(--q-transition);
}

.btn-next-case { background: var(--q-primary); color: #fff !important; }
.btn-next-case:hover { background: var(--q-primary-dark); transform: translateY(-2px); }

/* ===== Related Cases ===== */
.related-cases-section {
    background: var(--q-light);
    padding: 40px 0;
    margin-top: 24px;
}

.related-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.related-case-card {
    background: var(--q-white);
    border-radius: var(--q-radius);
    padding: 20px;
    box-shadow: var(--q-shadow);
    transition: var(--q-transition);
    display: block;
}

.related-case-card:hover { transform: translateY(-3px); box-shadow: var(--q-shadow-lg); }

.related-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.related-card-header h3 { font-size: 16px; font-weight: 700; margin: 0; flex: 1; }

.related-difficulty {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.related-case-card p { font-size: 13px; color: var(--q-gray); line-height: 1.6; margin: 0 0 12px; }
.related-card-footer { display: flex; gap: 12px; font-size: 12px; color: var(--q-gray-light); }


/* =============================================
   ARCHIVE - أرشيف القضايا
   ============================================= */

.archive-hero {
    background: linear-gradient(135deg, #0f172a, #1e293b, #334155);
    padding: 50px 24px 40px;
    text-align: center;
}

.archive-hero-content h1 {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.hero-icon { font-size: 40px; }
.archive-hero-content p { font-size: 16px; color: #94a3b8; margin: 0 0 20px; }

.archive-user-stats { display: flex; justify-content: center; gap: 24px; }
.mini-stat { text-align: center; }
.mini-stat-value { display: block; font-size: 22px; font-weight: 800; color: #fff; }
.mini-stat-label { font-size: 12px; color: #94a3b8; }

.archive-content-wrapper {
    max-width: 1200px;
    margin: -16px auto 0;
    padding: 0 20px 40px;
    position: relative;
    z-index: 2;
}

/* Mode Tabs */
.archive-mode-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: var(--q-white);
    border-radius: var(--q-radius-lg);
    padding: 8px;
    box-shadow: var(--q-shadow-lg);
}

.archive-mode-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--q-radius);
    font-size: 15px;
    font-weight: 700;
    color: var(--q-gray);
    text-decoration: none !important;
    transition: var(--q-transition);
}

.archive-mode-tab:hover { background: var(--q-light); color: var(--q-dark); }
.archive-mode-tab.active { background: var(--q-primary); color: #fff !important; }
.archive-mode-tab.tab-text.active { background: var(--q-primary); }
.archive-mode-tab.tab-manga.active { background: var(--q-secondary); }
.archive-mode-tab.tab-audio.active { background: var(--q-info); }

.tab-icon { font-size: 18px; }

.tab-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.archive-mode-tab:not(.active) .tab-count { background: var(--q-border); }

/* Filters */
.archive-filters-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.filter-group label {
    font-size: 14px;
    font-weight: 700;
    color: var(--q-gray);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-buttons { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: var(--q-white);
    border: 1px solid var(--q-border);
    color: var(--q-gray);
    text-decoration: none !important;
    transition: var(--q-transition);
}

.filter-btn:hover { border-color: var(--q-primary); color: var(--q-primary); }
.filter-btn.active { background: var(--q-primary); border-color: var(--q-primary); color: #fff !important; }

.filter-select {
    padding: 8px 14px;
    border-radius: var(--q-radius);
    border: 1px solid var(--q-border);
    font-family: var(--q-font);
    font-size: 13px;
    background: var(--q-white);
    color: var(--q-dark);
    cursor: pointer;
}

/* Hashtags Cloud */
.archive-hashtags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--q-white);
    border-radius: var(--q-radius);
    box-shadow: var(--q-shadow);
}

.cloud-hashtag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: var(--q-light);
    color: var(--q-primary);
    text-decoration: none !important;
    transition: var(--q-transition);
}

.cloud-hashtag:hover { background: var(--q-primary-light); }
.cloud-hashtag.active { background: var(--q-primary); color: #fff !important; }

.cloud-count { background: rgba(0,0,0,0.08); padding: 1px 6px; border-radius: 8px; font-size: 11px; }
.cloud-hashtag.active .cloud-count { background: rgba(255,255,255,0.2); }
.cloud-clear { background: var(--q-danger-light); color: var(--q-danger) !important; }

/* Active Filters */
.archive-active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: var(--q-warning-light);
    border-radius: var(--q-radius);
}

.active-label { font-size: 13px; font-weight: 700; color: #92400e; }

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--q-white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.active-filter-chip a { color: var(--q-danger); font-weight: 800; font-size: 16px; }
.clear-all-filters { margin-right: auto; font-size: 13px; color: var(--q-danger) !important; font-weight: 600; }

/* Cases Grid */
.archive-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.archive-case-card {
    background: var(--q-white);
    border-radius: var(--q-radius-lg);
    overflow: hidden;
    box-shadow: var(--q-shadow);
    transition: var(--q-transition);
    display: block;
    position: relative;
}

.archive-case-card:hover { transform: translateY(-4px); box-shadow: var(--q-shadow-xl); }
.archive-case-card.played { opacity: 0.8; }

.played-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--q-success);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.archive-card-header {
    padding: 24px 20px 16px;
    background: linear-gradient(135deg, var(--q-dark), #334155);
    color: #fff;
}

.archive-card-number { font-size: 12px; color: #94a3b8; margin-bottom: 6px; }
.archive-card-header h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; line-height: 1.4; }
.archive-card-meta { display: flex; gap: 12px; font-size: 12px; color: #94a3b8; }
.archive-card-meta span { display: flex; align-items: center; gap: 4px; }

.archive-card-body { padding: 16px 20px; }
.archive-card-body p { font-size: 14px; color: var(--q-gray); line-height: 1.7; margin: 0 0 10px; }
.archive-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.mini-hashtag {
    font-size: 12px;
    color: var(--q-primary);
    background: var(--q-primary-light);
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.archive-card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--q-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.archive-points { font-weight: 800; color: var(--q-warning); }
.archive-info { color: var(--q-gray-light); }

.archive-difficulty {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.archive-card-modes {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    z-index: 2;
}

.mode-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    font-size: 14px;
}

/* Difficulty colors */
.difficulty-easy   { background: var(--q-success-light); color: #065f46; }
.difficulty-medium { background: var(--q-warning-light); color: #92400e; }
.difficulty-hard   { background: var(--q-danger-light); color: #991b1b; }
.difficulty-expert { background: var(--q-secondary-light); color: #5b21b6; }

/* Pagination */
.archive-pagination { text-align: center; margin-bottom: 32px; }
.archive-pagination ul { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 0; }
.archive-pagination li { display: inline; }

.archive-pagination a,
.archive-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--q-radius);
    font-size: 14px;
    font-weight: 600;
    background: var(--q-white);
    border: 1px solid var(--q-border);
    color: var(--q-dark);
    text-decoration: none;
    transition: var(--q-transition);
}

.archive-pagination a:hover { border-color: var(--q-primary); color: var(--q-primary); }
.archive-pagination .current { background: var(--q-primary); border-color: var(--q-primary); color: #fff; }

/* No Cases */
.archive-no-cases {
    text-align: center;
    padding: 60px 20px;
    background: var(--q-white);
    border-radius: var(--q-radius-lg);
    box-shadow: var(--q-shadow);
    margin-bottom: 32px;
}

.no-cases-icon { font-size: 64px; margin-bottom: 16px; }
.archive-no-cases h2 { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.archive-no-cases p { color: var(--q-gray); margin: 0 0 20px; }

.btn-reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--q-primary);
    color: #fff !important;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--q-transition);
}

.btn-reset-filters:hover { background: var(--q-primary-dark); }

/* Stats Footer */
.archive-stats-footer {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 32px 20px;
    background: var(--q-white);
    border-radius: var(--q-radius-lg);
    box-shadow: var(--q-shadow);
}

.stat-footer-item { text-align: center; }
.stat-footer-icon { font-size: 28px; display: block; margin-bottom: 4px; }
.stat-footer-value { font-size: 24px; font-weight: 800; color: var(--q-dark); display: block; }
.stat-footer-label { font-size: 13px; color: var(--q-gray); }


/* =============================================
   PROFILE - ملف اللاعب
   ============================================= */

.qadiyah-profile { max-width: 800px; margin: 0 auto; padding: 20px; }

.qadiyah-profile-login { max-width: 480px; margin: 40px auto; padding: 20px; }

.profile-login-card {
    text-align: center;
    background: var(--q-white);
    border-radius: var(--q-radius-xl);
    padding: 48px;
    box-shadow: var(--q-shadow-lg);
}

.login-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.profile-login-card h2 { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.profile-login-card p { color: var(--q-gray); margin: 0 0 24px; }

.btn-login-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--q-primary);
    color: #fff !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: var(--q-transition);
}

.btn-login-profile:hover { background: var(--q-primary-dark); }

.profile-header-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--q-dark), #334155);
    border-radius: var(--q-radius-xl);
    padding: 32px;
    margin-bottom: 20px;
    color: #fff;
}

.profile-avatar img { border-radius: 50%; border: 4px solid rgba(255,255,255,0.2); }
.profile-info h1 { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.profile-rank { display: flex; align-items: center; gap: 8px; }
.rank-emoji-lg { font-size: 24px; }
.rank-name-lg { font-size: 16px; font-weight: 700; color: var(--q-warning); }

.profile-level-card {
    background: var(--q-white);
    border-radius: var(--q-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--q-shadow);
}

.level-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 14px;
}

.level-current { color: var(--q-primary); }
.level-next { color: var(--q-gray-light); }

.level-progress-bar {
    height: 14px;
    background: #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--q-primary), var(--q-secondary));
    border-radius: 14px;
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.level-pct { font-size: 10px; font-weight: 800; color: #fff; }
.level-remaining { font-size: 13px; color: var(--q-gray); margin: 0; text-align: center; }

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.profile-stat-card {
    background: var(--q-white);
    border-radius: var(--q-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--q-shadow);
}

.stat-icon-lg { font-size: 28px; display: block; margin-bottom: 4px; }
.stat-value-lg { font-size: 24px; font-weight: 800; color: var(--q-dark); display: block; }
.stat-label-lg { font-size: 12px; color: var(--q-gray); }

.profile-mode-stats {
    background: var(--q-white);
    border-radius: var(--q-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--q-shadow);
}

.profile-mode-stats h3 { font-size: 16px; font-weight: 700; margin: 0 0 16px; }
.mode-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.mode-stat-card { text-align: center; padding: 16px; border-radius: var(--q-radius); }
.mode-stat-card.mode-text { background: var(--q-primary-light); }
.mode-stat-card.mode-manga { background: var(--q-secondary-light); }
.mode-stat-card.mode-audio { background: var(--q-info-light); }

.mode-stat-icon { font-size: 28px; display: block; margin-bottom: 4px; }
.mode-stat-value { font-size: 22px; font-weight: 800; display: block; }
.mode-stat-label { font-size: 12px; color: var(--q-gray); }

.profile-recent-cases {
    background: var(--q-white);
    border-radius: var(--q-radius);
    padding: 24px;
    box-shadow: var(--q-shadow);
}

.profile-recent-cases h3 { font-size: 16px; font-weight: 700; margin: 0 0 16px; }
.recent-cases-list { display: flex; flex-direction: column; gap: 8px; }

.recent-case-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--q-radius);
    background: var(--q-light);
    transition: var(--q-transition);
}

.recent-case-item:hover { background: var(--q-border); }
.recent-case-item.correct { border-right: 3px solid var(--q-success); }
.recent-case-item.wrong { border-right: 3px solid var(--q-danger); }
.recent-case-icon { font-size: 20px; }
.recent-case-info { flex: 1; }
.recent-case-info a { font-size: 14px; font-weight: 600; color: var(--q-dark) !important; display: block; }
.recent-case-info a:hover { color: var(--q-primary) !important; }
.recent-case-date { font-size: 11px; color: var(--q-gray-light); }
.recent-case-points .points-earned { color: var(--q-success); font-weight: 700; font-size: 14px; }
.recent-case-points .points-zero { color: var(--q-gray-light); font-size: 14px; }
.recent-case-mode { font-size: 16px; }


/* =============================================
   SHORTCODE: Cases Embed
   ============================================= */
.qadiyah-cases-embed .embed-cases-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.embed-view-all { text-align: center; margin-top: 16px; }
.embed-view-all a { color: var(--q-primary) !important; font-weight: 700; font-size: 15px; }


/* =============================================
   LEGACY: JS SPA Views (shortcode game)
   ============================================= */
.qadiyah-game { max-width: 1200px; margin: 0 auto; padding: 20px; }

.qadiyah-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--q-dark), #334155);
    border-radius: var(--q-radius);
    color: #fff;
    margin-bottom: 32px;
}

.qadiyah-header h1 { font-size: 42px; font-weight: 800; margin: 0 0 8px; }
.qadiyah-header p { font-size: 18px; color: #94a3b8; margin: 0; }

.qadiyah-mode-tabs { display: flex; justify-content: center; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }

.mode-tab {
    padding: 12px 28px;
    border-radius: 50px;
    border: 2px solid var(--q-border);
    background: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--q-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-tab:hover { border-color: var(--q-primary); color: var(--q-primary); }
.mode-tab.active { background: var(--q-primary); border-color: var(--q-primary); color: #fff; }
.mode-tab[data-mode="manga"].active { background: var(--q-secondary); border-color: var(--q-secondary); }
.mode-tab[data-mode="audio"].active { background: var(--q-info); border-color: var(--q-info); }

.qadiyah-cases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 32px; }

.case-card { background: #fff; border-radius: var(--q-radius); overflow: hidden; box-shadow: var(--q-shadow); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.case-card:hover { transform: translateY(-4px); box-shadow: var(--q-shadow-lg); }
.case-card-header { padding: 20px; background: linear-gradient(135deg, var(--q-dark), #334155); color: #fff; }
.case-card-header h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.case-card-meta { display: flex; gap: 12px; font-size: 13px; color: #94a3b8; }
.case-card-body { padding: 16px 20px; }
.case-card-body p { font-size: 14px; color: var(--q-gray); line-height: 1.7; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.case-card-footer { padding: 12px 20px; border-top: 1px solid var(--q-border); display: flex; justify-content: space-between; align-items: center; }
.case-points { font-weight: 800; color: var(--q-warning); font-size: 16px; }

.case-detail-hero { background: linear-gradient(135deg, var(--q-dark), #334155); border-radius: var(--q-radius); padding: 40px; color: #fff; margin-bottom: 24px; text-align: center; }
.case-detail-hero h1 { font-size: 32px; font-weight: 800; margin: 0 0 12px; }

.case-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.info-item { background: #fff; border-radius: var(--q-radius); padding: 16px; box-shadow: var(--q-shadow); }
.info-item label { font-size: 12px; color: var(--q-gray); display: block; margin-bottom: 4px; }
.info-item span { font-size: 16px; font-weight: 700; }

.suspects-section { margin-bottom: 24px; }
.suspects-section h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.suspects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.suspect-card { background: #fff; border-radius: var(--q-radius); padding: 20px; box-shadow: var(--q-shadow); border: 3px solid transparent; cursor: pointer; transition: var(--q-transition); }
.suspect-card:hover { border-color: var(--q-primary); }
.suspect-card.selected { border-color: var(--q-primary); background: #eff6ff; }
.suspect-card.correct { border-color: var(--q-success); background: #ecfdf5; }
.suspect-card.wrong { border-color: var(--q-danger); background: #fef2f2; }
.suspect-emoji { font-size: 40px; margin-bottom: 8px; }
.suspect-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.suspect-role { font-size: 13px; color: var(--q-gray); margin-bottom: 8px; }
.suspect-desc { font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
.suspect-alibi { font-size: 13px; color: var(--q-gray); background: var(--q-light); padding: 8px 12px; border-radius: 8px; }

.evidence-section { margin-bottom: 24px; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.evidence-card { background: #fff; border-radius: var(--q-radius); padding: 16px; box-shadow: var(--q-shadow); display: flex; gap: 12px; }
.evidence-icon { font-size: 28px; flex-shrink: 0; }
.evidence-text h4 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.evidence-text p { font-size: 13px; color: var(--q-gray); line-height: 1.6; margin: 0; }

.submit-answer { text-align: center; margin: 32px 0; }
.btn-submit-answer { background: linear-gradient(135deg, var(--q-primary), var(--q-secondary)); border: none; color: #fff; padding: 16px 48px; font-size: 18px; font-weight: 700; font-family: inherit; border-radius: 50px; cursor: pointer; transition: opacity 0.2s, transform 0.2s; }
.btn-submit-answer:hover:not(:disabled) { opacity: 0.9; transform: translateY(-2px); }
.btn-submit-answer:disabled { opacity: 0.5; cursor: not-allowed; }

.case-result { text-align: center; padding: 40px; border-radius: var(--q-radius); margin: 24px 0; }
.case-result.correct { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 2px solid var(--q-success); }
.case-result.wrong { background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 2px solid var(--q-danger); }
.result-emoji { font-size: 64px; margin-bottom: 16px; }
.result-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }

.solution-section { background: #fff; border-radius: var(--q-radius); padding: 24px; box-shadow: var(--q-shadow); margin: 24px 0; border-right: 4px solid var(--q-primary); }
.solution-section h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.solution-section p { font-size: 15px; line-height: 1.8; color: #475569; }

.manga-viewer { max-width: 800px; margin: 0 auto; }
.manga-panel { width: 100%; border-radius: var(--q-radius); margin-bottom: 12px; box-shadow: var(--q-shadow); }

.audio-player-wrapper { background: linear-gradient(135deg, var(--q-dark), #334155); border-radius: var(--q-radius); padding: 32px; color: #fff; text-align: center; margin: 24px 0; }
.audio-player-wrapper audio { width: 100%; max-width: 600px; margin-top: 16px; }

/* =============================================
   INTERACTIVE AUDIO PLAYER - Day 8 مشغل تفاعلي
   ============================================= */

/* Audio Mode Tab */
.case-mode-toggle .mode-tab[data-mode="audio"].active {
    background: linear-gradient(135deg, #6d28d9, #8b5cf6);
    color: #fff;
}
.case-mode-toggle .mode-tab[data-mode="audio"].active .panels-count-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Player Section */
.qp-player-section { margin-bottom: 32px; position: relative; }

.qp-player {
    background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    border-radius: 24px;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.5);
}

/* ===== Speaker Stage ===== */
.qp-speaker-stage {
    padding: 32px 24px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
    overflow: hidden;
    transition: border-color 0.5s;
}

.qp-speaker-glow {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    transition: background 0.5s;
    pointer-events: none;
}

.qp-speaker-stage.qp-speaker-transition .qp-speaker-avatar {
    animation: speakerPop 0.5s ease-out;
}

@keyframes speakerPop {
    0% { transform: scale(0.7); opacity: 0.5; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.qp-speaker-stage.qp-whistle-warning {
    animation: whistleFlash 0.6s ease-in-out 3;
}

@keyframes whistleFlash {
    0%, 100% { background: transparent; }
    50% { background: rgba(245,158,11,0.15); }
}

.qp-speaker-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.15);
    transition: border-color 0.3s;
}

.qp-speaker-emoji { font-size: 32px; }

.qp-speaker-info { flex: 1; min-width: 0; }

.qp-speaker-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qp-speaker-type {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Voice Wave Animation */
.qp-voice-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 32px;
    flex-shrink: 0;
}

.qp-voice-wave span {
    width: 3px;
    height: 6px;
    background: rgba(139,92,246,0.4);
    border-radius: 2px;
    transition: height 0.2s;
}

.qp-voice-wave.active span {
    animation: waveBar 0.8s ease-in-out infinite;
    background: #a78bfa;
}

.qp-voice-wave.active span:nth-child(1) { animation-delay: 0s; }
.qp-voice-wave.active span:nth-child(2) { animation-delay: 0.1s; }
.qp-voice-wave.active span:nth-child(3) { animation-delay: 0.2s; }
.qp-voice-wave.active span:nth-child(4) { animation-delay: 0.3s; }
.qp-voice-wave.active span:nth-child(5) { animation-delay: 0.15s; }

@keyframes waveBar {
    0%, 100% { height: 6px; }
    50% { height: 24px; }
}

/* ===== Subtitles ===== */
.qp-subtitles {
    padding: 16px 24px;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.qp-subtitle-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,0.75);
    direction: rtl;
    transition: opacity 0.3s;
}

.qp-subtitle-text.qp-sub-sfx {
    text-align: center;
    color: #a78bfa;
    font-style: italic;
}

.qp-subtitles.qp-sub-hidden .qp-subtitle-text {
    opacity: 0;
}

.qp-subtitle-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
}

.qp-subtitle-toggle:hover { color: #fff; }

/* ===== Timeline with Markers ===== */
.qp-timeline-wrapper {
    padding: 20px 24px 8px;
    cursor: pointer;
    position: relative;
}

.qp-timeline-markers {
    position: absolute;
    top: 10px;
    left: 24px;
    right: 24px;
    height: 8px;
    display: flex;
    pointer-events: none;
    z-index: 1;
}

.qp-tl-marker {
    position: absolute;
    height: 4px;
    border-radius: 2px;
    top: 0;
    opacity: 0.5;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.2s;
}

.qp-tl-marker:hover { opacity: 1; }

.qp-tl-type-narrator  { background: #3b82f6; }
.qp-tl-type-suspect   { background: #f59e0b; }
.qp-tl-type-detective  { background: #10b981; }
.qp-tl-type-witness    { background: #ec4899; }

.qp-timeline-bar {
    height: 6px;
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
    position: relative;
    margin-top: 8px;
}

.qp-timeline-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 3px;
    width: 0;
    transition: width 0.1s linear;
}

.qp-timeline-handle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.2s;
}

.qp-timeline-wrapper:hover .qp-timeline-handle { opacity: 1; }

.qp-timeline-time {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin-top: 6px;
    font-family: monospace;
    direction: ltr;
}

/* ===== Controls ===== */
.qp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px 20px;
}

.qp-ctrl {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.qp-ctrl:hover { color: #fff; transform: scale(1.1); }

.qp-ctrl-skip {
    width: 44px;
    height: 44px;
    font-size: 16px;
    flex-direction: column;
    gap: 0;
}

.qp-ctrl-skip span {
    font-size: 9px;
    font-weight: 800;
    margin-top: -2px;
}

.qp-ctrl-main {
    width: 64px;
    height: 64px;
    font-size: 22px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    box-shadow: 0 4px 20px rgba(139,92,246,0.4);
}

.qp-ctrl-main:hover {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    box-shadow: 0 6px 28px rgba(139,92,246,0.6);
}

.qp-ctrl-speed {
    width: 40px;
    height: 40px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255,255,255,0.08);
}

.qp-ctrl-speed:hover { background: rgba(255,255,255,0.16); }

.qp-ctrl-drive {
    width: 40px;
    height: 40px;
    font-size: 14px;
    background: rgba(255,255,255,0.08);
}

.qp-ctrl-drive:hover { background: rgba(16,185,129,0.25); color: #6ee7b7; }

/* ===== Chapters ===== */
.qp-chapters {
    border-top: 1px solid rgba(255,255,255,0.06);
}

.qp-chapters-toggle {
    width: 100%;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.qp-chapters-toggle:hover { background: rgba(255,255,255,0.04); }

.qp-chapters-toggle i:first-child { color: #a78bfa; }

.qp-chapters-count {
    margin-right: auto;
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    font-weight: 500;
}

.qp-chapters-arrow {
    transition: transform 0.3s;
    font-size: 12px;
}

.qp-chapters-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 0 16px 12px;
}

.qp-chapters-list::-webkit-scrollbar { width: 4px; }
.qp-chapters-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

.qp-chapter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.qp-chapter-item:hover { background: rgba(255,255,255,0.05); }

.qp-chapter-item.active {
    background: rgba(139,92,246,0.2);
    border-right: 3px solid #8b5cf6;
}

.qp-ch-icon { font-size: 16px; flex-shrink: 0; }
.qp-ch-label { flex: 1; color: rgba(255,255,255,0.8); }

.qp-ch-type {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
}

.qp-type-narrator  { background: rgba(59,130,246,0.2); color: #93c5fd; }
.qp-type-suspect   { background: rgba(245,158,11,0.2); color: #fcd34d; }
.qp-type-detective  { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.qp-type-witness    { background: rgba(236,72,153,0.2); color: #f9a8d4; }
.qp-type-sfx        { background: rgba(139,92,246,0.2); color: #c4b5fd; }

/* ===== Whistle Countdown Overlay ===== */
.qp-whistle-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    animation: whistleFadeIn 0.5s ease-out;
}

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

.qp-whistle-inner {
    text-align: center;
    color: #fff;
    max-width: 400px;
    padding: 40px;
}

.qp-whistle-icon {
    font-size: 72px;
    margin-bottom: 16px;
    animation: whistleBell 1s ease-in-out infinite;
}

@keyframes whistleBell {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(12deg); }
    75% { transform: rotate(-12deg); }
}

.qp-whistle-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.qp-whistle-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 24px;
    line-height: 1.6;
}

.qp-whistle-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.qp-countdown-num {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.qp-countdown-label {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.qp-whistle-btn {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.qp-whistle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(139,92,246,0.5);
}

.qp-whistle-replay {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
}

.qp-whistle-replay:hover {
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}

/* ===== Drive Mode ===== */
.qp-drive-mode {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: driveFadeIn 0.4s ease-out;
}

@keyframes driveFadeIn {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

.qp-drive-inner {
    width: 100%;
    max-width: 600px;
    padding: 40px 24px;
    text-align: center;
    color: #fff;
}

.qp-drive-close {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: background 0.2s;
}

.qp-drive-close:hover { background: rgba(255,255,255,0.2); }

/* Drive Speaker */
.qp-drive-speaker {
    margin-bottom: 24px;
}

.qp-drive-emoji {
    font-size: 96px;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 20px rgba(139,92,246,0.5));
}

.qp-drive-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

/* Drive Wave */
.qp-drive-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 40px;
    margin-bottom: 16px;
}

.qp-drive-wave span {
    width: 5px;
    height: 8px;
    background: rgba(139,92,246,0.3);
    border-radius: 3px;
}

.qp-drive-wave.active span {
    animation: waveBar 0.8s ease-in-out infinite;
    background: #a78bfa;
}

.qp-drive-wave.active span:nth-child(1) { animation-delay: 0s; }
.qp-drive-wave.active span:nth-child(2) { animation-delay: 0.12s; }
.qp-drive-wave.active span:nth-child(3) { animation-delay: 0.24s; }
.qp-drive-wave.active span:nth-child(4) { animation-delay: 0.1s; }
.qp-drive-wave.active span:nth-child(5) { animation-delay: 0.2s; }
.qp-drive-wave.active span:nth-child(6) { animation-delay: 0.08s; }
.qp-drive-wave.active span:nth-child(7) { animation-delay: 0.16s; }

/* Drive Subtitle */
.qp-drive-subtitle {
    font-size: 20px;
    line-height: 1.8;
    color: rgba(255,255,255,0.7);
    margin-bottom: 32px;
    min-height: 80px;
    direction: rtl;
    max-height: 150px;
    overflow: hidden;
}

/* Drive Progress */
.qp-drive-progress {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-bottom: 8px;
}

.qp-drive-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 4px;
    width: 0;
    transition: width 0.2s;
}

.qp-drive-time {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    font-family: monospace;
    direction: ltr;
    margin-bottom: 32px;
}

/* Drive Controls - أزرار كبيرة */
.qp-drive-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.qp-drive-ctrl {
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 80px;
    height: 80px;
    font-size: 24px;
    gap: 4px;
}

.qp-drive-ctrl span { font-size: 11px; font-weight: 700; }

.qp-drive-ctrl:hover { background: rgba(255,255,255,0.15); transform: scale(1.08); }

.qp-drive-ctrl:active { transform: scale(0.95); }

.qp-drive-play {
    width: 100px;
    height: 100px;
    font-size: 32px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 8px 40px rgba(139,92,246,0.5);
}

.qp-drive-play:hover {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    box-shadow: 0 12px 50px rgba(139,92,246,0.6);
}

.case-hashtags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.hashtag { background: var(--q-light); color: var(--q-primary); padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; text-decoration: none; transition: background 0.2s; }
.hashtag:hover { background: #dbeafe; }

.qadiyah-loading { text-align: center; padding: 60px 20px; color: var(--q-gray); }
.qadiyah-loading .spinner { width: 40px; height: 40px; border: 4px solid var(--q-border); border-top-color: var(--q-primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

.qadiyah-leaderboard { max-width: 800px; margin: 0 auto; }
.leaderboard-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--q-radius); overflow: hidden; box-shadow: var(--q-shadow); }
.leaderboard-table th { background: var(--q-dark); color: #fff; padding: 14px 16px; font-weight: 700; font-size: 14px; }
.leaderboard-table td { padding: 12px 16px; border-bottom: 1px solid var(--q-border); font-size: 14px; }
.leaderboard-table tr:hover { background: var(--q-light); }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 800; font-size: 14px; }
.rank-1 { background: #fef3c7; color: #92400e; }
.rank-2 { background: #e2e8f0; color: #475569; }
.rank-3 { background: #fed7aa; color: #9a3412; }


/* =============================================
   MANGA VIEWER - Day 4 + Day 5 Webtoon
   ============================================= */

/* Mode Toggle Tabs */
.case-mode-toggle {
    margin-bottom: 24px;
}

.case-mode-toggle .mode-tabs {
    display: flex;
    gap: 0;
    background: var(--q-gray-bg, #f1f5f9);
    border-radius: 12px;
    padding: 4px;
    width: fit-content;
}

.case-mode-toggle .mode-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    color: var(--q-muted, #64748b);
    text-decoration: none;
    transition: all 0.3s ease;
}

.case-mode-toggle .mode-tab:hover {
    color: var(--q-dark, #1e293b);
    background: rgba(255,255,255,0.5);
}

.case-mode-toggle .mode-tab.active {
    background: #fff;
    color: var(--q-primary, #3b82f6);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.panels-count-badge {
    background: var(--q-primary-light, #dbeafe);
    color: var(--q-primary, #3b82f6);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ===== Webtoon Vertical Scroll Viewer ===== */
.webtoon-viewer {
    position: relative;
    margin-bottom: 24px;
}

.webtoon-header {
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 32px;
    z-index: 100;
    flex-wrap: wrap;
}

.webtoon-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--q-dark, #1e293b);
    white-space: nowrap;
}

.webtoon-progress-bar {
    flex: 1;
    min-width: 120px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.webtoon-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--q-primary, #3b82f6), var(--q-secondary, #8b5cf6));
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

.webtoon-counter {
    font-weight: 800;
    font-size: 13px;
    color: var(--q-primary, #3b82f6);
    direction: ltr;
    white-space: nowrap;
    background: var(--q-primary-light, #dbeafe);
    padding: 4px 12px;
    border-radius: 16px;
}

/* ===== Panels Stream ===== */
.webtoon-panels-stream {
    background: #0f172a;
    padding: 0;
}

.webtoon-panel {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.webtoon-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.webtoon-panel-inner {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.webtoon-panel-img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.webtoon-panel-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    direction: ltr;
    backdrop-filter: blur(4px);
    display: flex;
    gap: 3px;
}

.webtoon-panel-label .panel-num {
    color: #60a5fa;
}

.webtoon-panel-label .panel-sep {
    color: #475569;
}

.webtoon-panel-label .panel-total {
    color: #94a3b8;
}

/* Divider between panels */
.webtoon-panel-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
}

.webtoon-panel-divider .divider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #334155;
}

.webtoon-panel-divider .divider-dot:nth-child(2) {
    width: 8px;
    height: 8px;
    background: #475569;
}

/* ===== Verdict Trigger at last panel ===== */
.webtoon-verdict-trigger {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s ease;
    padding: 60px 24px;
}

.webtoon-verdict-trigger.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.verdict-trigger-inner {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid #334155;
    border-radius: 24px;
    padding: 48px 32px;
    position: relative;
    overflow: hidden;
}

.verdict-trigger-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 70%);
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50%      { opacity: 1;   transform: translateX(-50%) scale(1.3); }
}

.verdict-trigger-bell {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
    animation: bellShake 2s ease-in-out infinite;
}

@keyframes bellShake {
    0%, 100% { transform: rotate(0deg); }
    10%      { transform: rotate(14deg); }
    20%      { transform: rotate(-14deg); }
    30%      { transform: rotate(10deg); }
    40%      { transform: rotate(-6deg); }
    50%      { transform: rotate(0deg); }
}

.verdict-trigger-inner h2 {
    color: #f1f5f9;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 12px;
}

.verdict-trigger-inner p {
    color: #94a3b8;
    font-size: 15px;
    margin: 0 0 24px;
    line-height: 1.7;
}

.btn-verdict-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--q-primary, #3b82f6), var(--q-secondary, #8b5cf6));
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(59,130,246,0.3);
}

.btn-verdict-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59,130,246,0.4);
    color: #fff;
}

.webtoon-verdict-trigger.played .verdict-trigger-inner {
    border-color: var(--q-success, #10b981);
}

.webtoon-verdict-trigger.played .btn-verdict-trigger {
    background: linear-gradient(135deg, var(--q-success, #10b981), #059669);
    box-shadow: 0 4px 20px rgba(16,185,129,0.3);
}

/* Scroll to top button */
.webtoon-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--q-primary, #3b82f6);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.webtoon-scroll-top:hover {
    background: var(--q-primary-dark, #2563eb);
    transform: translateY(-2px);
}

/* Fullscreen Overlay (kept from Day 4) */
.manga-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
}

.manga-fs-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    line-height: 1;
}

.manga-fs-close:hover {
    background: rgba(255,255,255,0.3);
}

.manga-fs-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.manga-fs-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.manga-fs-nav:hover {
    background: rgba(255,255,255,0.3);
}

.manga-fs-prev { right: 16px; }
.manga-fs-next { left: 16px; }

.manga-fs-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    padding: 6px 16px;
    border-radius: 20px;
    direction: ltr;
}


/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .case-hero { padding: 40px 16px 36px; }
    .case-hero-title { font-size: 24px; }
    .case-hero-meta { gap: 8px; }
    .case-content-wrapper,
    .archive-content-wrapper { padding: 0 12px 24px; }
    .user-level-bar { flex-direction: column; text-align: center; }
    .suspects-cards-grid,
    .archive-cases-grid,
    .related-cases-grid { grid-template-columns: 1fr; }
    .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .mode-stats-grid { grid-template-columns: repeat(3, 1fr); }
    .archive-mode-tabs { gap: 4px; padding: 6px; }
    .archive-mode-tab { padding: 10px 16px; font-size: 13px; }
    .archive-filters-bar { flex-direction: column; gap: 12px; }
    .archive-stats-footer { flex-direction: column; gap: 20px; }
    .verdict-modal { padding: 24px; }
    .result-big-emoji { font-size: 56px; }
    .result-heading { font-size: 22px; }
    .archive-hero-content h1 { font-size: 26px; }
    .qadiyah-game { padding: 12px; }
    .qadiyah-header h1 { font-size: 28px; }
    .qadiyah-cases-grid,
    .suspects-grid { grid-template-columns: 1fr; }
    .case-info-grid { grid-template-columns: repeat(2, 1fr); }
    .qadiyah-mode-tabs { gap: 8px; }
    .mode-tab { padding: 8px 16px; font-size: 14px; }
    .qadiyah-cases-embed .embed-cases-grid { grid-template-columns: 1fr; }
    .profile-header-card { flex-direction: column; text-align: center; }
    /* Manga responsive */
    .webtoon-header { 
        top: 0; 
        border-radius: 0; 
        padding: 12px 16px;
        gap: 10px;
    }
    .webtoon-header h2 { font-size: 16px; }
    .webtoon-panel-inner { max-width: 100%; }
    .verdict-trigger-inner { padding: 36px 20px; }
    .verdict-trigger-inner h2 { font-size: 22px; }
    .btn-verdict-trigger { padding: 12px 28px; font-size: 15px; }
    .case-mode-toggle .mode-tabs { width: 100%; }
    .case-mode-toggle .mode-tab { flex: 1; justify-content: center; }
    .webtoon-scroll-top { width: 40px; height: 40px; bottom: 16px; right: 16px; }
    /* Interactive Audio Player responsive */
    .qp-speaker-stage { padding: 24px 16px 16px; gap: 12px; }
    .qp-speaker-avatar { width: 52px; height: 52px; }
    .qp-speaker-emoji { font-size: 26px; }
    .qp-speaker-name { font-size: 16px; }
    .qp-subtitles { padding: 12px 16px; min-height: 50px; }
    .qp-subtitle-text { font-size: 14px; }
    .qp-timeline-wrapper { padding: 16px 16px 6px; }
    .qp-timeline-markers { left: 16px; right: 16px; }
    .qp-controls { padding: 12px 16px 16px; gap: 8px; }
    .qp-ctrl-main { width: 56px; height: 56px; font-size: 20px; }
    .qp-ctrl-skip { width: 38px; height: 38px; font-size: 14px; }
    .qp-ctrl-speed { width: 36px; height: 36px; font-size: 11px; }
    .qp-ctrl-drive { width: 36px; height: 36px; font-size: 12px; }
    .qp-chapters-toggle { padding: 12px 16px; font-size: 13px; }
    .qp-chapters-list { padding: 0 12px 10px; max-height: 200px; }
    .qp-chapter-item { padding: 7px 10px; font-size: 12px; }
    /* Drive mode responsive */
    .qp-drive-inner { padding: 32px 16px; }
    .qp-drive-emoji { font-size: 72px; }
    .qp-drive-name { font-size: 20px; }
    .qp-drive-subtitle { font-size: 18px; }
    .qp-drive-ctrl { width: 64px; height: 64px; font-size: 20px; }
    .qp-drive-play { width: 80px; height: 80px; font-size: 28px; }
    .qp-drive-controls { gap: 16px; }
    /* Whistle responsive */
    .qp-whistle-icon { font-size: 56px; }
    .qp-whistle-title { font-size: 22px; }
    .qp-countdown-num { font-size: 48px; }
}

@media (max-width: 480px) {
    .case-hero-title { font-size: 20px; }
    .case-hero-meta .meta-item { font-size: 12px; }
    .profile-stats-grid { grid-template-columns: 1fr; }
    .mode-stats-grid { grid-template-columns: 1fr; }
    .archive-user-stats { gap: 16px; }
    .verdict-trigger-bell { font-size: 40px; }
    .webtoon-counter { font-size: 11px; padding: 3px 8px; }
}

/* =============================================
   Admin Quick Edit Panel (frontend)
   ============================================= */
.qadiyah-qe-fab {
    position: fixed;
    bottom: 28px;
    left: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 50%, #4f46e5 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 12px 20px 12px 16px;
    font-size: 14px;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45), 0 0 0 0 rgba(124, 58, 237, 0.4);
    z-index: 2147483646;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    animation: qe-fab-pulse 2.5s ease-in-out infinite;
    direction: rtl;
    outline: none;
}
.qadiyah-qe-fab-icon {
    font-size: 20px;
    line-height: 1;
}
.qadiyah-qe-fab-label {
    white-space: nowrap;
    letter-spacing: -0.3px;
}
.qadiyah-qe-fab:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 36px rgba(99, 102, 241, 0.55), 0 0 0 4px rgba(124, 58, 237, 0.15);
    background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 50%, #4338ca 100%);
    animation: none;
}
.qadiyah-qe-fab:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}
.qadiyah-qe-fab--hidden {
    transform: scale(0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
@keyframes qe-fab-pulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45), 0 0 0 0 rgba(124, 58, 237, 0.4); }
    50% { box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45), 0 0 0 8px rgba(124, 58, 237, 0); }
}

.qadiyah-qe-panel {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 420px;
    max-height: 80vh;
    background: #1a1a2e;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    z-index: 2147483647;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(139, 92, 246, 0.1);
    overflow: hidden;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    animation: qe-panel-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes qe-panel-in {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.qadiyah-qe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}
.qadiyah-qe-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}
.qadiyah-qe-close-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 18px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.qadiyah-qe-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.qadiyah-qe-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}

.qadiyah-qe-info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #e2e8f0;
}
.qadiyah-qe-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #94a3b8;
}

.qadiyah-qe-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #c4b5fd;
    margin-bottom: 6px;
}

.qadiyah-qe-textarea {
    width: 100%;
    background: #16213e;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: 'Tajawal', sans-serif;
    color: #e2e8f0;
    resize: vertical;
    min-height: 100px;
    direction: rtl;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.qadiyah-qe-textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.qadiyah-qe-textarea::placeholder {
    color: #64748b;
    font-size: 12px;
}

.qadiyah-qe-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.qadiyah-qe-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    flex: 1;
}
.qadiyah-qe-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.qadiyah-qe-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.qadiyah-qe-result {
    margin-top: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #a7f3d0;
    line-height: 1.7;
}

.qadiyah-qe-error {
    margin-top: 12px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #fca5a5;
}

.qadiyah-qe-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
}
.qadiyah-qe-spinner.is-active {
    display: inline-block;
    animation: qe-spin 0.7s linear infinite;
}
@keyframes qe-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .qadiyah-qe-panel {
        width: calc(100vw - 24px);
        left: 12px;
        bottom: 12px;
        max-height: 85vh;
    }
    .qadiyah-qe-fab {
        bottom: 16px;
        left: 16px;
        padding: 10px 14px 10px 12px;
        font-size: 13px;
    }
    .qadiyah-qe-fab-icon {
        font-size: 18px;
    }
}

/* ══════════════════════════════════════════════════════════════
   💡 Hints Section
   ══════════════════════════════════════════════════════════════ */
.hints-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05), rgba(255, 152, 0, 0.08));
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 16px;
}
.hints-section .section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.2rem;
}
.hints-section .section-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #f0a500;
}
.hints-count {
    margin-right: auto;
    background: rgba(255, 193, 7, 0.15);
    color: #f0a500;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.hints-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hint-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 193, 7, 0.12);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    transition: all 0.3s ease;
}
.hint-item:hover {
    border-color: rgba(255, 193, 7, 0.3);
    background: rgba(255, 193, 7, 0.04);
}
.hint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.hint-number {
    font-weight: 700;
    color: #f0a500;
    font-size: 0.95rem;
}
.hint-cost {
    background: rgba(244, 67, 54, 0.12);
    color: #ef5350;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}
.hint-text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 8px 0 0;
    padding: 10px 14px;
    background: rgba(255, 193, 7, 0.06);
    border-radius: 8px;
    border-right: 3px solid #f0a500;
    animation: hintReveal 0.4s ease-out;
}
@keyframes hintReveal {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.hint-reveal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 152, 0, 0.2));
    color: #f0a500;
    border: 1px solid rgba(255, 193, 7, 0.25);
    padding: 8px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
}
.hint-reveal-btn:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.25), rgba(255, 152, 0, 0.3));
    border-color: rgba(255, 193, 7, 0.5);
    transform: translateY(-1px);
}
.hint-reveal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.hint-reveal-btn .fa-spinner {
    color: #f0a500;
}
