/* Modal açıkken body scroll'unu engelle */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

#petition-output {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    letter-spacing: 0.2px;
}

/* Dilekçe önizleme başlıkları bold */
/* Dilekçe önizleme başlıkları bold */
#petition-preview h1,
#petition-preview h2,
#petition-preview h3,
#petition-preview h4,
#petition-preview h5,
#petition-preview h6,
.petition h1,
.petition h2,
.petition h3,
.petition h4,
.petition h5,
.petition h6 {
    font-weight: bold !important;
}

/* Mahkeme başlığı (üst başlık) özellikle bold */
#petition-preview h1:first-child,
.petition h1:first-child,
#petition-preview > h1,
.petition > h1 {
    font-weight: bold !important;
    font-size: 12pt !important;
}

/* Normal Mod ve Gelişmiş Mod için grid düzeni */
#petition-normal-mode,
#petition-advanced-mode {
    display: contents;
}

#petition-normal-mode.hidden,
#petition-advanced-mode.hidden {
    display: none;
}

/* Gelişmiş Mod - Sadece buton rengi mavi, diğer alanlar normal mod ile aynı */

/* Normal Mod'da dosya yükleme alanını gizle */
#petition-files-container-normal {
    display: none;
}

.animate-fadeSlideDown {
    animation: fadeSlideDown 0.3s ease forwards;
}

@keyframes fadeSlideDown {
    0% { opacity: 0; transform: translateY(-6px); }
    100% { opacity: 1; transform: translateY(0); }
}
/* Tasarımınızdaki tüm harika stiller burada yer alıyor... */
body { font-family: 'Lato', sans-serif; background-color: #000000; color: #EAEAEA; }
.font-serif { font-family: 'Playfair Display', serif; }
.header-border { border-bottom: 1px solid #D9A340; }

/* Hızlı Arama Toggle Animasyonu */
#quick-search-chevron {
    transition: transform 0.3s ease;
}
#quick-search-chevron.rotate-180 {
    transform: rotate(180deg);
}

