/* assets/css/hizli-okuma/hr-engine.css */
/* ============================================================
   KRİTİK LAYOUT — tek tanım
   ============================================================ */
.hr-app {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    width: 100% !important;
    background: #f7faf7 !important;
    overflow: hidden !important;
    position: relative !important;
}

.hr-topbar {
    flex-shrink: 0 !important;
    min-height: 56px !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 10px 18px !important;
    background: #1a1c24 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    z-index: 10 !important;
}

.hr-viewport {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    display: block !important;   /* flex DEĞİL — alt alta metin akışı için */
    padding: 40px 8vw !important;
    background: #f0f8f0 !important;
    scroll-behavior: smooth !important;
}

.hr-text-layer {
    width: 100% !important;
    max-width: 900px !important;
    text-align: center !important;
    line-height: 1.6 !important;
    padding: 20px !important;
    margin: 0 auto !important;
}

.hr-bottombar {
    flex-shrink: 0 !important;
    min-height: 56px !important;
}

.hr-progress-bar {
    flex-shrink: 0 !important;
    height: 4px !important;
    background: #e9ecef !important;
    overflow: hidden !important;
}

/* ============================================================
   BULANIK MOD — her pencereye ayrı blur (aktif net görünür)
   ============================================================ */
.hr-mode-bulanik .hr-window {
    filter: blur(3px);
    opacity: 0.55;
    transition: filter 0.2s ease, opacity 0.2s ease, background 0.18s ease, transform 0.18s ease;
    border-radius: 5px;
    padding: 2px 5px;
    display: inline-block;
    margin: 0 1px;
}
.hr-mode-bulanik .hr-window.hr-active {
    filter: blur(0) !important;
    opacity: 1 !important;
    background: #fff8c5;
    box-shadow: 0 2px 12px rgba(255, 193, 7, 0.5);
    transform: scale(1.06);
}

/* ============================================================
   NET MOD — tüm metin NET, sadece aktif pencere vurgulu
   ============================================================ */
.hr-mode-net .hr-window {
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    border-radius: 5px;
    padding: 2px 5px;
    display: inline-block;
    margin: 0 1px;
    color: #495057;
}
.hr-mode-net .hr-window.hr-active {
    background: linear-gradient(180deg, #ffe066 0%, #ffc107 100%);
    color: #000 !important;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.45);
    transform: scale(1.08);
}

/* ============================================================
   TAM MOD — sadece aktif pencere
   ============================================================ */
.hr-mode-tam {
    filter: none;
}
.hr-mode-tam .hr-window {
    display: inline-block;
    padding: 20px 30px;
    min-height: 80px;
    line-height: 1.5;
}
.hr-mode-tam .hr-slide-in {
    animation: hr-slide-in 0.22s ease-out;
}
@keyframes hr-slide-in {
    from { opacity: 0.3; transform: translateX(30px); }
    to   { opacity: 1;   transform: translateX(0); }
}

/* PROGRESS */
.hr-progress-bar {
    height: 4px;
    background: #e9ecef;
    overflow: hidden;
}
.hr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #10b981);
    transition: width 0.15s linear;
}

