/**
 * Hadi Oku — Masaüstü Uygulaması & Kısayol Merkezi Modal Stilleri
 * Modern Glassmorphism, 3D Kitap Sunumu, Çoklu Kitap Kısayol Desteği
 */

.desktop-app-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(3, 7, 18, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.desktop-app-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.desktop-app-modal-card {
    background: linear-gradient(160deg, #0b1329 0%, #111e38 50%, #0a1122 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 22px;
    max-width: 660px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: #fff;
    padding: 24px;
    position: relative;
    box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.9), 0 0 35px rgba(14, 165, 233, 0.22);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transform: scale(0.93) translateY(18px);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.desktop-app-modal-card::-webkit-scrollbar {
    width: 6px;
}
.desktop-app-modal-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}
.desktop-app-modal-card::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 10px;
}
.desktop-app-modal-card::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.55);
}

.desktop-app-modal-overlay.open .desktop-app-modal-card {
    transform: scale(1) translateY(0);
}

.modal-close-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}
.modal-close-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: rotate(90deg);
}

.modal-header-section {
    text-align: center;
    margin-bottom: 20px;
    padding-right: 32px;
    padding-left: 32px;
}
.modal-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.modal-header-section h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 6px 0;
    line-height: 1.3;
}
.modal-header-section p {
    font-size: 0.84rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.45;
}

/* 🌟 ÖNE ÇIKAN KİTAP (ACTIVE BOOK HERO) */
.featured-book-hero {
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.featured-book-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, transparent 60%);
    pointer-events: none;
}
.featured-book-cover-wrap {
    flex-shrink: 0;
    position: relative;
}
.featured-book-cover {
    width: 90px;
    height: 128px;
    border-radius: 8px;
    object-fit: fill;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.2);
    transform: perspective(600px) rotateY(-8deg);
    transition: transform 0.3s ease;
}
.featured-book-cover:hover {
    transform: perspective(600px) rotateY(0deg) scale(1.04);
}
.featured-book-details {
    flex-grow: 1;
    min-width: 0;
}
.featured-book-details h3 {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.35;
}
.featured-badge-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.hero-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.hero-tag.paid {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}
.hero-tag.demo {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.hero-tag.tech {
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.featured-book-details p {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.45;
}

/* 🚀 TEK VE NET KURULUM BUTONU (SINGLE INSTALL BUTTON) */
.btn-single-install {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff !important;
    padding: 16px 24px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.05rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.45);
    cursor: pointer;
    border: none;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 10px 0 18px;
    text-decoration: none !important;
}
.btn-single-install:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.65);
}

.install-options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}
.install-card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-radius: 14px;
    text-decoration: none !important;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    width: 100%;
}
.install-card-btn:hover {
    transform: translateY(-2px);
}
.install-btn-left {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}
.install-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.install-btn-text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;
}
.install-btn-text span {
    display: block;
    font-size: 0.74rem;
    margin-top: 2px;
    opacity: 0.85;
}
.install-btn-arrow {
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-left: 10px;
}

/* 1. PWA Standalone (Primary Green) */
.install-pwa-primary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
.install-pwa-primary:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.55);
}
.install-pwa-primary .install-btn-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 2. Windows Özel İkonlu (.cmd) */
.install-windows-cmd {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(56, 189, 248, 0.45);
    color: #e0f2fe !important;
}
.install-windows-cmd:hover {
    background: rgba(14, 165, 233, 0.24);
    border-color: #38bdf8;
    box-shadow: 0 8px 22px rgba(14, 165, 233, 0.35);
}
.install-windows-cmd .install-btn-icon {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

/* 3. Standart .URL Kısayolu */
.install-url-shortcut {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    color: #cbd5e1 !important;
}
.install-url-shortcut:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff !important;
}
.install-url-shortcut .install-btn-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

/* 📚 TÜM KİTAPLAR (AYRI AYRI YÜKLEME) LİSTESİ */
.all-books-install-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
    margin-top: 18px;
}
.all-books-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.all-books-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 7px;
}
.all-books-header span.badge {
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 2px 7px;
    border-radius: 10px;
}

.all-books-scroll-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}
.all-books-scroll-list::-webkit-scrollbar {
    width: 5px;
}
.all-books-scroll-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.book-install-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 12px;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.book-install-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.35);
}
.book-row-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-grow: 1;
}
.book-row-thumb {
    width: 38px;
    height: 52px;
    border-radius: 5px;
    object-fit: fill;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.book-row-info {
    min-width: 0;
}
.book-row-info strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.book-row-info small {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}
.book-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.btn-mini-install {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-mini-install.cmd {
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}
.btn-mini-install.cmd:hover {
    background: rgba(14, 165, 233, 0.4);
    color: #fff;
}
.btn-mini-install.read {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}
.btn-mini-install.read:hover {
    background: rgba(16, 185, 129, 0.4);
    color: #fff;
}

/* REHBER & BAŞARI BİLDİRİMİ */
.modal-guide-box {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.76rem;
    color: #cbd5e1;
    line-height: 1.5;
}
.modal-guide-box strong {
    color: #38bdf8;
}
.modal-guide-success {
    background: rgba(16, 185, 129, 0.16);
    border: 1.5px solid #10b981;
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 14px;
    display: none;
    text-align: left;
}
.modal-guide-success.show {
    display: block;
    animation: fadeInModalGuide 0.3s ease;
}
@keyframes fadeInModalGuide {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-footer-notes {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: #94a3b8;
}

@media (max-width: 640px) {
    .desktop-app-modal-card {
        padding: 18px 14px;
    }
    .featured-book-hero {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .featured-badge-row {
        justify-content: center;
    }
    .install-btn-text strong {
        font-size: 0.85rem;
    }
    .book-install-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .book-row-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