/* Hızlı Arama Form Stilleri */
#quick-search-form-container {
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.search-container { border: 1px solid #444444; background-color: #262626; transition: all 0.2s ease-in-out; }
.search-container:focus-within { box-shadow: 0 0 0 3px rgba(217, 163, 64, 0.4); border-color: #D9A340; }
.stat-card { border: 1px solid #333333; background-color: #262626; transition: all 0.3s ease; }
.stat-card:hover { transform: translateY(-5px); border-color: #D9A340; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.result-card { 
    background-color: #262626; 
    border: 2px solid rgba(217, 163, 64, 0.4); 
    border-left-width: 6px; 
    border-left-color: #D9A340; 
    border-radius: 8px; 
    margin-bottom: 1rem; 
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(217, 163, 64, 0.1);
}
.result-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(217, 163, 64, 0.2); 
    border-color: rgba(217, 163, 64, 0.7);
    /* Keep left border width constant to avoid layout shift */
    border-left-width: 6px;
}
.result-card summary { 
    cursor: pointer; 
    padding: 1rem; 
    outline: none; 
    list-style: none;
}
.result-card summary::-webkit-details-marker { display: none; }
.result-card summary::marker { display: none; }
.result-card-content { padding: 0 1rem 1rem 1rem; white-space: pre-wrap; word-wrap: break-word; line-height: 1.7; }
.direct-result-card { padding: 1.75rem; }
.direct-result-card .result-number-box { margin-right: 1rem; }
.direct-result-card .result-card-content { padding: 0 !important; margin-top: 1.5rem; }

/* Mobilde arama sonuçları düzenlemesi */
@media (max-width: 768px) {
    .result-card summary h3 { font-size: 0.875rem; line-height: 1.25rem; }
    .result-card summary .text-xs { font-size: 0.7rem; line-height: 1.1; }
    .score-container { flex-shrink: 0; min-width: 50px; }
    #search-subtitle { max-width: 100% !important; padding: 0 1rem !important; font-size: 1rem !important; line-height: 1.6 !important; word-wrap: break-word; hyphens: auto; }
    .score-progress-bar { width: 45px; }
    .score-text { font-size: 0.65rem; }
    .download-btn { width: 24px; height: 24px; font-size: 0.875rem; }
    /* AI Suggestions Container - Mobil */
    #ai-suggestions-container { margin: 1rem !important; max-width: calc(100vw - 2rem) !important; }
    #ai-suggestions-container > div { padding: 1rem !important; }
    #ai-suggestions-container h3 { font-size: 1.25rem !important; }
    /* Dönen animasyon mobilde ortalama */
    #ai-suggestions-siriwave-container { width: 100% !important; max-width: 200px !important; margin: 0 auto !important; }
    .ai-answer-section { margin: 0.5rem 0 !important; padding: 0.75rem !important; }
    .ai-answer-section h4 { font-size: 0.875rem !important; }
    .ai-answer-section .text-gray-300 { font-size: 0.8rem !important; line-height: 1.4 !important; }
    .ai-suggestion-btn { padding: 0.5rem 0.75rem !important; font-size: 0.8rem !important; }
}
.loader { border: 4px solid #f3f3f3; border-top: 4px solid #D9A340; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 2rem auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* HukukOS Logo Dalgalı Animasyon */
#hukukos-loading-logo,
#hukukos-petition-loading-logo,
#hukukos-contract-loading-logo {
    animation: wave 1.2s ease-in-out infinite;
    transform-origin: center;
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    25% {
        transform: translateY(-10px) scale(1.08);
        opacity: 0.9;
    }
    50% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    75% {
        transform: translateY(-6px) scale(1.04);
        opacity: 0.95;
    }
}
/* Light mode stilleri... */
body.light-mode { background-color: #F8F9FA; color: #2D3748; }
/* Search textarea auto-grow */
.search-container textarea#search-input {
    overflow-y: hidden;
    resize: none;
    min-height: 45px;
    max-height: 200px;
    /* keep input look */
    padding-top: 1rem;
    padding-bottom: 1rem;
    background-color: transparent;
    border: none;
    color: #FFFFFF;
}
body.light-mode .search-container textarea#search-input {
    color: #2D3748 !important;
}
body.light-mode .result-card { background-color: #FFFFFF; border: 1px solid #D9A340; border-left-width: 6px; border-left-color: #D9A340; box-shadow: 0 2px 8px rgba(217, 163, 64, 0.1); }
body.light-mode .result-card:hover { border: 2px solid #D9A340; border-left-width: 6px; box-shadow: 0 8px 25px rgba(217, 163, 64, 0.2); transform: translateY(-2px); }
.login-input { background-color: #333; border: 1px solid #555; color: #fff; }
.login-input:focus { border-color: #D9A340; box-shadow: 0 0 0 2px rgba(217, 163, 64, 0.3); outline: none; }
body.light-mode .login-input { background-color: #E2E8F0; border-color: #CBD5E0; color: #2D3748; }
#search-input:disabled { cursor: not-allowed; background-color: #333; }
body.light-mode #search-input:disabled { background-color: #E2E8F0; }
body.light-mode .result-card { background-color: #FFFFFF !important; border-color: #D9A340 !important; }
body.light-mode .result-card p,
body.light-mode .result-card strong,
body.light-mode .result-card summary,
body.light-mode .result-card h3 { color: #2D3748 !important; }
body.light-mode .result-card summary span { color: #4A5568 !important; }
body.light-mode .result-card-content { color: #2D3748 !important; }
.theme-toggle-btn { background: rgba(38, 38, 38, 0.8); backdrop-filter: blur(10px); }
.theme-toggle-btn:hover { background: rgba(217, 163, 64, 0.1); transform: scale(1.05); }
body.light-mode #mobile-menu-button { color: #1A1A1A !important; }
body.light-mode #logo-link svg rect:first-child { fill: #FFFFFF !important; }
body.light-mode #logo-link svg text:first-of-type { fill: #1A1A1A !important; }
body.light-mode .theme-toggle-btn { background-color: #FFFFFF !important; border: 1px solid #E2E8F0 !important; }
body.light-mode .theme-toggle-btn:hover { background-color: #F8F9FA !important; border: 1px solid #D9A340 !important; }
body.light-mode .header-border { border-bottom: 1px solid #D9A340; background-color: rgba(248, 249, 250, 0.9) !important; }
body.light-mode nav a { color: #2D3748 !important; }

/* Haklarım Dropdown Panel - Light Mode */
body.light-mode #user-dropdown-panel {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}
body.light-mode #user-dropdown-panel h3 {
    color: #2D3748 !important;
}
body.light-mode #user-dropdown-panel .text-gray-300 {
    color: #4A5568 !important;
}
body.light-mode #user-dropdown-panel .text-gray-400 {
    color: #718096 !important;
}
body.light-mode #user-dropdown-panel .text-white {
    color: #2D3748 !important;
}
body.light-mode #user-dropdown-panel .bg-[#333333] {
    background-color: #E2E8F0 !important;
}
body.light-mode #user-dropdown-panel .border-[#444444] {
    border-color: #CBD5E0 !important;
}

/* Haklarım Dropdown Panel - Mobil Uyumluluk */
.user-dropdown-panel {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 20rem;
    background-color: #262626;
    border: 1px solid #444444;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 60;
}

/* Mobil için özel stiller */
@media (max-width: 768px) {
    .user-dropdown-panel {
        position: fixed;
        top: 4rem;
        right: 1rem;
        width: 90vw;
        max-width: 20rem;
        margin-top: 0;
    }
    
    /* Header overflow sorununu çöz */
    header {
        overflow: visible !important;
    }
    
    /* Container overflow sorununu çöz */
    .container {
        overflow: visible !important;
    }
}
body.light-mode nav a:hover { color: #D9A340 !important; }
body.light-mode nav a.text-gray-400 { color: #718096 !important; }
body.light-mode h1 { color: #2D3748 !important; }
body.light-mode h1 .text-gold { color: #D9A340 !important; }
body.light-mode .text-gray-400 { color: #4A5568 !important; }
body.light-mode #search-subtitle .text-white { color: #2D3748 !important; font-weight: 600; }
body.light-mode .search-container { border: 1px solid #CBD5E0; background-color: #FFFFFF; }
body.light-mode .search-container:focus-within { box-shadow: 0 0 0 3px rgba(217, 163, 64, 0.2); border-color: #D9A340; }
body.light-mode #search-input { background-color: #FFFFFF; border-color: #CBD5E0; color: #2D3748; }
body.light-mode #search-input::placeholder { color: #718096; }
body.light-mode #results-page-search-input { background-color: #FFFFFF !important; border-color: #CBD5E0 !important; color: #2D3748 !important; }
body.light-mode #results-page-search-input::placeholder { color: #718096 !important; }
/* Favorites modal search input - light mode */
body.light-mode #favorites-search-input { background-color: #FFFFFF !important; border-color: #CBD5E0 !important; color: #2D3748 !important; }
body.light-mode #favorites-search-input::placeholder { color: #718096 !important; }
body.light-mode #results-page-k-input { background-color: #FFFFFF !important; border-color: #CBD5E0 !important; color: #2D3748 !important; }
body.light-mode #results-page-k-input:focus { border-color: #D9A340 !important; outline: none !important; }
body.light-mode .text-gray-500 { color: #718096 !important; }
body.light-mode .text-gray-500:hover { color: #D9A340 !important; }
body.light-mode .stat-card { border: 1px solid #E2E8F0; background-color: #FFFFFF; }
body.light-mode .stat-card:hover { border-color: #D9A340; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
body.light-mode .stat-card h3 { color: #D9A340 !important; }
body.light-mode .stat-card p.text-3xl { color: #2D3748 !important; }
body.light-mode .stat-card p.text-sm { color: #4A5568 !important; }
body.light-mode #decision-counter { color: #2D3748 !important; }
.modal-card { background-color: #1A1A1A; border: 1px solid #333333; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
body.light-mode .modal-card { background-color: #FFFFFF; border: 1px solid #E2E8F0; }
body.light-mode .modal-card h3 { color: #2D3748 !important; }
body.light-mode .modal-card .text-gray-400 { color: #4A5568 !important; }
body.light-mode .modal-card { background-color: #FFFFFF !important; border: none !important; }
body.light-mode .modal-card h3 { color: #000000 !important; }
body.light-mode .modal-card div[class*="bg-[#1A1A1A]"] { background-color: #FFFFFF !important; border: 1px solid #000000 !important; }
body.light-mode .modal-card div[class*="bg-[#1A1A1A]"]:hover { border: 2px solid #D9A340 !important; box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important; }
body.light-mode .modal-card div[class*="bg-[#262626]"] { background-color: #F1F5F9 !important; border-color: #E2E8F0 !important; }
body.light-mode .modal-card .text-white, body.light-mode .modal-card .text-gray-400, body.light-mode .modal-card .text-gray-500 { color: #000000 !important; }
body.light-mode .modal-card .text-gray-400:hover { color: #D9A340 !important; }
body.light-mode footer { background-color: #F1F5F9; border-top: 1px solid #E2E8F0; }
body.light-mode footer .text-gray-400 { color: #4A5568 !important; }
body.light-mode footer .text-gray-400:hover { color: #D9A340 !important; }
body.light-mode footer .text-gray-500 { color: #718096 !important; }
body.light-mode #dark-icon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
body.light-mode #light-icon { opacity: 1; transform: rotate(0deg) scale(1); }
body:not(.light-mode) #dark-icon { opacity: 1; transform: rotate(0deg) scale(1); }
body:not(.light-mode) #light-icon { opacity: 0; transform: rotate(90deg) scale(0.5); }
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #1A1A1A; border-top: 2px solid #D9A340; box-shadow: 0 -10px 30px rgba(0,0,0,0.3); z-index: 1000; transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner.hide { transform: translateY(100%); }
.cookie-content { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.cookie-text { color: #EAEAEA; line-height: 1.6; }
.cookie-buttons { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.cookie-btn { padding: 0.75rem 1.5rem; border-radius: 0.5rem; font-weight: 600; transition: all 0.3s ease; cursor: pointer; border: none; font-size: 0.875rem; }
.cookie-btn-primary { background: #D9A340; color: #1A1A1A; }
.cookie-btn-primary:hover { background: #B8860B; transform: translateY(-2px); }
.cookie-btn-secondary { background: transparent; color: #EAEAEA; border: 1px solid #444444; }
.cookie-btn-secondary:hover { border-color: #D9A340; color: #D9A340; }
.cookie-link { color: #D9A340; text-decoration: underline; transition: color 0.3s ease; }
.cookie-link:hover { color: #B8860B; }
@media (max-width: 768px) { .cookie-content { padding: 1rem; } .cookie-buttons { flex-direction: column; } .cookie-btn { width: 100%; text-align: center; } }
body.light-mode .cookie-banner { background: linear-gradient(135deg, #F8F9FA 0%, #F1F5F9 100%); border-top: 2px solid #D9A340; }
body.light-mode .cookie-text { color: #2D3748 !important; }
@media (min-width: 769px) { #user-email { font-size: 0.875rem; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* Paket seçimi için stiller */
.package-card {
    transition: all 0.3s ease;
    cursor: pointer;
}
.package-card.selected {
    border: 2px solid #D9A340 !important;
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(217, 163, 64, 0.3);
}
.package-card:not(.selected):hover {
    border-color: #D9A340;
    transform: scale(1.01);
}
body.light-mode .package-card.selected {
    border: 2px solid #D9A340 !important;
    box-shadow: 0 10px 30px rgba(217, 163, 64, 0.2);
}
body.light-mode .package-card {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
}
body.light-mode .package-card.selected {
    border-color: #D9A340 !important;
}
@media (max-width: 768px) { #user-menu { display: none !important; } .container { min-width: 0; } .flex.items-center.space-x-3 { min-width: 0; flex-shrink: 1; } }
@media (max-width: 768px) { 
    .modal-card { 
        max-height: 90vh !important; 
        overflow-y: auto !important; 
        -webkit-overflow-scrolling: touch !important; 
    } 
    /* Login modal için mobil optimizasyon */
    #login-modal .modal-card {
        max-height: 95vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 1.5rem !important;
    }
    #login-modal .modal-card form,
    #login-modal .modal-card > div {
        min-height: auto !important;
    }
    .search-container { padding: 0.75rem !important; gap: 0.5rem !important; } 
    #search-input { padding: 1rem !important; font-size: 0.9rem !important; min-height: 48px !important; } 
    #k-input { width: 60px !important; padding: 0.75rem !important; font-size: 0.9rem !important; min-height: 48px !important; } 
    .search-container button[type="submit"] { padding: 0.75rem !important; font-size: 1rem !important; min-height: 48px !important; min-width: 48px !important; } 
    h1 { font-size: 2.5rem !important; line-height: 1.2 !important; } 
    #search-subtitle { font-size: 1rem !important; padding: 0 1rem !important; } 
}
@media (max-width: 480px) { h1 { font-size: 2rem !important; } .search-container { padding: 0.5rem !important; gap: 0.25rem !important; } #search-input { padding: 0.875rem !important; font-size: 0.85rem !important; } #k-input { width: 50px !important; padding: 0.5rem !important; font-size: 0.8rem !important; } #search-subtitle { font-size: 0.9rem !important; line-height: 1.5 !important; padding: 0 0.5rem !important; } .search-container button[type="submit"] { padding: 0.5rem !important; font-size: 0.9rem !important; min-width: 44px !important; } }
.snippet-paragraph { color: #FFFFFF; font-size: 0.875rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
body.light-mode .snippet-paragraph { color: #2D3748 !important; }

/* Sadece favoriler panelindeki snippet'ler için justify */
#favorites-container .snippet-paragraph,
#favorites-container .text-sm.text-gray-300 {
    text-align: justify;
}
.result-number-box { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: linear-gradient(135deg, #D9A340 0%, #B8860B 100%); color: #1A1A1A; font-weight: bold; font-size: 14px; border-radius: 8px; margin-right: 12px; box-shadow: 0 2px 8px rgba(217, 163, 64, 0.3); transition: all 0.3s ease; }
.result-number-box:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(217, 163, 64, 0.4); }
body.light-mode .result-number-box { background: linear-gradient(135deg, #D9A340 0%, #B8860B 100%); color: #FFFFFF; box-shadow: 0 2px 8px rgba(217, 163, 64, 0.2); }
body.light-mode .result-number-box:hover { box-shadow: 0 4px 12px rgba(217, 163, 64, 0.3); }
.download-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 4px; text-decoration: none; transition: all 0.3s ease; border: none; background-color: transparent; color: #9CA3AF; position: relative; overflow: hidden; }
.download-btn:hover { transform: translateY(-1px); }
.pdf-btn { color: #e67e22; filter: drop-shadow(0 0 8px rgba(230, 126, 34, 0.6)); }
.pdf-btn:hover { color: #d35400; filter: drop-shadow(0 0 16px rgba(230, 126, 34, 0.8)); transform: translateY(-2px) scale(1.15); }
.word-btn { color: #3498db; filter: drop-shadow(0 0 8px rgba(52, 152, 219, 0.8)); }
.word-btn:hover { color: #2980b9; filter: drop-shadow(0 0 16px rgba(52, 152, 219, 1)); transform: translateY(-2px) scale(1.15); }
.compare-btn { color: #9CA3AF; filter: drop-shadow(0 0 8px rgba(156, 163, 175, 0.4)); }
.compare-btn:hover { color: #D9A340; filter: drop-shadow(0 0 16px rgba(217, 163, 64, 0.8)); transform: translateY(-2px) scale(1.15); }
.compare-btn.active { color: #D9A340; filter: drop-shadow(0 0 12px rgba(217, 163, 64, 1)); }
body.light-mode .download-btn { background-color: transparent; border: none; }
body.light-mode .pdf-btn { color: #e67e22; filter: drop-shadow(0 0 8px rgba(230, 126, 34, 0.5)); }
body.light-mode .pdf-btn:hover { color: #d35400; filter: drop-shadow(0 0 16px rgba(230, 126, 34, 0.7)); transform: translateY(-2px) scale(1.15); }

#petition-result .download-btn,
#contract-result .download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    filter: none !important;
    width: auto;
    height: auto;
    color: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
    transform: none !important;
}

#petition-result .download-btn:hover,
#contract-result .download-btn:hover {
    opacity: 0.8;
}

#petition-result .download-btn i,
#contract-result .download-btn i {
    font-size: 1.1rem;
    filter: none !important;
}

#petition-result .pdf-btn,
#contract-result .pdf-btn { color: #ef4444; }
#petition-result .word-btn,
#contract-result .word-btn { color: #3b82f6; }
#petition-result .udf-btn,
#contract-result .udf-btn { color: #f97316; }
#petition-result .copy-btn,
#contract-result .copy-btn { color: #eab308; }

/* Comparison Panel Styles */
#compare-panel {
    min-width: 280px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#compare-panel-items button {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Comparison Modal Styles */
#comparison-modal .modal-card {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#comparison-modal:not(.hidden) .modal-card {
    transform: scale(1);
    opacity: 1;
}

#comparison-decision-a,
#comparison-decision-b {
    scrollbar-width: thin;
    scrollbar-color: #444 #0F0F0F;
}

#comparison-decision-a::-webkit-scrollbar,
#comparison-decision-b::-webkit-scrollbar {
    width: 8px;
}

#comparison-decision-a::-webkit-scrollbar-track,
#comparison-decision-b::-webkit-scrollbar-track {
    background: #0F0F0F;
}

#comparison-decision-a::-webkit-scrollbar-thumb,
#comparison-decision-b::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

#comparison-decision-a::-webkit-scrollbar-thumb:hover,
#comparison-decision-b::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Search History Styles */
#search-history-dropdown,
#results-page-search-history-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #444 #1A1A1A;
}

#search-history-dropdown::-webkit-scrollbar,
#results-page-search-history-dropdown::-webkit-scrollbar {
    width: 8px;
}

#search-history-dropdown::-webkit-scrollbar-track,
#results-page-search-history-dropdown::-webkit-scrollbar-track {
    background: #1A1A1A;
}

#search-history-dropdown::-webkit-scrollbar-thumb,
#results-page-search-history-dropdown::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

#search-history-dropdown::-webkit-scrollbar-thumb:hover,
#results-page-search-history-dropdown::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.search-history-item {
    border-bottom: 1px solid #2A2A2A;
}

.search-history-item:last-child {
    border-bottom: none;
}

/* Light Mode - Search History Dropdown */
body.light-mode #search-history-dropdown,
body.light-mode #results-page-search-history-dropdown {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode #search-history-dropdown::-webkit-scrollbar-track,
body.light-mode #results-page-search-history-dropdown::-webkit-scrollbar-track {
    background: #F1F5F9 !important;
}

body.light-mode #search-history-dropdown::-webkit-scrollbar-thumb,
body.light-mode #results-page-search-history-dropdown::-webkit-scrollbar-thumb {
    background: #CBD5E0 !important;
}

body.light-mode #search-history-dropdown::-webkit-scrollbar-thumb:hover,
body.light-mode #results-page-search-history-dropdown::-webkit-scrollbar-thumb:hover {
    background: #A0AEC0 !important;
}

body.light-mode .search-history-item {
    border-bottom-color: #E2E8F0 !important;
    color: #2D3748 !important;
}

body.light-mode .search-history-item:hover {
    background-color: #F8F9FA !important;
}

body.light-mode .search-history-item .text-gray-300 {
    color: #2D3748 !important;
}

body.light-mode .search-history-item .text-gray-400 {
    color: #4A5568 !important;
}

body.light-mode .search-history-item .text-gray-500 {
    color: #718096 !important;
}

/* Light Mode - Search History Dropdown: EN GÜÇLÜ KURALLAR - Tüm metin elementleri */
body.light-mode #search-history-dropdown,
body.light-mode #results-page-search-history-dropdown {
    color: #2D3748 !important;
}

body.light-mode #search-history-dropdown *,
body.light-mode #results-page-search-history-dropdown *,
body.light-mode #search-history-dropdown *::before,
body.light-mode #search-history-dropdown *::after,
body.light-mode #results-page-search-history-dropdown *::before,
body.light-mode #results-page-search-history-dropdown *::after {
    color: #2D3748 !important;
}

/* Light Mode - Search History Dropdown: text-white override - EN YÜKSEK ÖNCELİK */
body.light-mode #search-history-dropdown .text-white,
body.light-mode #results-page-search-history-dropdown .text-white,
body.light-mode #search-history-dropdown .search-history-item .text-white,
body.light-mode #results-page-search-history-dropdown .search-history-item .text-white,
body.light-mode .search-history-item .text-white {
    color: #2D3748 !important;
}

/* Light Mode - Search History Dropdown: Tüm HTML elementleri için */
body.light-mode #search-history-dropdown p,
body.light-mode #search-history-dropdown span,
body.light-mode #search-history-dropdown div,
body.light-mode #search-history-dropdown a,
body.light-mode #search-history-dropdown button,
body.light-mode #search-history-dropdown label,
body.light-mode #results-page-search-history-dropdown p,
body.light-mode #results-page-search-history-dropdown span,
body.light-mode #results-page-search-history-dropdown div,
body.light-mode #results-page-search-history-dropdown a,
body.light-mode #results-page-search-history-dropdown button,
body.light-mode #results-page-search-history-dropdown label {
    color: #2D3748 !important;
}

/* Light Mode - Search History Item içindeki tüm elementler */
body.light-mode .search-history-item,
body.light-mode .search-history-item *,
body.light-mode .search-history-item p,
body.light-mode .search-history-item span,
body.light-mode .search-history-item div {
    color: #2D3748 !important;
}

/* Light Mode - Direct Search Form */
/* "Hızlı Arama (Esas + Karar No)" yazısı siyah olmalı */
body.light-mode #quick-search-toggle span {
    color: #000000 !important;
}

body.light-mode #quick-search-toggle:hover span {
    color: #D9A340 !important;
}

/* Direct search modal arka plan rengi dilekçe oluşturucu/sözleşme hazırlayıcı tonlarında */
body.light-mode #quick-search-form-container section {
    background-color: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #direct-search-form {
    color: #2D3748 !important;
}

body.light-mode #direct-search-form label {
    color: #2D3748 !important;
}

body.light-mode #direct-search-form .text-gray-300 {
    color: #2D3748 !important;
}

body.light-mode #direct-search-form .text-gray-500 {
    color: #718096 !important;
}

body.light-mode #direct-search-form select,
body.light-mode #direct-search-form input {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
    color: #2D3748 !important;
}

body.light-mode #direct-search-form select:focus,
body.light-mode #direct-search-form input:focus {
    border-color: #D9A340 !important;
    outline: none !important;
}

body.light-mode #direct-search-form select option {
    background-color: #FFFFFF !important;
    color: #2D3748 !important;
}

@media (max-width: 768px) {
    #compare-panel {
        bottom: 4px;
        right: 4px;
        left: 4px;
        max-width: none;
        min-width: auto;
    }
    
    #search-history-dropdown,
    #results-page-search-history-dropdown {
        left: 1rem;
        right: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    #comparison-modal .modal-card {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    #comparison-modal .flex {
        flex-direction: column;
    }
    
    #comparison-decision-a,
    #comparison-decision-b {
        max-height: 40vh;
    }
}

@media (max-width: 768px) {
    /* Favoriler modal boyutları */
    #favorites-modal .modal-card {
        max-width: 95vw !important;
        max-height: 95vh !important;
        padding: 1rem !important;
        margin: 0.5rem !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Smooth scroll için favoriler container */
    #favorites-container {
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Başlık küçült */
    #favorites-modal h3 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
        position: sticky !important;
        top: 0 !important;
        background-color: #1A1A1A !important;
        padding: 0.75rem 0 !important;
        z-index: 10 !important;
    }
    
    body.light-mode #favorites-modal h3 {
        background-color: #FFFFFF !important;
    }
    
    /* Arama bölümü sticky */
    #favorites-modal > .modal-card > div:nth-child(2) {
        position: sticky !important;
        top: 3rem !important;
        background-color: #1A1A1A !important;
        padding: 0.5rem 0 !important;
        z-index: 9 !important;
        margin-bottom: 0.75rem !important;
    }
    
    body.light-mode #favorites-modal > .modal-card > div:nth-child(2) {
        background-color: #FFFFFF !important;
    }
    
    /* Arama kutusu mobilde daha compact */
    #favorites-search-input {
        padding: 0.625rem 0.75rem !important;
        padding-left: 2rem !important;
        font-size: 0.875rem !important;
    }
    
    #favorites-search-input::placeholder {
        font-size: 0.8rem !important;
    }
    
    #favorites-search-input + i {
        left: 0.625rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Arama bilgi metni küçült */
    #favorites-modal .text-xs {
        font-size: 0.7rem !important;
        margin-top: 0.25rem !important;
    }
    
    /* Favori kartları mobilde optimize et */
    .result-card {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .result-card .result-number-box {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
        margin-right: 0.5rem !important;
    }
    
    .result-card h4 {
        font-size: 0.875rem !important;
        line-height: 1.25 !important;
    }
    
    .result-card .text-xs {
        font-size: 0.7rem !important;
        gap: 0.5rem !important;
    }
    
    .result-card .pl-12 {
        padding-left: 2.25rem !important;
    }
    
    /* Butonlar mobilde daha büyük (touch-friendly) */
    .result-card .download-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
    }
    
    .result-card .download-btn i {
        font-size: 1.125rem !important;
    }
    
    /* Not container mobilde */
    .favorite-note-container {
        margin-top: 0.5rem !important;
        padding: 0.5rem !important;
        padding-left: 2.25rem !important;
    }
    
    .favorite-note-text {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }
    
    .favorite-note-empty {
        font-size: 0.75rem !important;
    }
    
    /* Not düzenleme alanı */
    .favorite-note-textarea {
        min-height: 60px !important;
        font-size: 0.8rem !important;
        padding: 0.5rem !important;
    }
    
    /* Not butonları */
    .note-btn {
        padding: 0.5rem 0.875rem !important;
        font-size: 0.8rem !important;
        min-height: 40px !important;
        flex: 1 !important;
    }
    
    .note-btn i {
        font-size: 0.75rem !important;
    }
    
    /* Not butonları container */
    .favorite-note-container .flex.gap-2.mt-2 {
        width: 100% !important;
    }
    
    /* Not başlığı ve düzenleme butonu (not varken) */
    .favorite-note-container .flex.items-center.justify-between:has(.fa-sticky-note) {
        flex-wrap: wrap !important;
    }
    
    .favorite-note-container button[onclick^="editFavoriteNote"] {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
        min-height: 36px !important;
        white-space: nowrap !important;
    }
    
    .favorite-note-container button[onclick^="editFavoriteNote"] span {
        display: inline !important;
    }
    
    /* Not metni tıklanabilir alan */
    .favorite-note-container .cursor-pointer {
        margin: 0 !important;
        padding: 0.75rem !important;
    }
    
    .favorite-note-container .cursor-pointer:hover {
        background-color: rgba(217, 163, 64, 0.1) !important;
    }
    
    /* Not yoksa mesajı ve Not Ekle butonu */
    .favorite-note-container .flex.items-center.justify-between:has(.favorite-note-empty) {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .favorite-note-container .flex.items-center.justify-between:has(.favorite-note-empty) button {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
        min-height: 36px !important;
    }
    
    /* Snippet metni mobilde */
    .result-card .snippet-paragraph {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }
    
    /* Empty ve loading state'ler */
    #favorites-empty i {
        font-size: 3rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    #favorites-empty .text-lg {
        font-size: 1rem !important;
    }
    
    #favorites-empty .text-sm {
        font-size: 0.8rem !important;
        padding: 0 1rem !important;
    }
    
    /* Buton gap'leri küçült */
    .result-card .flex.gap-2 {
        gap: 0.375rem !important;
    }
    
    /* Modal kapatma butonu */
    #close-favorites-button {
        top: 0.5rem !important;
        right: 0.5rem !important;
        font-size: 1.75rem !important;
    }
}

/* Mobil için uyarı popup'ı */
@media (max-width: 768px) {
    #law-hint-banner-home {
        top: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
        max-width: none !important;
        font-size: 0.875rem !important;
        padding: 0.75rem 1rem !important;
        text-align: center !important;
    }
}

/* Çok küçük ekranlar için ekstra optimizasyon */
@media (max-width: 480px) {
    #favorites-modal .modal-card {
        max-width: 100vw !important;
        max-height: 100vh !important;
        padding: 0.75rem !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    .result-card h4 {
        font-size: 0.8rem !important;
    }
    
    .result-card .text-xs {
        font-size: 0.65rem !important;
    }
    
    .favorite-note-text,
    .favorite-note-empty {
        font-size: 0.7rem !important;
    }
    
    .note-btn {
        padding: 0.375rem 0.625rem !important;
        font-size: 0.75rem !important;
    }
}

body.light-mode #ai-analysis-report-section { background-color: #F8F9FA !important; }
body.light-mode #ai-analysis-report-section > div { background-color: #FFFFFF !important; border: 1px solid #D9A340 !important; box-shadow: 0 2px 8px rgba(217, 163, 64, 0.1) !important; }
body.light-mode #ai-analysis-report-section .bg-\[#262626\] { background-color: #FFFFFF !important; border-color: #D9A340 !important; }
body.light-mode #ai-analysis-report-section h2, body.light-mode #ai-analysis-report-section h4 { color: #2D3748 !important; }
body.light-mode #ai-analysis-report-section .text-\[#D9A340\] { color: #D9A340 !important; }
body.light-mode #ai-analysis-report-section .text-gray-400 { color: #4A5568 !important; }
body.light-mode #ai-analysis-report-section .text-gray-300 { color: #2D3748 !important; }
body.light-mode #ai-analysis-report-section .bg-\[#1A1A1A\] { background-color: #F8F9FA !important; border-color: #D9A340 !important; }
body.light-mode #ai-analysis-report-section .text-white { color: #2D3748 !important; }
body.light-mode #ai-analysis-report-section p { color: #2D3748 !important; }
body.light-mode #analysis-report-container .bg-gradient-to-r { background: linear-gradient(to right, #FFFFFF, #F8F9FA) !important; }
body.light-mode #analysis-report-container .border-\[\#444\] { border-color: #CBD5E0 !important; }
body.light-mode #analysis-report-container .border-\[\#333\] { border-color: #E2E8F0 !important; }
body.light-mode #analysis-report-container .text-white { color: #1A1A1A !important; }
body.light-mode #search-form .text-gray-400, body.light-mode #results-page-search-form .text-gray-400 { color: #4A5568; }
body.light-mode #search-form select, body.light-mode #search-form input[type="number"], body.light-mode #results-page-search-form select, body.light-mode #results-page-search-form input[type="number"] { background-color: #F1F5F9; border-color: #CBD5E0; color: #2D3748; }
body.light-mode #search-form select:focus, body.light-mode #search-form input[type="number"]:focus, body.light-mode #results-page-search-form select:focus, body.light-mode #results-page-search-form input[type="number"]:focus { border-color: #D9A340; }
.radio-toggle-group { display: flex; background-color: #262626; border: 1px solid #444; border-radius: 0.375rem; padding: 0.25rem; }
.radio-toggle-group input[type="radio"] { display: none; }
.radio-toggle-group label { padding: 0.25rem 0.75rem; cursor: pointer; color: #9CA3AF; border-radius: 0.25rem; transition: all 0.2s ease-in-out; font-size: 0.875rem; font-weight: 500; }
.radio-toggle-group input[type="radio"]:checked + label { background-color: #D9A340; color: #1A1A1A; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.radio-toggle-group input[type="radio"]:disabled + label { cursor: not-allowed; opacity: 0.5; }
/* BAM için Hukuk ve Ceza ile aynı sarı-turuncu renk */
.radio-toggle-group input[type="radio"][value="bam"]:checked + label { background-color: #D9A340; color: #1A1A1A; }
body.light-mode .radio-toggle-group { background-color: #F1F5F9; border-color: #CBD5E0; }
body.light-mode .radio-toggle-group label { color: #4A5568; }
body.light-mode .radio-toggle-group input[type="radio"]:checked + label { background-color: #D9A340; color: #FFFFFF; }
body.light-mode .radio-toggle-group input[type="radio"][value="bam"]:checked + label { background-color: #D9A340; color: #FFFFFF; }
.score-container { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.score-text { font-size: 0.75rem; color: #9CA3AF; font-weight: 500; }
.score-progress-bar { width: 60px; height: 4px; background-color: rgba(156, 163, 175, 0.2); border-radius: 2px; overflow: hidden; position: relative; }
.score-progress-fill { height: 100%; background: linear-gradient(90deg, #FF6B35 0%, #F7931E 50%, #FFD700 100%); border-radius: 2px; transition: width 0.3s ease-in-out; box-shadow: 0 0 8px rgba(255, 107, 53, 0.6); }
body.light-mode .score-progress-bar { background-color: rgba(209, 213, 219, 0.3); }

/* AI Arama Yazısı */
.ai-search-label {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF00FF 0%, #8A2BE2 50%, #00BFFF 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 0, 255, 0.6));
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid #8A2BE2;
    border-radius: 0.375rem;
}
.ai-search-label:hover {
    filter: drop-shadow(0 0 16px rgba(255, 0, 255, 0.8));
    transform: translateY(-1px);
    border-color: #FF00FF;
    box-shadow: 0 0 16px rgba(255, 0, 255, 0.3);
}
body.light-mode .ai-search-label {
    background: linear-gradient(135deg, #FF00FF 0%, #8A2BE2 50%, #00BFFF 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 0, 255, 0.5));
    border-color: #8A2BE2;
}
body.light-mode .ai-search-label:hover {
    filter: drop-shadow(0 0 16px rgba(255, 0, 255, 0.7));
    border-color: #FF00FF;
    box-shadow: 0 0 16px rgba(255, 0, 255, 0.2);
}

body.light-mode .score-text { color: #6B7280; }
mark { background-color: rgba(217, 163, 64, 0.4); color: inherit; padding: 0 2px; border-radius: 3px; }
body.light-mode mark { background-color: rgba(217, 163, 64, 0.3); }
body.light-mode #mobile-auth-container { border-color: #E2E8F0; }
body.light-mode #mobile-user-email { color: #4A5568 !important; }

/* AI Arama Bilgilendirme */
#ai-search-info p { color: #9CA3AF; }
body.light-mode #ai-search-info p { color: #6B7280; }
.ai-answer-section { background-color: #1A1A1A; border: 1px solid #333333; border-left: 4px solid #D9A340; }
.ai-answer-section h4 { color: #D9A340; }
body.light-mode .ai-answer-section { background-color: #FFFFFF; border-color: #CBD5E0; border-left-color: #D9A340; }
body.light-mode .ai-answer-section h4 { color: #D9A340; }
body.light-mode .ai-answer-section .text-gray-300 { color: #2D3748 !important; }
.ai-suggestion-btn { display: flex; align-items: center; width: 100%; text-align: left; padding: 0.75rem 1rem; background-color: #262626; border: 1px solid #444444; border-left-width: 4px; border-left-color: #a78bfa; border-radius: 0.5rem; color: #EAEAEA; font-size: 0.9rem; transition: all 0.3s ease; cursor: pointer; }
.ai-suggestion-btn:hover { background-color: #333333; border-color: #a78bfa; transform: translateX(5px); }
.ai-suggestion-btn i { margin-right: 0.75rem; color: #a78bfa; }
body.light-mode .ai-suggestion-btn { background-color: #FFFFFF; border-color: #CBD5E0; color: #2D3748; }
body.light-mode .ai-suggestion-btn:hover { background-color: #F8F9FA; border-color: #a78bfa; }

/* AI Suggestions Container - Light Mode (Result-card stiline uygun) */
body.light-mode #ai-suggestions-container { background-color: #F8F9FA !important; }
body.light-mode #ai-suggestions-container > div { background-color: #FFFFFF !important; border: 1px solid #D9A340 !important; box-shadow: 0 2px 8px rgba(217, 163, 64, 0.1) !important; }
body.light-mode #ai-suggestions-container .bg-\[#262626\] { background-color: #FFFFFF !important; border: 1px solid #D9A340 !important; box-shadow: 0 2px 8px rgba(217, 163, 64, 0.1) !important; }
body.light-mode #ai-suggestions-container h3 { color: #2D3748 !important; }
body.light-mode #ai-suggestions-container .text-white { color: #2D3748 !important; }
body.light-mode #ai-suggestions-container .text-gray-400 { color: #4A5568 !important; }
body.light-mode #ai-suggestions-container .bg-\[#1A1A1A\] { background-color: #F8F9FA !important; border-color: #CBD5E0 !important; }
body.light-mode #ai-suggestions-container p { color: #2D3748 !important; }

/* Decision Detail Modal - Light Mode (Result-card stiline uygun) */
body.light-mode #decision-detail-modal .modal-card { background-color: #FFFFFF !important; border: 1px solid #D9A340 !important; box-shadow: 0 2px 8px rgba(217, 163, 64, 0.1) !important; }
body.light-mode #decision-detail-modal h3, 
body.light-mode #decision-detail-modal h4 { color: #2D3748 !important; }
body.light-mode #decision-detail-modal h4.text-\[#D9A340\] { color: #D9A340 !important; }
body.light-mode #decision-detail-modal .text-white { color: #2D3748 !important; }
body.light-mode #decision-detail-modal .text-gray-400 { color: #D9A340 !important; }
body.light-mode #decision-detail-modal .text-gray-300 { color: #2D3748 !important; }
body.light-mode #decision-detail-modal .bg-gradient-to-r { background: #FFFFFF !important; border: 2px solid #D9A340 !important; }
body.light-mode #decision-detail-modal .bg-\[#1D1D1D\] { background-color: #FFFFFF !important; border: 2px solid #D9A340 !important; }
body.light-mode #decision-detail-modal .bg-\[#131313\] { background-color: #FFFFFF !important; }
body.light-mode #decision-detail-modal .bg-\[#2A2A2A\] { background-color: #FFFFFF !important; border: 2px solid #CBD5E0 !important; }
body.light-mode #decision-detail-modal div[class*="bg-[#2A2A2A]"] { background-color: #FFFFFF !important; border: 2px solid #CBD5E0 !important; }
body.light-mode #decision-detail-modal .bg-\[#1A1A1A\] { background-color: #FFFFFF !important; border: 2px solid #CBD5E0 !important; }
body.light-mode #decision-detail-modal .border-\[\#444\] { border-color: #CBD5E0 !important; }
body.light-mode #decision-detail-modal .border-\[\#333\] { border-color: #CBD5E0 !important; }
body.light-mode #decision-detail-modal p { color: #2D3748 !important; }
body.light-mode #decision-detail-modal span { color: #2D3748 !important; }
body.light-mode #decision-detail-modal strong { color: #2D3748 !important; }
body.light-mode #decision-detail-modal .download-btn { border-width: 2px !important; }

/* Daha güçlü CSS kuralları - bilgi kutuları için */
body.light-mode #decision-detail-modal .grid > div { 
    background-color: #FFFFFF !important; 
    border: 2px solid #CBD5E0 !important; 
}
body.light-mode #decision-detail-modal .grid > div span:first-child { 
    color: #D9A340 !important; 
}
body.light-mode #decision-detail-modal .grid > div span:last-child { 
    color: #2D3748 !important; 
}

/* AI Report Modal - Light Mode (Result-card stiline uygun) */
body.light-mode #ai-report-modal .modal-card { background-color: #FFFFFF !important; border: 1px solid #D9A340 !important; box-shadow: 0 2px 8px rgba(217, 163, 64, 0.1) !important; }
body.light-mode #ai-report-modal h3, 
body.light-mode #ai-report-modal h4 { color: #2D3748 !important; }
body.light-mode #ai-report-modal .text-white { color: #2D3748 !important; }
body.light-mode #ai-report-modal .text-gray-400 { color: #4A5568 !important; }
body.light-mode #ai-report-modal .text-gray-300 { color: #2D3748 !important; }
body.light-mode #ai-report-modal .bg-\[#1A1A1A\] { background-color: #FFFFFF !important; border: 1px solid #CBD5E0 !important; }
body.light-mode #ai-report-modal .bg-red-900\/20 { background-color: rgba(254, 202, 202, 0.5) !important; }
body.light-mode #ai-report-modal .border-red-500 { border-color: #F56565 !important; }
body.light-mode #ai-report-modal .text-red-400 { color: #E53E3E !important; }
body.light-mode #ai-report-modal p { color: #2D3748 !important; }
body.light-mode #ai-report-modal span { color: #2D3748 !important; }
body.light-mode #ai-report-modal strong { color: #2D3748 !important; }

/* AI Summary Modal - Light Mode (Result-card stiline uygun) */
body.light-mode #ai-summary-modal .modal-card { background-color: #FFFFFF !important; border: 1px solid #D9A340 !important; box-shadow: 0 2px 8px rgba(217, 163, 64, 0.1) !important; }
body.light-mode #ai-summary-modal h3 { color: #2D3748 !important; }
body.light-mode #ai-summary-modal .text-gray-400 { color: #4A5568 !important; }
body.light-mode #ai-summary-modal .text-gray-300 { color: #2D3748 !important; }
body.light-mode #ai-summary-modal p { color: #2D3748 !important; }
body.light-mode #ai-summary-modal strong { color: #2D3748 !important; }

/* Tam Ekran Karar Metni Modal - Light Mode */
body.light-mode #fullscreen-decision-text-modal {
    background-color: rgba(255, 255, 255, 0.95) !important;
}
body.light-mode #fullscreen-decision-text-modal.bg-black\/90 {
    background-color: rgba(255, 255, 255, 0.95) !important;
}
body.light-mode #fullscreen-decision-text-modal h3 {
    color: #D9A340 !important;
}
body.light-mode #fullscreen-decision-text-modal p {
    color: #2D3748 !important;
}
body.light-mode #fullscreen-decision-text-modal .bg-\[#1A1A1A\] {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
}
body.light-mode #fullscreen-decision-text-modal div[class*="bg-\[#1A1A1A\]"] {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
}
body.light-mode #fullscreen-decision-text-modal .text-gray-300 {
    color: #2D3748 !important;
}
body.light-mode #fullscreen-decision-text-modal .text-gray-400 {
    color: #4A5568 !important;
}
body.light-mode #fullscreen-decision-text-modal button {
    color: #4A5568 !important;
}
body.light-mode #fullscreen-decision-text-modal button:hover {
    color: #D9A340 !important;
}
body.light-mode #fullscreen-decision-text-modal .border-\[\#333\] {
    border-color: #CBD5E0 !important;
}
body.light-mode #fullscreen-decision-text-modal div[class*="border-\[#333\]"] {
    border-color: #CBD5E0 !important;
}
body.light-mode #fullscreen-decision-text-modal #fullscreen-decision-text-content {
    color: #2D3748 !important;
}
body.light-mode #fullscreen-decision-text-modal div[class*="text-gray-300"] {
    color: #2D3748 !important;
}
body.light-mode #fullscreen-decision-text-modal div[class*="text-gray-400"] {
    color: #4A5568 !important;
}

/* Daha güçlü CSS kuralları - Tailwind arbitrary values için */
body.light-mode #fullscreen-decision-text-modal * {
    color: inherit !important;
}
body.light-mode #fullscreen-decision-text-modal .text-\[#D9A340\] {
    color: #D9A340 !important;
}
body.light-mode #fullscreen-decision-text-modal .text-gray-300,
body.light-mode #fullscreen-decision-text-modal .text-gray-400,
body.light-mode #fullscreen-decision-text-modal div[class*="text-gray"],
body.light-mode #fullscreen-decision-text-modal p,
body.light-mode #fullscreen-decision-text-modal span,
body.light-mode #fullscreen-decision-text-modal div {
    color: #2D3748 !important;
}
body.light-mode #fullscreen-decision-text-modal h3,
body.light-mode #fullscreen-decision-text-modal .text-\[#D9A340\] {
    color: #D9A340 !important;
}
body.light-mode #fullscreen-decision-text-modal button {
    color: #4A5568 !important;
}
body.light-mode #fullscreen-decision-text-modal button:hover {
    color: #D9A340 !important;
}

/* En güçlü CSS kuralları - Tüm elementleri override et */
body.light-mode #fullscreen-decision-text-modal {
    background: rgba(255, 255, 255, 0.95) !important;
}
body.light-mode #fullscreen-decision-text-modal * {
    color: #2D3748 !important;
}
body.light-mode #fullscreen-decision-text-modal h3,
body.light-mode #fullscreen-decision-text-modal .text-\[#D9A340\] {
    color: #D9A340 !important;
}
body.light-mode #fullscreen-decision-text-modal button {
    color: #4A5568 !important;
}
body.light-mode #fullscreen-decision-text-modal button:hover {
    color: #D9A340 !important;
}
body.light-mode #fullscreen-decision-text-modal div[class*="bg-"] {
    background-color: #FFFFFF !important;
}
body.light-mode #fullscreen-decision-text-modal div[class*="border-"] {
    border-color: #CBD5E0 !important;
}

.chevron-toggle {
    transition: transform 0.3s ease;
}

details[open] .chevron-toggle {
    transform: rotate(180deg);
}

/* Dilekçe Oluşturucu Portal - Açık Mod Stilleri */
body.light-mode #ai-petition-section {
    background-color: #FFFFFF !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-petition-section summary {
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-petition-section h2,
body.light-mode #ai-petition-section .text-white {
    color: #2D3748 !important;
}

body.light-mode #ai-petition-section .text-gray-300,
body.light-mode #ai-petition-section .text-gray-400 {
    color: #4A5568 !important;
}

body.light-mode #ai-petition-section .text-gray-500 {
    color: #718096 !important;
}

body.light-mode #ai-petition-section div[class*="bg-[#262626]"],
body.light-mode #ai-petition-section div[class*="bg-[#121212]"] {
    background-color: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-petition-section div[class*="bg-[#262626]"] .text-white {
    color: #2D3748 !important;
}

body.light-mode #ai-petition-section div[class*="bg-[#262626]"] .text-gray-400 {
    color: #4A5568 !important;
}

/* Light mode için radio buton container (Basit/Gelişmiş) */
body.light-mode #ai-petition-section div[class*="bg-[#1a1a1a]"] {
    background-color: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
}

/* Light mode için Gelişmiş butonu metin rengi */
body.light-mode #ai-petition-section #petition-mode-advanced-btn {
    color: #4A5568 !important;
}

body.light-mode #ai-petition-section #petition-mode-advanced-btn:hover {
    color: #2D3748 !important;
}

/* Light mode için Gelişmiş Mod dosya yükleme bloğu */
body.light-mode #ai-petition-section label[for="petition-files-advanced"] {
    color: #4A5568 !important;
}

body.light-mode #ai-petition-section label[for="petition-files-advanced"] .text-gray-500 {
    color: #718096 !important;
}

body.light-mode #ai-petition-section #petition-files-advanced {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
    color: #2D3748 !important;
}

body.light-mode #ai-petition-section #petition-files-advanced:focus {
    border-color: #3b82f6 !important;
}

body.light-mode #ai-petition-section #petition-files-advanced::file-selector-button {
    background-color: #3b82f6 !important;
    color: #FFFFFF !important;
}

body.light-mode #ai-petition-section #petition-files-advanced:hover::file-selector-button {
    background-color: #2563eb !important;
}

body.light-mode #ai-petition-section #petition-files-advanced + p.text-gray-400 {
    color: #718096 !important;
}

/* Gelişmiş Mod Dosya Listesi Stilleri */
#petition-files-list-advanced .remove-file-btn {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}

#petition-files-list-advanced .remove-file-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

body.light-mode #petition-files-list-advanced div[class*="bg-[#1a1f2e]"] {
    background-color: #F1F5F9 !important;
    border-color: #CBD5E0 !important;
}

body.light-mode #petition-files-list-advanced .text-gray-300 {
    color: #2D3748 !important;
}

body.light-mode #petition-files-list-advanced .text-gray-400 {
    color: #718096 !important;
}

