/**
 * assets/quiz.css
 * Quiz Bankası — Frontend test alanı stilleri
 * Temiz, modern, mobil uyumlu tasarım
 */

/* ============================================================
   TEMEL WRAPPER
   ============================================================ */
.qb-wrapper {
    max-width: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    line-height: 1.6;
}

.qb-ekran { animation: qb-fade-in .25s ease; }

@keyframes qb-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   EKRAN 1: FİLTRE EKRANI
   ============================================================ */
.qb-baslik-alani {
    text-align: center;
    padding: 32px 20px 24px;
}
.qb-ana-baslik {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a2e;
}
.qb-alt-baslik {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.qb-filtre-form {
    background: #fff;
    border: 1px solid #e8e8f0;
    border-radius: 16px;
    padding: 28px 32px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}

.qb-filtre-grup {
    margin-bottom: 20px;
}
.qb-filtre-grup:last-child { margin-bottom: 0; }

.qb-filtre-etiket {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.qb-zorunlu   { color: #e53e3e; }
.qb-opsiyonel { color: #999; font-weight: 400; font-size: 12px; text-transform: none; letter-spacing: 0; }

.qb-select {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    border: 2px solid #e8e8f0;
    border-radius: 10px;
    background: #fafafa;
    color: #1a1a2e;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.qb-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
    background-color: #fff;
}
.qb-select:disabled {
    opacity: .55;
    cursor: not-allowed;
    background-color: #f3f3f3;
}

.qb-buton-grup { text-align: center; margin-top: 10px; }

.qb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.qb-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.qb-btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79,70,229,.35);
}
.qb-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79,70,229,.45);
}
.qb-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}
.qb-btn-secondary:hover { background: #e9ecef; }

.qb-btn-outline {
    background: transparent;
    color: #4f46e5;
    border: 2px solid #4f46e5;
}
.qb-btn-outline:hover { background: #f0f0ff; }

.qb-btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.qb-btn-ikon { font-size: 14px; }

/* ============================================================
   YÜKLENİYOR
   ============================================================ */
.qb-yukleniyor {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}
.qb-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e8e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: qb-spin .7s linear infinite;
    margin: 0 auto 16px;
}
@keyframes qb-spin { to { transform: rotate(360deg); } }

/* ============================================================
   EKRAN 2: TEST EKRANI
   ============================================================ */
.qb-test-ust-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 10px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
.qb-sure-gosterge {
    background: #f3f4f6;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    color: #374151;
}

.qb-progress-bar-container {
    height: 6px;
    background: #e8e8f0;
    border-radius: 6px;
    margin-bottom: 24px;
    overflow: hidden;
}
.qb-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 6px;
    transition: width .4s cubic-bezier(.4,0,.2,1);
}

/* ─── SORU KARTI ─── */
.qb-soru-kart {
    background: #fff;
    border: 1px solid #e8e8f0;
    border-radius: 16px;
    padding: 28px 32px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}

.qb-soru-metin {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 24px;
    color: #1a1a2e;
}

/* ─── ŞIKLAR ─── */
.qb-siklar { display: flex; flex-direction: column; gap: 10px; }

.qb-sik {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid #e8e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all .18s;
    background: #fafafa;
}
.qb-sik:hover {
    border-color: #c7d2fe;
    background: #f0f0ff;
    transform: translateX(3px);
}

.qb-sik-harf {
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8f0;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    flex-shrink: 0;
    transition: all .18s;
}

.qb-sik-metin {
    font-size: 15px;
    line-height: 1.5;
    color: #374151;
    align-self: center;
}

/* Seçili şık */
.qb-sik.qb-secili {
    border-color: #4f46e5;
    background: #eef2ff;
}
.qb-sik.qb-secili .qb-sik-harf {
    background: #4f46e5;
    color: #fff;
}

/* ============================================================
   EKRAN 3: SONUÇ EKRANI
   ============================================================ */
.qb-sonuc-kart {
    background: #fff;
    border: 1px solid #e8e8f0;
    border-radius: 16px;
    padding: 36px 32px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    margin-bottom: 24px;
}

.qb-sonuc-baslik {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1a1a2e;
}
.qb-sonuc-sure {
    color: #888;
    font-size: 14px;
    margin-bottom: 28px;
}

.qb-sonuc-ozet {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.qb-sonuc-rakam {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 28px;
    border-radius: 12px;
    min-width: 100px;
}
.qb-rakam-sayi {
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}
.qb-rakam-label { font-size: 13px; font-weight: 600; }

.qb-dogru  { background: #dcfce7; color: #166534; }
.qb-yanlis { background: #fee2e2; color: #991b1b; }
.qb-bos    { background: #f3f4f6; color: #374151; }

.qb-sonuc-yuzde { margin-bottom: 28px; }
.qb-yuzde-bar {
    height: 10px;
    background: #e8e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.qb-yuzde-dolu {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 10px;
    transition: width .8s cubic-bezier(.4,0,.2,1);
}
.qb-yuzde-text { font-size: 15px; font-weight: 700; color: #166534; }

.qb-sonuc-butonlar {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ─── SORU İNCELEME ─── */
#qb-inceleme-bolumu { margin-top: 24px; }
#qb-inceleme-bolumu h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #1a1a2e;
    text-align: left;
}

.qb-inceleme-soru {
    background: #fff;
    border-left: 4px solid #e8e8f0;
    border-radius: 0 10px 10px 0;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    text-align: left;
}

.qb-inceleme-dogru  { border-left-color: #22c55e; background: #f0fdf4; }
.qb-inceleme-yanlis { border-left-color: #ef4444; background: #fff5f5; }
.qb-inceleme-bos    { border-left-color: #94a3b8; background: #f8fafc; }

.qb-inceleme-baslik {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.qb-inceleme-ikon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.qb-inceleme-dogru  .qb-inceleme-ikon { background: #22c55e; color: #fff; }
.qb-inceleme-yanlis .qb-inceleme-ikon { background: #ef4444; color: #fff; }
.qb-inceleme-bos    .qb-inceleme-ikon { background: #94a3b8; color: #fff; }

.qb-inceleme-no { font-size: 13px; color: #666; font-weight: 600; }
.qb-inceleme-metin { font-size: 15px; color: #1a1a2e; margin-bottom: 12px; line-height: 1.6; }

.qb-inceleme-siklar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }

.qb-inceleme-sik {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f9f9f9;
    font-size: 14px;
}
.qb-dogru-sik  { background: #dcfce7; font-weight: 600; }
.qb-yanlis-sik { background: #fee2e2; text-decoration: line-through; }

.qb-inceleme-sik .qb-sik-harf {
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8f0;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    flex-shrink: 0;
}
.qb-dogru-sik  .qb-sik-harf { background: #22c55e; color: #fff; }
.qb-yanlis-sik .qb-sik-harf { background: #ef4444; color: #fff; }

.qb-aciklama {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    font-size: 13px;
    color: #78350f;
    line-height: 1.6;
}

/* ============================================================
   MOBİL UYUM
   ============================================================ */
@media (max-width: 600px) {
    .qb-filtre-form  { padding: 20px; }
    .qb-soru-kart    { padding: 20px; }
    .qb-sonuc-kart   { padding: 24px 20px; }
    .qb-sonuc-ozet   { gap: 12px; }
    .qb-sonuc-rakam  { padding: 14px 20px; min-width: 80px; }
    .qb-rakam-sayi   { font-size: 30px; }
    .qb-sonuc-butonlar { flex-direction: column; align-items: stretch; }
    .qb-btn          { justify-content: center; }
    .qb-soru-metin   { font-size: 15px; }
}