/* ALT BAR */
.hr-bottombar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #1a1c24;
    flex-wrap: wrap;
}
.hr-btn {
    background: #2c2f3a;
    color: #e5e7eb;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.18s;
}
.hr-btn:hover:not(:disabled) { background: #3a3f4f; transform: translateY(-1px); }
.hr-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.hr-btn-primary { background: #0d6efd; color: #fff; }
.hr-btn-primary:hover:not(:disabled) { background: #0b5ed7; }
.hr-btn-danger { background: #dc3545; color: #fff; }
.hr-btn-danger:hover:not(:disabled) { background: #b02a37; }
.hr-btn-ghost { background: transparent; border: 1.5px solid #dee2e6; color: #495057; width: 100%; }

.hr-stats {
    margin-left: auto;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    display: flex;
    gap: 18px;
}

/* MODAL */
.hr-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 999;
}
.hr-modal {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.hr-modal h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; color: #0d6efd; }
.hr-report-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.hr-report-grid > div {
    text-align: center;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 12px;
}
.hr-report-grid strong { display: block; font-size: 1.4rem; color: #10b981; }
.hr-report-grid span { font-size: 0.78rem; color: #6c757d; font-weight: 600; }
.hr-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
/* ============================================================
   EK — ÜST BAR (geri, başlık, canlı hız)
   ============================================================ */
.hr-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,0.08) !important;
    color: #e5e7eb !important;
    text-decoration: none !important;
    transition: background 0.18s, color 0.18s !important;
    flex-shrink: 0 !important;
}
.hr-back:hover { background: rgba(255,255,255,0.18) !important; color: #fff !important; }

.hr-title {
    flex: 1 1 auto !important;
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    line-height: 1.2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-family: 'Nunito', system-ui, sans-serif !important;
}

.hr-live {
    display: flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    color: #fbbf24 !important;
    font-family: 'Nunito', system-ui, sans-serif !important;
    flex-shrink: 0 !important;
}
.hr-live > span {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    color: #fbbf24 !important;
}
.hr-live > small {
    font-size: 0.72rem !important;
    color: rgba(255,255,255,0.65) !important;
    font-weight: 600 !important;
}

/* ============================================================
   EK — AYAR PANELİ (sağdan açılır çekmece) ⚡ EN KRİTİK
   ============================================================ */
.hr-panel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 340px !important;
    max-width: 92vw !important;
    height: 100vh !important;
    background: #ffffff !important;
    box-shadow: -8px 0 32px rgba(0,0,0,0.18) !important;
    padding: 22px 20px 26px !important;
    overflow-y: auto !important;
    transform: translateX(105%) !important;
    transition: transform 0.30s cubic-bezier(.4,0,.2,1) !important;
    z-index: 100 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}
.hr-panel.hr-open {
    transform: translateX(0) !important;
}
.hr-panel::-webkit-scrollbar { width: 6px; }
.hr-panel::-webkit-scrollbar-thumb { background: #cfd6cc; border-radius: 3px; }

.hr-panel h3 {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #1a1c24 !important;
    margin: 0 0 18px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid #e9ecef !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-family: 'Nunito', system-ui, sans-serif !important;
}

/* Form alanları */
.hr-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
}
.hr-field > label,
.hr-field > .form-group > label {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #495057 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    font-family: 'Nunito', system-ui, sans-serif !important;
}
.hr-field > input,
.hr-field > select,
.hr-field > textarea,
.hr-field > .form-control {
    width: 100% !important;
    padding: 9px 12px !important;
    border: 1.5px solid #dee2e6 !important;
    border-radius: 8px !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: #1a1c24 !important;
    background: #fff !important;
    outline: none !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
    box-sizing: border-box !important;
    font-family: 'Nunito', system-ui, sans-serif !important;
}
.hr-field > input:focus,
.hr-field > select:focus,
.hr-field > textarea:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 4px rgba(13,110,253,0.12) !important;
}
.hr-field > input[type="color"] {
    padding: 4px !important;
    height: 40px !important;
    cursor: pointer !important;
}
.hr-field > input[type="range"] {
    padding: 0 !important;
    height: 6px !important;
    background: #e9ecef !important;
    border: none !important;
    accent-color: #0d6efd !important;
    cursor: pointer !important;
}

/* Yatay form satırı */
.hr-field-row {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
}
.hr-field-row > .hr-field {
    flex: 1 !important;
    margin-bottom: 0 !important;
}

/* Panel içi kapatma butonu */
.hr-panel .hr-btn-ghost {
    margin-top: auto !important;
    padding: 10px 18px !important;
    background: transparent !important;
    border: 1.5px solid #dee2e6 !important;
    color: #495057 !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.18s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-family: 'Nunito', system-ui, sans-serif !important;
}
.hr-panel .hr-btn-ghost:hover {
    background: #f8f9fa !important;
    border-color: #adb5bd !important;
}

/* Panel dışı kapatma butonu (eski sayfalar için) */
.hr-btn-ghost {
    padding: 10px 18px !important;
    background: transparent !important;
    border: 1.5px solid #dee2e6 !important;
    color: #495057 !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.18s !important;
}
.hr-btn-ghost:hover {
    background: #f8f9fa !important;
    border-color: #adb5bd !important;
}

/* ============================================================
   EK — METİN KATMANI
   ============================================================ */
.hr-text-wrap {
    text-align: justify !important;
    line-height: 2.1 !important;
    transition: font-family 0.2s !important;
}
.hr-text-wrap.hr-mode-tam {
    text-align: center !important;
    line-height: 1.4 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 60vh !important;
}

/* Yükleniyor */
.hr-loading {
    text-align: center !important;
    padding: 60px 20px !important;
    color: #6c757d !important;
    font-weight: 600 !important;
    font-family: 'Nunito', system-ui, sans-serif !important;
}

/* ============================================================
   EK — UFAK RÖTUŞLAR
   ============================================================ */
.hr-topbar .hr-btn {
    padding: 6px 10px !important;
    font-size: 1rem !important;
    line-height: 1 !important;
}

/* Bootstrap uyumluluğu — mt-2, me-1, me-2 gibi sınıflar */
.hr-panel .mt-2 { margin-top: 8px !important; }
.hr-panel .me-1 { margin-right: 4px !important; }
.hr-panel .me-2 { margin-right: 8px !important; }
.hr-panel .small { font-size: 0.78rem !important; }
.hr-panel .text-muted { color: #6c757d !important; }
.hr-panel .text-end { text-align: right !important; }
.hr-panel .form-control {
    padding: 9px 12px !important;
    border: 1.5px solid #dee2e6 !important;
    border-radius: 8px !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
}

/* ============================================================
   EK — RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .hr-panel {
        width: 100% !important;
        max-width: 100% !important;
    }
    .hr-text-layer {
        padding: 12px !important;
    }
    .hr-viewport {
        padding: 24px 4vw !important;
    }
    .hr-title { font-size: 0.92rem !important; }
    .hr-live > span { font-size: 1.15rem !important; }
}