body.light-mode #ai-petition-section input[class*="bg-[#121212]"],
body.light-mode #ai-petition-section select[class*="bg-[#121212]"],
body.light-mode #ai-petition-section textarea[class*="bg-[#121212]"],
body.light-mode #ai-petition-section input[class*="bg-[#1a1f2e]"] {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
    color: #2D3748 !important;
}

body.light-mode #ai-petition-section input[class*="bg-[#121212]"]::placeholder,
body.light-mode #ai-petition-section textarea[class*="bg-[#121212]"]::placeholder {
    color: #A0AEC0 !important;
}

body.light-mode #ai-petition-section input[class*="bg-[#121212]"]:focus,
body.light-mode #ai-petition-section select[class*="bg-[#121212]"]:focus,
body.light-mode #ai-petition-section textarea[class*="bg-[#121212]"]:focus {
    border-color: #D9A340 !important;
    background-color: #FFFFFF !important;
}

/* Sözleşme Hazırlayıcı - Açık Mod Stilleri */
body.light-mode #ai-contract-section {
    background-color: #FFFFFF !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-contract-section summary {
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-contract-section h2,
body.light-mode #ai-contract-section .text-white {
    color: #2D3748 !important;
}

body.light-mode #ai-contract-section .text-gray-300,
body.light-mode #ai-contract-section .text-gray-400 {
    color: #4A5568 !important;
}

