/* ألغاز الترتيب — Sequence Feed */
.qseq, .qseq * { box-sizing: border-box; }
.qseq {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    color: #f5f5f5;
    font-family: 'Tajawal', sans-serif;
    overflow: hidden;
}
.qseq-container {
    height: 100%;
    width: 100%;
    position: relative;
}
.qseq-card {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 90px;
    opacity: 0;
    transform: translateY(100%);
    transition: transform .35s ease, opacity .35s ease;
    pointer-events: none;
}
.qseq-card.active { opacity: 1; transform: translateY(0); pointer-events: auto; z-index: 2; }
.qseq-card.prev { opacity: 0; transform: translateY(-100%); z-index: 1; }

.qseq-card-inner {
    width: 100%;
    max-width: 440px;
    max-height: 100%;
    overflow-y: auto;
    background: linear-gradient(160deg, #14141f 0%, #0f0f16 100%);
    border: 1px solid #2a2a3a;
    border-radius: 20px;
    padding: 20px 18px 18px;
    scrollbar-width: thin;
}

.qseq-emoji { font-size: 36px; text-align: center; margin-bottom: 8px; }
.qseq-type-badge {
    display: inline-block;
    margin: 0 auto 12px;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #fbbf24;
    font-weight: 700;
}
.qseq-scenario {
    font-size: 15px;
    line-height: 1.75;
    color: #e5e7eb;
    margin-bottom: 14px;
    white-space: pre-wrap;
}
.qseq-rules {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.qseq-rules-title {
    font-size: 13px;
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: 8px;
}
.qseq-rules ol {
    margin: 0;
    padding-right: 18px;
    font-size: 13px;
    line-height: 1.65;
    color: #d1d5db;
}
.qseq-slots-label {
    font-size: 13px;
    font-weight: 700;
    color: #a78bfa;
    margin-bottom: 8px;
}
.qseq-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.qseq-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 12px;
    border: 2px dashed #3f3f55;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.qseq-slot.filled {
    border-style: solid;
    border-color: #6c5ce7;
    background: rgba(108, 92, 231, 0.12);
}
.qseq-slot-num {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    background: #2a2a3a;
    color: #a78bfa;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qseq-slot-text { flex: 1; font-size: 15px; font-weight: 600; }
.qseq-slot-empty { flex: 1; font-size: 13px; color: #6b7280; }

.qseq-pool-label {
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
}
.qseq-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.qseq-chip {
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    background: #1e1e2e;
    color: #f3f4f6;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, background .15s, opacity .15s;
}
.qseq-chip:hover { background: #2d2d44; transform: translateY(-1px); }
.qseq-chip.used { opacity: 0.35; pointer-events: none; }

.qseq-controls { display: flex; gap: 8px; }
.qseq-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}
.qseq-btn-check {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
}
.qseq-btn-check:disabled { opacity: 0.45; cursor: not-allowed; }
.qseq-btn-reset {
    background: #1e1e2e;
    color: #cbd5e1;
    flex: 0 0 auto;
    min-width: 72px;
}

.qseq-result {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
}
.qseq-result.ok { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.4); color: #86efac; }
.qseq-result.fail { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; }

.qseq-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    z-index: 50;
}
.qseq-loader.hidden { display: none; }
.qseq-loader-icon { font-size: 48px; margin-bottom: 12px; animation: qseqPulse 1.2s ease infinite; }
@keyframes qseqPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }
.qseq-loader-text { color: #9ca3af; font-size: 15px; }

.qseq-swipe-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 12px;
    z-index: 10;
    animation: qseqBounce 2s ease infinite;
}
@keyframes qseqBounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-6px)} }

.qseq-actions {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 20;
}
.qseq-action-btn {
    background: rgba(20,20,30,0.85);
    border: 1px solid #2a2a3a;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.qseq-action-count { font-size: 10px; color: #9ca3af; }
.qseq-like.active { color: #f472b6; border-color: #f472b6; }

.qseq-progress {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    background: rgba(0,0,0,0.5);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: #d1d5db;
}

html.qseq-embedded .qseq-swipe-hint,
html.qseq-embedded .qseq-progress { display: none !important; }
html.qseq-embedded .qseq-actions { display: none !important; }