body.light-mode #ai-contract-section .text-gray-500 {
    color: #718096 !important;
}

body.light-mode #ai-contract-section div[class*="bg-[#262626]"],
body.light-mode #ai-contract-section div[class*="bg-[#121212]"] {
    background-color: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-contract-section div[class*="bg-[#262626]"] .text-white {
    color: #2D3748 !important;
}

body.light-mode #ai-contract-section div[class*="bg-[#262626]"] .text-gray-400 {
    color: #4A5568 !important;
}

body.light-mode #ai-contract-section input[class*="bg-[#121212]"],
body.light-mode #ai-contract-section select[class*="bg-[#121212]"],
body.light-mode #ai-contract-section textarea[class*="bg-[#121212]"] {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
    color: #2D3748 !important;
}

body.light-mode #ai-contract-section input[class*="bg-[#121212]"]::placeholder,
body.light-mode #ai-contract-section textarea[class*="bg-[#121212]"]::placeholder {
    color: #A0AEC0 !important;
}

body.light-mode #ai-contract-section input[class*="bg-[#121212]"]:focus,
body.light-mode #ai-contract-section select[class*="bg-[#121212]"]:focus,
body.light-mode #ai-contract-section textarea[class*="bg-[#121212]"]:focus {
    border-color: #D9A340 !important;
    background-color: #FFFFFF !important;
}

body.light-mode #ai-contract-section svg rect[fill="#1A1A1A"] {
    fill: #FFFFFF !important;
}

body.light-mode #ai-contract-section svg text[fill="#EAEAEA"] {
    fill: #2D3748 !important;
}

/* Hukuki Danışman - Açık Mod Stilleri */
body.light-mode #ai-chat-section {
    background-color: #FFFFFF !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-chat-section summary {
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-chat-section h2,
body.light-mode #ai-chat-section .text-white {
    color: #2D3748 !important;
}

body.light-mode #ai-chat-section .text-gray-300,
body.light-mode #ai-chat-section .text-gray-400 {
    color: #4A5568 !important;
}

body.light-mode #ai-chat-section .text-gray-500 {
    color: #718096 !important;
}

body.light-mode #ai-chat-section div[class*="bg-[#262626]"],
body.light-mode #ai-chat-section div[class*="bg-[#121212]"] {
    background-color: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-chat-section div[class*="bg-[#262626]"] .text-white {
    color: #2D3748 !important;
}

body.light-mode #ai-chat-section div[class*="bg-[#262626]"] .text-gray-400 {
    color: #4A5568 !important;
}

body.light-mode #ai-chat-section #chat-file-dropzone {
    background-color: #F1F5F9 !important;
    border-color: #CBD5E0 !important;
}

body.light-mode #ai-chat-section #chat-file-dropzone:hover {
    border-color: #D9A340 !important;
}

body.light-mode #ai-chat-section #chat-file-dropzone .text-gray-400 {
    color: #4A5568 !important;
}

body.light-mode #ai-chat-section #chat-file-dropzone .text-gray-500 {
    color: #718096 !important;
}

body.light-mode #ai-chat-section #chat-files-list .bg-\[#262626\] {
    background-color: #E2E8F0 !important;
    border-color: #CBD5E0 !important;
}

body.light-mode #ai-chat-section #chat-files-list .text-gray-300 {
    color: #2D3748 !important;
}

body.light-mode #ai-chat-section #chat-files-list .text-gray-500 {
    color: #718096 !important;
}

body.light-mode #ai-chat-section input[class*="bg-[#121212]"],
body.light-mode #ai-chat-section select[class*="bg-[#121212]"],
body.light-mode #ai-chat-section textarea[class*="bg-[#121212]"] {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
    color: #2D3748 !important;
}

body.light-mode #ai-chat-section input[class*="bg-[#121212]"]::placeholder,
body.light-mode #ai-chat-section textarea[class*="bg-[#121212]"]::placeholder {
    color: #A0AEC0 !important;
}

body.light-mode #ai-chat-section input[class*="bg-[#121212]"]:focus,
body.light-mode #ai-chat-section select[class*="bg-[#121212]"]:focus,
body.light-mode #ai-chat-section textarea[class*="bg-[#121212]"]:focus {
    border-color: #D9A340 !important;
    background-color: #FFFFFF !important;
}

body.light-mode #ai-chat-section svg rect[fill="#1A1A1A"] {
    fill: #FFFFFF !important;
}

body.light-mode #ai-chat-section svg text[fill="#EAEAEA"] {
    fill: #2D3748 !important;
}

/* Hukuki Danışman Chat Kutusu - Açık Mod Stilleri */
body.light-mode #ai-chat-section div[class*="bg-[#121212]"] {
    background-color: #FFFFFF !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-chat-section #chat-messages {
    background-color: #FFFFFF !important;
}

body.light-mode #ai-chat-section #chat-messages .text-gray-300 {
    color: #2D3748 !important;
}

body.light-mode #ai-chat-section #chat-input {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
    color: #2D3748 !important;
}

body.light-mode #ai-chat-section #chat-input::placeholder {
    color: #A0AEC0 !important;
}

body.light-mode #ai-chat-section #chat-input:focus {
    border-color: #D9A340 !important;
    background-color: #FFFFFF !important;
}

body.light-mode #ai-chat-section .border-t.border-\[#333\] {
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-chat-section #chat-messages div[class*="bg-[#1A1A1A]"] {
    background-color: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-chat-section #chat-messages div[class*="bg-[#1A1A1A]"] .text-gray-300 {
    color: #2D3748 !important;
}

body.light-mode #ai-chat-section #chat-error {
    color: #DC2626 !important;
}

body.light-mode #ai-chat-section #chat-loader {
    color: #4A5568 !important;
}

body.light-mode #ai-chat-section #hukukos-loading-logo rect[fill="#1A1A1A"] {
    fill: #FFFFFF !important;
}

body.light-mode #ai-chat-section #hukukos-loading-logo text[fill="#EAEAEA"] {
    fill: #2D3748 !important;
}

body.light-mode #ai-petition-section input[type="checkbox"] {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
}

body.light-mode #ai-petition-section svg rect[fill="#1A1A1A"] {
    fill: #FFFFFF !important;
}

body.light-mode #ai-petition-section svg text[fill="#EAEAEA"] {
    fill: #2D3748 !important;
}

body.light-mode #ai-petition-section #petition-cases-container {
    background-color: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #ai-petition-section #petition-cases-container .text-white {
    color: #2D3748 !important;
}

body.light-mode #ai-petition-section #petition-cases-container .text-gray-300 {
    color: #4A5568 !important;
}

body.light-mode #ai-petition-section #petition-output {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
    color: #2D3748 !important;
}

body.light-mode #ai-petition-section #petition-loader {
    color: #4A5568 !important;
}

body.light-mode #ai-petition-section #petition-loader .text-gray-400,
body.light-mode #ai-contract-section #contract-loader .text-gray-400 {
    color: #4A5568 !important;
}

body.light-mode #ai-petition-section #hukukos-petition-loading-logo rect[fill="#1A1A1A"],
body.light-mode #ai-contract-section #hukukos-contract-loading-logo rect[fill="#1A1A1A"] {
    fill: #FFFFFF !important;
}

body.light-mode #ai-petition-section #hukukos-petition-loading-logo text[fill="#EAEAEA"],
body.light-mode #ai-contract-section #hukukos-contract-loading-logo text[fill="#EAEAEA"] {
    fill: #2D3748 !important;
}

/* Dilekçe Karar Detay Modal - Açık Mod Stilleri */
body.light-mode #petition-case-modal {
    background: rgba(255, 255, 255, 0.95) !important;
}

body.light-mode #petition-case-modal .modal-card {
    background-color: #FFFFFF !important;
    border-color: #E2E8F0 !important;
}

body.light-mode #petition-case-modal .text-white,
body.light-mode #petition-case-modal h3 {
    color: #2D3748 !important;
}

body.light-mode #petition-case-modal .text-gray-300,
body.light-mode #petition-case-modal .text-gray-400 {
    color: #4A5568 !important;
}

body.light-mode #petition-case-modal .text-gray-200 {
    color: #2D3748 !important;
}

body.light-mode #petition-case-modal #petition-case-body {
    background-color: #F8F9FA !important;
    border-color: #E2E8F0 !important;
    color: #2D3748 !important;
}

body.light-mode #petition-case-modal button {
    color: #4A5568 !important;
}

body.light-mode #petition-case-modal button:hover {
    color: #2D3748 !important;
}

/* Kanun maddesi referans linkleri */
.law-ref {
    color: #D9A340;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.law-ref:hover {
    color: #B8860B;
    text-decoration: underline;
}

/* Law Modal */
#law-modal {
    z-index: 140;
}

#law-modal .modal-card {
    background-color: #141414;
    border: 1px solid #333;
}

#law-modal h2 {
    color: #D9A340;
    margin-bottom: 1rem;
}

#law-modal pre {
    color: #EAEAEA;
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}


/* ===== Petition JSON-based Deterministic System CSS ===== */
/* Dark mode (varsayılan) - beyaz yazı */
/* Dark mode (varsayılan) - beyaz yazı */
.petition { 
    font-family: "Times New Roman", serif; 
    font-size: 12pt; 
    line-height: 1.15; 
    color: #e5e7eb !important; 
}
.petition * { 
    color: #e5e7eb !important; 
}
.petition .title { text-align: center; font-weight: 700; text-transform: lowercase; font-variant: small-caps; margin: 6pt 0 10pt; }
.petition .kunye { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; margin: 6pt 0 10pt; }
.petition .kunye .label { font-weight: 700; }
.petition p { margin: 0 0 6pt; text-indent: 0; text-align: justify; color: #e5e7eb !important; }
.petition .section { font-weight: 700; text-transform: uppercase; margin: 10pt 0 6pt; }
.petition ol { 
    margin: 0 0 6pt; 
    /* Paragraflarla uyumlu, hafif bir girinti bırak */
    padding-left: 10pt; 
    list-style-type: decimal;           /* DELİLLER listesindeki numaraları göster */
    list-style-position: outside;
}
.petition li { 
    margin: 0 0 4pt; 
    color: #e5e7eb !important; 
}
.petition h1, .petition h2, .petition h3, .petition h4, .petition h5, .petition h6 { 
    color: #e5e7eb !important; 
    font-weight: bold !important;
}
.petition div, .petition span, .petition a, .petition strong, .petition b, .petition em, .petition i { color: #e5e7eb !important; }

/* Dilekçe önizleme: TÜM içerik SOLA hizalı olsun (başlıklar, alanlar, paragraflar) */
#petition-preview,
#petition-preview * {
    text-align: left !important;
}
/* Önizleme penceresi - beyaz arka plan, siyah yazı (her zaman) */
#petition-preview { 
    color: #2D3748 !important; 
    background-color: #FFFFFF !important; 
}
#petition-preview *,
#petition-preview *::before,
#petition-preview *::after { 
    color: #2D3748 !important; 
}
/* Önizleme içinde DELİLLER listesinin numaralarını göster */
#petition-preview ol {
    list-style-type: decimal !important;
    list-style-position: outside !important;
    /* Önizlemede de paragraflarla uyumlu hafif girinti */
    padding-left: 10pt;
}
#petition-preview.petition,
#petition-preview.petition *,
#petition-preview.petition p, 
#petition-preview.petition div, 
#petition-preview.petition span, 
#petition-preview.petition h1, 
#petition-preview.petition h2, 
#petition-preview.petition h3, 
#petition-preview.petition h4,
#petition-preview.petition h5,
#petition-preview.petition h6,
#petition-preview.petition li, 
#petition-preview.petition ol, 
#petition-preview.petition ul,
#petition-preview.petition a,
#petition-preview.petition strong,
#petition-preview.petition b,
#petition-preview.petition em,
#petition-preview.petition i { 
    color: #2D3748 !important; 
}
#petition-preview body,
#petition-preview body * { 
    color: #2D3748 !important; 
}
#petition-preview .field-label, 
#petition-preview .field-value,
#petition-preview .field-row,
#petition-preview .field-row * { 
    color: #2D3748 !important; 
}
/* Tailwind text-gray-100 override */
#petition-preview.text-gray-100,
#petition-preview .text-gray-100,
#petition-preview.text-gray-100 * {
    color: #2D3748 !important;
}
/* Tüm olası elementler için önizleme (beyaz arka plan, siyah yazı) */
#petition-preview div,
#petition-preview p,
#petition-preview span,
#petition-preview h1,
#petition-preview h2,
#petition-preview h3,
#petition-preview h4,
#petition-preview h5,
#petition-preview h6,
#petition-preview li,
#petition-preview ul,
#petition-preview ol,
#petition-preview a,
#petition-preview strong,
#petition-preview b,
#petition-preview em,
#petition-preview i,
#petition-preview label,
#petition-preview table,
#petition-preview td,
#petition-preview th,
#petition-preview tr {
    color: #2D3748 !important;
}

/* Light mode - siyah yazı */
body.light-mode .petition { color: #2D3748 !important; }
body.light-mode .petition * { color: #2D3748 !important; }
body.light-mode .petition p,
body.light-mode .petition div,
body.light-mode .petition span,
body.light-mode .petition h1,
body.light-mode .petition h2,
body.light-mode .petition h3,
body.light-mode .petition li,
body.light-mode .petition ol,
body.light-mode .petition ul { color: #2D3748 !important; }

body.light-mode #petition-preview { 
    color: #2D3748 !important; 
    background-color: #FFFFFF !important; 
}
body.light-mode #petition-preview * { 
    color: #2D3748 !important; 
}
body.light-mode #petition-preview.petition,
body.light-mode #petition-preview.petition *,
body.light-mode #petition-preview.petition p, 
body.light-mode #petition-preview.petition div, 
body.light-mode #petition-preview.petition span, 
body.light-mode #petition-preview.petition h1, 
body.light-mode #petition-preview.petition h2, 
body.light-mode #petition-preview.petition h3, 
body.light-mode #petition-preview.petition li, 
body.light-mode #petition-preview.petition ol, 
body.light-mode #petition-preview.petition ul { 
    color: #2D3748 !important; 
}
body.light-mode #petition-preview body { 
    color: #2D3748 !important; 
}
body.light-mode #petition-preview .field-label, 
body.light-mode #petition-preview .field-value { 
    color: #2D3748 !important; 
}
/* Tailwind text-gray-100 override - light mode */
body.light-mode #petition-preview.text-gray-100,
body.light-mode #petition-preview .text-gray-100 {
    color: #2D3748 !important;
}

/* ==================== ANALİZ RAPORU ÖNİZLEME STİLLERİ ==================== */

/* Analiz container ve içeriği - sola hizalı, düzgün rapor formatı */
#petition-analysis-container {
    width: 100%;
}

#petition-analysis-container label {
    text-align: left !important;
}

#petition-analysis {
    font-family: "Times New Roman", serif !important;
    font-size: 12pt !important;
    line-height: 1.6 !important;
    text-align: left !important;
    color: #e5e7eb !important;
    background-color: #1a1a1a !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-indent: 0 !important;
}

#petition-analysis * {
    text-align: left !important;
    text-indent: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

#petition-analysis p,
#petition-analysis div,
#petition-analysis span {
    text-align: left !important;
    margin: 0.5em 0 !important;
    margin-left: 0 !important;     /* Sol marj yok */
    text-indent: 0 !important;     /* Paragraf başı girinti yok */
    padding-left: 0 !important;     /* Soldan ek boşluk yok */
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#petition-analysis h1,
#petition-analysis h2,
#petition-analysis h3,
#petition-analysis h4,
#petition-analysis h5,
#petition-analysis h6 {
    text-align: left !important;
    font-weight: bold !important;
    margin-top: 1em !important;
    margin-bottom: 0.5em !important;
}

#petition-analysis strong,
#petition-analysis b {
    font-weight: bold !important;
    color: inherit !important;
}

#petition-analysis ul,
#petition-analysis ol {
    text-align: left !important;
    padding-left: 2em !important;
    margin: 0.5em 0 !important;
    margin-left: 0 !important;
    counter-reset: list-item 0 !important;  /* Numaralandırma 1'den başlasın */
}

#petition-analysis ol {
    list-style-type: decimal !important;
    list-style-position: outside !important;
}

#petition-analysis li {
    text-align: left !important;
    margin: 0.25em 0 !important;
}

/* Light mode için analiz raporu stilleri */
/* Analiz çıktısı - Dark Mode (Varsayılan) */
#petition-analysis {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    color: #e5e7eb !important;
}

#petition-analysis,
#petition-analysis *,
#petition-analysis p,
#petition-analysis div,
#petition-analysis span,
#petition-analysis h1,
#petition-analysis h2,
#petition-analysis h3,
#petition-analysis h4,
#petition-analysis h5,
#petition-analysis h6 {
    color: #e5e7eb !important;
}

/* Analiz çıktısı - Light Mode (Tema-Aware) - GÜÇLÜ OVERRIDE */
body.light-mode #petition-analysis,
html body.light-mode #petition-analysis {
    color: #1a202c !important;
    background-color: #f7fafc !important;
    background: #f7fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
}

body.light-mode #petition-analysis *,
body.light-mode #petition-analysis p,
body.light-mode #petition-analysis div,
body.light-mode #petition-analysis span,
html body.light-mode #petition-analysis * {
    color: #1a202c !important;
}

body.light-mode #petition-analysis h1,
body.light-mode #petition-analysis h2,
body.light-mode #petition-analysis h3,
body.light-mode #petition-analysis h4,
body.light-mode #petition-analysis h5,
body.light-mode #petition-analysis h6,
body.light-mode #petition-analysis .analysis-heading,
body.light-mode #petition-analysis strong,
html body.light-mode #petition-analysis h1,
html body.light-mode #petition-analysis h2,
html body.light-mode #petition-analysis h3 {
    color: #2d3748 !important;
}

body.light-mode #petition-analysis-container label {
    color: #4A5568 !important;
}

/* "Belge Analizi" başlığını analiz modunda gizle */
#petition-analysis-label[style*="display: none"] {
    display: none !important;
}

/* Gelişmiş Mod Dropzone Stilleri */
#petition-dropzone-advanced {
    user-select: none;
    transition: all 0.2s ease;
}

#petition-dropzone-advanced:hover {
    border-color: rgba(59, 130, 246, 0.5) !important;
    background-color: #1e293b !important;
}

#petition-dropzone-advanced.border-\[#3b82f6\] {
    border-color: #3b82f6 !important;
    background-color: #1e293b !important;
}

/* Light mode için dropzone */
body.light-mode #petition-dropzone-advanced {
    background-color: #F1F5F9 !important;
    border-color: #CBD5E0 !important;
}

body.light-mode #petition-dropzone-advanced:hover {
    background-color: #E2E8F0 !important;
    border-color: #3b82f6 !important;
}

body.light-mode #petition-dropzone-advanced.border-\[#3b82f6\] {
    background-color: #E2E8F0 !important;
    border-color: #3b82f6 !important;
}

body.light-mode #petition-dropzone-content-advanced p {
    color: #2D3748 !important;
}

body.light-mode #petition-dropzone-content-advanced .text-gray-400 {
    color: #718096 !important;
}

/* ==================== REVİZYON ALANI STİLLERİ ==================== */

#petition-revision-container {
    margin-top: 1.5rem;
}

#petition-revision-container label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e5e7eb;
    margin-bottom: 0.75rem;
}

#petition-revision-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 0.5rem;
    color: #e5e7eb;
    font-size: 0.875rem;
    resize: none;
    transition: border-color 0.2s;
}

#petition-revision-input:focus {
    outline: none;
    border-color: #3b82f6;
}

#petition-revision-input::placeholder {
    color: #718096;
}

#btn-revise-petition {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #3b82f6;
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

#btn-revise-petition:hover:not(:disabled) {
    background-color: #2563eb;
}

#btn-revise-petition:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Light mode for revision container */
body.light-mode #petition-revision-container label {
    color: #2D3748 !important;
}

body.light-mode #petition-revision-input {
    background-color: #FFFFFF !important;
    border-color: #CBD5E0 !important;
    color: #2D3748 !important;
}

body.light-mode #petition-revision-input::placeholder {
    color: #718096 !important;
}

body.light-mode #petition-revision-input:focus {
    border-color: #3b82f6 !important;
}

/* ==================== TAM EKRAN ÖNİZLEME MODAL (Karar Modal'ı gibi) ==================== */

#petition-fullscreen-modal {
    z-index: 120;
}

#petition-fullscreen-modal #petition-fullscreen-content {
    background-color: #FFFFFF;
    color: #2D3748;
    font-family: "Times New Roman", serif;
    font-size: 12pt;
    line-height: 1.6;
    text-align: left !important;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

#petition-fullscreen-modal #petition-fullscreen-content * {
    color: #2D3748 !important;
    text-align: left !important;
}

/* Tam ekran modal container'ı sola hizala */
#petition-fullscreen-modal {
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

#petition-fullscreen-modal > div {
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

#petition-fullscreen-modal > div > div:last-child {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
}

#petition-fullscreen-modal > div > div:last-child > div {
    text-align: left !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Light mode - Tam ekran modal */
body.light-mode #petition-fullscreen-modal {
    background-color: rgba(0, 0, 0, 0.9) !important;
}

body.light-mode #petition-fullscreen-modal.bg-black\/90 {
    background-color: rgba(0, 0, 0, 0.9) !important;
}

body.light-mode #petition-fullscreen-modal h3 {
    color: #D9A340 !important;
}

body.light-mode #petition-fullscreen-modal #petition-fullscreen-content {
    background-color: #FFFFFF !important;
    color: #2D3748 !important;
}

body.light-mode #petition-fullscreen-modal #petition-fullscreen-content * {
    color: #2D3748 !important;
}

body.light-mode #petition-fullscreen-modal button {
    color: #9CA3AF !important;
}

body.light-mode #petition-fullscreen-modal button:hover {
    color: #FFFFFF !important;
}

/* Light mode - Sola hizalama */
body.light-mode #petition-fullscreen-modal {
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

body.light-mode #petition-fullscreen-modal > div {
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

body.light-mode #petition-fullscreen-modal #petition-fullscreen-content {
    text-align: left !important;
}

body.light-mode #petition-fullscreen-modal #petition-fullscreen-content * {
    text-align: left !important;
}

/* Mobil için tam ekran modal */
@media (max-width: 768px) {
    #petition-fullscreen-modal {
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    
    #petition-fullscreen-modal > div {
        padding: 1rem !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    
    #petition-fullscreen-modal #petition-fullscreen-content {
        padding: 1rem !important;
        font-size: 11pt !important;
        text-align: left !important;
    }
    
    #petition-fullscreen-modal #petition-fullscreen-content * {
        text-align: left !important;
    }
}

/* ==================== GELİŞMİŞ MOD UI/UX İYİLEŞTİRMELERİ ==================== */

/* Dosya kartları - Gelişmiş Mod */
.file-card-advanced {
    transition: all 0.2s ease;
}

.file-card-advanced:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Premium Analiz Kartı */
.premium-analysis-card {
    transition: all 0.3s ease;
}

.premium-analysis-card:hover {
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
    transform: translateY(-1px);
}

.premium-analysis-card input[type="checkbox"]:checked + label {
    color: #e0e7ff;
}

/* Premium Analiz Kartı - Aktif Durum (Checkbox işaretlendiğinde) */
.premium-analysis-card.premium-analysis-active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(59, 130, 246, 0.3) 50%, rgba(99, 102, 241, 0.3) 100%);
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

/* Premium Analiz Kartı - Light Mode */
body.light-mode .premium-analysis-card label,
body.light-mode .premium-analysis-card label div,
body.light-mode #premium-analysis-card label,
body.light-mode #premium-analysis-card label div,
body.light-mode .premium-analysis-card .text-gray-200,
body.light-mode #premium-analysis-card .text-gray-200 {
    color: #000000 !important;
}

body.light-mode .premium-analysis-card .text-gray-400,
body.light-mode #premium-analysis-card .text-gray-400 {
    color: #4a5568 !important;
}

/* Yargıtay Kararları Checkbox Wrapper */
.cases-checkbox-wrapper {
    transition: background-color 0.2s ease;
}

/* Buton hiyerarşisi - PRIMARY */
#btn-generate-petition {
    order: 1;
}

/* Buton hiyerarşisi - SECONDARY */
#btn-analyze-documents {
    order: 2;
}

/* Oluşturulan Dilekçe fade-in */
#petition-result {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

#petition-result:not(.hidden) {
    opacity: 1;
}

/* Premium Analiz Loading Modu */
.petition-loader-analysis-mode #petition-loader-text {
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    color: #e5e7eb !important;
}

.petition-loader-analysis-mode #petition-loader-text .premium-analysis-text {
    background: linear-gradient(135deg, rgba(139, 92, 246, 1) 0%, rgba(59, 130, 246, 1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600 !important;
    display: inline-block;
}

.petition-loader-analysis-mode #petition-loader-text .text-purple-400 {
    color: rgba(192, 132, 252, 0.8) !important;
}

/* Premium Analiz Progress Bar */
.premium-analysis-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.premium-analysis-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, 
        rgba(139, 92, 246, 0.8) 0%, 
        rgba(99, 102, 241, 0.9) 50%, 
        rgba(59, 130, 246, 0.8) 100%);
    border-radius: 3px;
    animation: premium-progress-shimmer 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

@keyframes premium-progress-shimmer {
    0% {
        transform: translateX(-100%);
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(350%);
        opacity: 0.6;
    }
}

/* Premium Progress Panel Container */
#petition-analysis-progress-panel {
    padding: 1rem;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

/* Analiz Önizleme Çıktısı - Sola yaslı, girinti yok */
#petition-analysis {
    text-align: left !important;
}

#petition-analysis p,
#petition-analysis div,
#petition-analysis li {
    padding-left: 0 !important;
    margin-left: 0 !important;
    text-indent: 0 !important;
}

#petition-analysis > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ANALİZ RAPORU FORMATI - AKADEMİK/HUKUKİ RAPOR GÖRÜNÜMÜ */
/* SADECE .analysis-report-mode class'ı olan elementler için geçerli */

/* 1) PARAGRAF FORMATI - RAPOR STİLİ */
.analysis-report-mode p,
.analysis-report-mode .analysis-paragraph {
    text-indent: 0 !important;
    margin-bottom: 1.1em !important;
    text-align: justify !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    line-height: 1.7 !important;
}

/* 2) BAŞLIKLAR - RAPOR FORMATI (TAMAMEN BÜYÜK HARF, ORTALI) */
.analysis-report-mode h1,
.analysis-report-mode h2,
.analysis-report-mode h3,
.analysis-report-mode h4,
.analysis-report-mode h5,
.analysis-report-mode h6,
.analysis-report-mode .analysis-heading,
.analysis-report-mode strong.analysis-heading {
    display: block !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-top: 2em !important;
    margin-bottom: 1em !important;
    font-weight: bold !important;
}

/* İlk başlık için üst margin azalt */
.analysis-report-mode h1:first-child,
.analysis-report-mode h2:first-child,
.analysis-report-mode h3:first-child,
.analysis-report-mode .analysis-heading:first-child {
    margin-top: 1em !important;
}

/* 3) GENEL HİZALAMA - JUSTIFY */
.analysis-report-mode,
.analysis-report-mode * {
    direction: ltr !important;
}

.analysis-report-mode div,
.analysis-report-mode span {
    text-align: justify !important;
}

/* Inline style override */
.analysis-report-mode [style*="text-align"] {
    text-align: justify !important;
}

/* 4) Listeler kaldırıldı, sadece güvenlik için */
.analysis-report-mode ol,
.analysis-report-mode ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.analysis-report-mode li {
    display: block !important;
    margin-bottom: 0.8em !important;
    text-align: justify !important;
}

/* KVKK Bilgilendirme Kutusu */
.kvkk-info-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 14px auto;
    padding: 10px 14px;
    max-width: 680px;
    font-size: 12.5px;
    line-height: 1.4;
    color: #d6d6d6;
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid #caa34d;
    border-right: 3px solid #caa34d;
    border-radius: 6px;
}

.kvkk-icon {
    font-size: 20px;
    color: #caa34d;
}

.kvkk-text strong {
    color: #f1c86b;
    font-weight: 600;
}

/* AI Badge Text - Alt kartlardaki AI rozetiyle aynı renk ve parlaklık */
.ai-badge-text {
    background: linear-gradient(135deg, #D9A340 0%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}
