/* Temel Ayarlar */
@import url('../css/lingo-logo.css');

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: rgba(79, 70, 229, 0.08);
    --primary-border: rgba(79, 70, 229, 0.18);
    --secondary-color: #0d9488;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 14px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(79, 70, 229, 0.06);
    --app-header-height: 68px;
    --story-actions-sticky-top: var(--app-header-height);
}

html {
    zoom: 1;
    overflow-x: clip;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.08), transparent),
        linear-gradient(to right, rgba(79, 70, 229, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(79, 70, 229, 0.04) 1px, transparent 1px);
    background-size: auto, 48px 48px, 48px 48px;
    background-attachment: fixed;
    font-family: 'Raleway', 'Source Sans 3', sans-serif;
    margin: 0;
    padding: 60px 0 2.5rem;
    color: var(--text-main);
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }
}

/* Header */
.app-header {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.85rem 0;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    min-height: 40px;
}

.header-content__back {
    justify-self: start;
    min-width: 0;
}

.header-content__logo {
    justify-self: center;
    min-width: 0;
    max-width: 100%;
    text-align: center;
}

.header-content__end {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.logo-area {
    position: static;
    transform: none;
    text-align: center;
    pointer-events: none;
    min-width: 0;
    max-width: 100%;
}

.logo-area h1,
.logo-area .tool-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    pointer-events: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.logo-area .tool-title i {
    color: var(--primary-color);
    font-size: 1.05rem;
}

.logo-area .tool-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-area:empty {
    display: none;
}

/* Ana Konteyner */
.main-container {
    width: 100%;
    max-width: 1180px;
    margin: 1.75rem auto 0;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
    gap: 1.35rem;
    padding: 0 1.25rem;
    box-sizing: border-box;
    min-width: 0;
}

.input-section,
.result-section {
    min-width: 0;
    max-width: 100%;
}

.input-section .card {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    :root {
        --app-header-height: 52px;
    }

    .app-header {
        width: 100%;
        padding: 10px 0;
    }

    .header-content {
        padding: 0 12px;
        gap: 6px;
        min-height: 36px;
    }

    .main-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        margin: 24px auto 32px;
        padding: 0 14px;
    }
    
    .logo-area h1,
    .logo-area .tool-title {
        font-size: 1rem;
        max-width: min(58vw, 240px);
    }

    .logo-area .tool-subtitle {
        display: none;
    }

    .header-util-buttons .tool-watermark-btn--md {
        --tool-watermark-size: 1.65rem;
    }

    .editable-title {
        font-size: 1.25rem;
    }

    .content-text {
        font-size: 1.05rem;
        line-height: 1.65;
    }

    .pdf-preview-section {
        padding: 0 14px;
        margin: 20px auto 32px;
    }

    .pdf-preview-canvas-wrap {
        min-height: 280px;
    }

    .pdf-preview-pages {
        max-height: 50vh;
        padding: 12px;
    }
}

/* Kart Yapısı */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 0.95rem 1.35rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.card-header h2 {
    margin: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.card-header .card-desc {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-light);
    line-height: 1.45;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.card-body-section {
    padding: 1.15rem 1.35rem;
}

.card-body-section + .card-body-section {
    border-top: 1px solid var(--border-color);
}

.card-body-section--primary {
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.03) 0%, transparent 100%);
}

.card-section-title {
    margin: 0 0 0.85rem;
    font-family: 'Raleway', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-light);
}

.card-body label,
.card-body .option-group > label {
    font-weight: 600;
    font-size: 0.84rem;
    margin-bottom: 0.4rem;
    color: #334155;
}

.card-body .label-optional {
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
}

.card-body .label-optional::before {
    content: '· ';
}

.card-body-footer {
    padding: 1rem 1.35rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: #fafbfc;
}

.card-body-footer .primary-btn {
    margin-top: 0;
}

.card-body #wordsInput {
    min-height: 5.5rem;
    height: auto;
}

.card-body .input-area .form-group--inline .filter-input {
    max-width: 100%;
}

.card h2 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.card-desc {
    color: var(--text-light);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.55;
}

/* Gelişmiş seçenekler bölümü */
.advanced-options {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.settings-block {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    padding: 0.9rem 1rem;
}

.settings-block-label {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.settings-block--hero .option-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    padding: 0.85rem 0.9rem;
    margin-bottom: 0;
}

.settings-block--questions {
    background: #fff;
}

.settings-row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1rem;
}

.settings-row--2col .option-group {
    margin-bottom: 0;
}

@media (max-width: 520px) {
    .settings-row--2col {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
}

.options-section-title {
    margin: 0 0 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
}

.option-group {
    margin-bottom: 0.9rem;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-group--toggle {
    margin-bottom: 0;
}

.option-group > label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.55rem;
}

.option-panel {
    background: #f8fafc;
    border: 1px solid rgba(79, 70, 229, 0.1);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.85rem;
}

.option-panel:last-child {
    margin-bottom: 0;
}

/* --- YENİ: Giriş Modu Sekmeleri --- */
.input-mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #f1f2f6;
    padding: 5px;
    border-radius: 12px;
}

.mode-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mode-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* VocFount Kontrolleri (GELİŞMİŞ) */
.vocfount-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e1e4ea;
}

.filter-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-col {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.filter-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 8px;
}

/* Yeni Filtre Inputları */
.filter-input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    color: var(--text-main);
    box-sizing: border-box;
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.danisan-input-wrapper .filter-input {
    padding-right: 2.75rem;
    margin-top: 0;
}

.option-group .filter-input {
    margin-top: 0;
}

.target-age-select {
    min-height: 44px;
    padding-right: 2.25rem;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    touch-action: manipulation;
}

/* Custom Radio Buttons */
.position-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    user-select: none;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 50%;
    transition: background 0.2s;
}

.radio-container:hover input ~ .radio-checkmark {
    background-color: #ccc;
}

.radio-container input:checked ~ .radio-checkmark {
    background-color: var(--primary-color);
}

.radio-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-container input:checked ~ .radio-checkmark:after {
    display: block;
}

.radio-container .radio-checkmark:after {
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* Aksiyon Alanı (Göz İkonu vb.) */
.action-area {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.icon-btn {
    background: white;
    border: 2px solid #dfe6e9;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: all 0.2s;
}

.icon-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f1f2f6;
}

.count-badge {
    background: #fdcb6e;
    color: #d35400;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
}

/* MODAL STİLLERİ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-family: 'Comfortaa', sans-serif;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover { color: #e74c3c; }

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.tags-container.large-container {
    max-height: 300px;
    min-height: 100px;
    background: #f8f9fa;
    padding: 20px;
}

.modal-footer {
    margin-top: 20px;
    text-align: right;
}

.small-btn {
    width: auto;
    padding: 10px 30px;
    margin-top: 0;
    display: inline-flex;
}

/* KELİME ETİKETLERİ */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: white;
    border: 1px dashed #ccc;
    border-radius: 8px;
    overflow-y: auto;
}

.placeholder-text {
    color: #aaa;
    font-style: italic;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
    margin-top: 15px;
}

.word-tag {
    background: #e3f2fd;
    color: #0984e3;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.word-tag:hover {
    background: #d1e8ff;
    transform: translateY(-1px);
}

/* KIRMIZI (Hariç Tutulan) KELİME */
.word-tag.excluded {
    background: #ffeaa7;
    color: #d63031;
    border-color: #d63031;
    text-decoration: line-through;
    opacity: 0.7;
}

.word-tag.excluded:hover {
    opacity: 1;
    background: #fab1a0;
}

/* Scrollbar */
.tags-container::-webkit-scrollbar {
    width: 8px;
}
.tags-container::-webkit-scrollbar-thumb {
    background-color: #b2bec3;
    border-radius: 4px;
}

/* Form Elemanları */
.card-body .form-group {
    margin-bottom: 0.85rem;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.45rem;
    color: var(--text-main);
    font-size: 0.88rem;
}

.label-optional {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.78rem;
}

.question-count-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

textarea {
    width: 100%;
    height: 110px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: #fff;
    line-height: 1.5;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.story-direction-input {
    height: auto;
    min-height: 4.5rem;
    max-height: 9rem;
}

.hint {
    display: block;
    margin-top: 0.35rem;
    color: #94a3b8;
    font-size: 0.76rem;
    line-height: 1.45;
}

.card-body .hint {
    margin-top: 0.3rem;
}

/* Etiketler (Tags) */
.tags {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.tag {
    background: #fff;
    padding: 0.38rem 0.72rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid var(--border-color);
    line-height: 1.3;
    user-select: none;
}

.tag:hover {
    border-color: var(--primary-border);
    color: var(--primary-color);
    background: var(--primary-soft);
}

.tag.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.22);
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    cursor: pointer;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(24px); }

.toggle-label {
    font-weight: 600;
    font-size: 0.84rem;
    color: var(--text-main);
}

.question-options {
    margin-left: 0;
    padding: 0.85rem 0.9rem;
    border-left: none;
    border-top: none;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    animation: slideDown 0.3s ease;
    margin-top: 0.75rem;
}

.question-count-tags {
    margin-bottom: 0.75rem !important;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ana Buton */
.primary-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    margin-top: 1.25rem;
    letter-spacing: 0.01em;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.22);
}

.primary-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: none;
}

.create-btn-limit-msg {
    margin-top: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #92400e;
    font-size: 0.82rem;
    text-align: center;
    line-height: 1.45;
}

.create-btn-limit-msg.hidden {
    display: none;
}

/* Sağ Panel (Sonuç) */
.result-section {
    min-height: 400px;
    overflow-x: clip;
}

.state-box {
    text-align: center;
    padding: 2.5rem 1.75rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    height: 100%;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.state-box h3 {
    font-family: 'Raleway', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.state-box p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 28rem;
}

.empty-state-visual {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.25rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(99, 102, 241, 0.06) 100%);
    border: 1px solid var(--primary-border);
    color: var(--primary-color);
    font-size: 2rem;
}

.empty-state-visual i {
    font-size: 2rem;
}

.hidden {
    display: none !important;
}

/* Hikaye Kartı */
.story-card {
    --story-card-padding: 1.75rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--story-card-padding);
    position: relative;
    animation: fadeIn 0.5s ease;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    overflow-x: clip;
    box-sizing: border-box;
    box-shadow: var(--shadow);
}

@media (max-width: 1024px) {
    .story-card {
        overflow-x: visible;
    }
}

#pdf-explanation-inline-root,
#pdf-explanation-inline-root.pdf-exp-inline-host {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
}

@media (max-width: 768px) {
    .story-card {
        --story-card-padding: 1.1rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BAŞLIK + BUTONLAR AYNI SATIRDA */
.story-header-area {
    margin-bottom: 1.15rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-title-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.editable-title {
    width: 100%;
    border: none;
    background: transparent;
    font-family: 'Raleway', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    padding: 5px;
    border-radius: 8px;
    transition: background 0.2s;
    box-sizing: border-box;
    letter-spacing: -0.02em;
}

.editable-title:focus {
    outline: none;
    background: var(--primary-soft);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.title-edit-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #dcdde1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.story-header-area:hover .title-edit-icon {
    opacity: 1;
}


.action-btn {
    background: white;
    border: 1px solid #dfe6e9;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

/* Sticky minimal araç çubuğu — tek satır */
.story-actions-row {
    position: sticky;
    top: var(--story-actions-sticky-top);
    z-index: 90;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 14px;
    padding: 8px 10px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.story-actions-row::-webkit-scrollbar {
    display: none;
}

.story-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: var(--text-main);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    box-shadow: none;
    min-width: 0;
}

.story-toolbar-btn i {
    font-size: 0.78rem;
    opacity: 0.85;
}

.story-toolbar-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.12);
}

.story-toolbar-btn--edit {
    color: var(--primary-color);
    border-color: var(--primary-border);
    background: var(--primary-soft);
}

.story-toolbar-btn--edit:hover:not(:disabled) {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.28);
}

.story-toolbar-btn--pdf-primary {
    height: 38px;
    padding: 0 18px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    border: none;
    background: linear-gradient(135deg, #00043b 0%, #1a1a5e 100%);
    box-shadow: 0 3px 12px rgba(0, 4, 59, 0.32);
}

.story-toolbar-btn--pdf-primary i {
    opacity: 1;
    font-size: 0.9rem;
}

.story-toolbar-btn--pdf-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0a0a52 0%, #25257a 100%);
    box-shadow: 0 5px 16px rgba(0, 4, 59, 0.4);
    color: #fff;
    transform: translateY(-1px);
}

.story-toolbar-btn--assign {
    color: #1e7e34;
    border-color: rgba(30, 126, 52, 0.25);
    background: rgba(30, 126, 52, 0.07);
}

.story-toolbar-btn--assign:hover:not(:disabled) {
    background: rgba(30, 126, 52, 0.12);
}

#downloadPdfBtn:disabled,
#assignPdfBtn:disabled,
.story-toolbar-btn.loading {
    opacity: 0.6;
    cursor: wait;
}

.story-toolbar-divider {
    flex: 0 0 1px;
    align-self: stretch;
    width: 1px;
    min-height: 22px;
    margin: 0 2px;
    background: rgba(0, 0, 0, 0.1);
}

.story-toolbar-font-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    margin-left: auto;
    padding: 5px 10px 5px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.story-toolbar-font-label {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
}

.story-toolbar-font-select {
    flex: 0 0 auto;
    width: auto;
    box-sizing: border-box;
    min-width: 78px;
    margin: 0;
    padding: 7px 30px 7px 10px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-main);
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23636e72' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: none;
}

.story-toolbar-font-select:hover {
    border-color: #cbd5e1;
    background-color: #fff;
}

.story-toolbar-font-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Tablet + mobil araç çubuğu — tek satır, gerekirse yatay kaydırma */
@media (max-width: 1024px) {
    .story-actions-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 6px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .story-toolbar-divider {
        display: none;
    }

    .story-toolbar-btn,
    .story-toolbar-font-group {
        flex: 0 0 auto;
    }

    .story-toolbar-btn span {
        display: none;
    }

    .story-toolbar-btn {
        width: 34px;
        padding: 0;
    }

    .story-toolbar-btn--pdf-primary {
        width: auto;
        height: 34px;
        padding: 0 12px;
        font-size: 0.82rem;
    }

    .story-toolbar-btn--pdf-primary span {
        display: inline;
    }

    .story-toolbar-font-label {
        display: none;
    }

    .story-toolbar-font-group {
        margin-left: 0;
        padding: 4px 8px;
    }

    .story-toolbar-font-select {
        min-width: 68px;
        padding: 6px 28px 6px 8px;
        font-size: 0.8rem;
    }
}

/* Dar telefon — PDF de ikon, tek satır korunur */
@media (max-width: 560px) {
    .story-toolbar-btn--pdf-primary span {
        display: none;
    }

    .story-toolbar-btn--pdf-primary {
        width: 34px;
        padding: 0;
    }
}

/* Çok dar ekran — yalnızca son çare olarak yazı boyutu alt satıra */
@media (max-width: 380px) {
    .story-actions-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow-x: visible;
        gap: 8px;
    }

    .story-toolbar-btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
        padding: 0 4px;
    }

    .story-toolbar-font-group {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 100%;
        justify-content: stretch;
        padding: 0;
        border: none;
        background: transparent;
    }

    .story-toolbar-font-select {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}

/* PDF Önizleme Bölümü */
.pdf-preview-section {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto 50px;
    padding: 0 20px;
    box-sizing: border-box;
    min-width: 0;
    overflow-x: clip;
}

.pdf-preview-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    max-width: 100%;
    box-sizing: border-box;
}

.pdf-preview-title {
    font-family: 'Raleway', sans-serif;
    color: var(--text-main);
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.pdf-preview-title i {
    color: var(--primary-color);
}

.pdf-preview-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0 0 16px 0;
}

.pdf-preview-actions {
    margin-bottom: 16px;
}

.pdf-preview-refresh-btn {
    width: auto !important;
    padding: 12px 24px !important;
    margin-top: 0 !important;
    font-size: 1rem !important;
}

.pdf-preview-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 500px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    overflow: hidden;
}

.pdf-preview-pages {
    padding: 20px;
    max-height: 700px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pdf-preview-page-canvas {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    background: #fff;
}

.pdf-preview-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-light);
    font-size: 1rem;
    pointer-events: none;
}

.pdf-preview-placeholder i {
    font-size: 3rem;
    opacity: 0.5;
}

.pdf-preview-placeholder.hidden {
    display: none !important;
}

.action-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Hikaye resmi alanı */
.story-image-wrap {
    margin: 1rem 0 1.15rem;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--border-color);
}
.story-image-wrap.hidden {
    display: none !important;
}
.story-image-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
}
.story-image {
    max-width: 100%;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}
.content-text {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-main);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.content-text p,
.content-text li {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.content-text strong {
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.08);
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 700;
}

/* İstenen harfler (Hangi harf çok kullanılsın) — hikaye alanında kırmızı */
#storyResult .prefer-letter {
    color: #c0392b !important;
    font-weight: 600;
}

/* Hikaye alanı düzenlenebilir (contenteditable) */
#storyContent[contenteditable="true"] {
    min-height: 120px;
    padding: 12px;
    border-radius: 8px;
    outline: none;
}

#storyContent[contenteditable="true"]:focus {
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.18);
    background: rgba(79, 70, 229, 0.03);
}

/* Yükleme Animasyonu (Kitap) */
.magic-loader {
    perspective: 1000px;
    margin-bottom: 1.25rem;
}
.book {
    width: 60px;
    height: 40px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(30deg);
}
.page {
    width: 30px;
    height: 40px;
    background: #a5b4fc;
    position: absolute;
    right: 0;
    transform-origin: left;
    animation: flip 1.5s infinite linear;
}
.page:nth-child(2) { animation-delay: 0.5s; background: #6366f1; }
.page:nth-child(3) { animation-delay: 1s; background: #4f46e5; }

@keyframes flip {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(-180deg); }
}

/* =========================================
   PDF ŞABLON STİLLERİ (ÖZEL)
   ========================================= */
.pdf-container {
    width: 794px; /* A4 genişliği (yaklaşık) */
    background: #fff;
    padding: 40px;
    box-sizing: border-box;
    font-family: 'Source Sans 3', sans-serif;
    color: #2d3436;
}

.pdf-border {
    border: 4px dashed #ffeaa7;
    border-radius: 30px;
    padding: 50px 40px;
    background: #fff9ea; /* Hafif sarımtırak kitap kağıdı rengi */
    min-height: 900px;
    position: relative;
    overflow: hidden;
}

/* Köşe Süsleri */
.pdf-border::before, .pdf-border::after {
    content: "✦";
    font-size: 40px;
    color: #fdcb6e;
    position: absolute;
    z-index: 1;
}
.pdf-border::before { top: 10px; left: 15px; }
.pdf-border::after { bottom: 10px; right: 15px; }

/* Arka Plan Emojileri - Yarı Saydam ve Rastgele Dağıtılmış */
.pdf-background-emojis {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.emoji-bg {
    position: absolute;
    font-size: 3rem;
    opacity: 0.08;
    user-select: none;
    transform: rotate(var(--emoji-rotation, 0deg));
}

/* Rastgele pozisyonlar için her emoji'ye özel stil */
.pdf-background-emojis .emoji-bg:nth-child(1) { top: 8%; left: 5%; font-size: 2.5rem; --emoji-rotation: -15deg; }
.pdf-background-emojis .emoji-bg:nth-child(2) { top: 15%; right: 8%; font-size: 3rem; --emoji-rotation: 20deg; }
.pdf-background-emojis .emoji-bg:nth-child(3) { top: 30%; left: 12%; font-size: 2.8rem; --emoji-rotation: -25deg; }
.pdf-background-emojis .emoji-bg:nth-child(4) { top: 25%; right: 15%; font-size: 2.2rem; --emoji-rotation: 30deg; }
.pdf-background-emojis .emoji-bg:nth-child(5) { top: 45%; left: 8%; font-size: 3.2rem; --emoji-rotation: -10deg; }
.pdf-background-emojis .emoji-bg:nth-child(6) { top: 50%; right: 10%; font-size: 2.6rem; --emoji-rotation: 18deg; }
.pdf-background-emojis .emoji-bg:nth-child(7) { top: 65%; left: 6%; font-size: 2.9rem; --emoji-rotation: -22deg; }
.pdf-background-emojis .emoji-bg:nth-child(8) { top: 70%; right: 7%; font-size: 3.1rem; --emoji-rotation: 25deg; }
.pdf-background-emojis .emoji-bg:nth-child(9) { top: 80%; left: 15%; font-size: 2.4rem; --emoji-rotation: -18deg; }
.pdf-background-emojis .emoji-bg:nth-child(10) { top: 85%; right: 12%; font-size: 2.7rem; --emoji-rotation: 12deg; }
.pdf-background-emojis .emoji-bg:nth-child(11) { top: 55%; left: 20%; font-size: 2.3rem; --emoji-rotation: -30deg; }
.pdf-background-emojis .emoji-bg:nth-child(12) { top: 40%; right: 20%; font-size: 3rem; --emoji-rotation: 15deg; }

.pdf-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #ffeaa7;
    padding-bottom: 25px;
    position: relative;
    z-index: 2;
}

.pdf-header h1 {
    font-family: 'Comfortaa', sans-serif;
    color: #6c5ce7;
    font-size: 2.5rem;
    margin: 0;
    position: relative;
    z-index: 2;
}

.pdf-content {
    font-size: 15pt;
    line-height: 2;
    text-align: justify;
    position: relative;
    z-index: 2;
    padding: 0 10px;
    margin-bottom: 30px;
}

.pdf-content p {
    margin-bottom: 20px;
    text-indent: 1.5em;
}

.pdf-content strong {
    color: #d63031;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.pdf-content h2,
.pdf-content h3 {
    color: #00b894;
    font-family: 'Comfortaa', sans-serif;
    margin-top: 35px;
    margin-bottom: 20px;
    border-bottom: 2px solid #00b894;
    display: inline-block;
    padding-bottom: 5px;
    position: relative;
    z-index: 2;
}

.pdf-content ul,
.pdf-content ol {
    margin: 20px 0;
    padding-left: 30px;
    position: relative;
    z-index: 2;
}

.pdf-content li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.pdf-footer {
    margin-top: 60px;
    text-align: center;
    font-size: 10pt;
    color: #636e72;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    position: relative;
    z-index: 2;
}

/* =========================================
   YENİ: VocFount Modern Filtre Stilleri
   ========================================= */

/* Toggle Butonları (Sözcük Ara / Kavramlar) */
.filter-toggle-buttons {
  display: flex;
  background-color: #f1f2f6;
  border-radius: 12px;
  padding: 4px;
  position: relative;
  margin-bottom: 20px;
  border: 1px solid #e1e4ea;
}

.filter-toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 1rem;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.filter-toggle-btn.active {
  color: var(--primary-color);
}

/* Kayan arka plan efekti için slider (JS ile pozisyonlanabilir ama şimdilik basit .active class'ı kullanacağız) */
.filter-toggle-btn.active {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Modern Filtre Kartları - Yenilenmiş Tasarım */
.modern-filter {
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.03);
  background: #ffffff;
  padding: 24px;
  margin-bottom: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: visible;
}

.modern-filter:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.modern-filter::before { display: none; } /* Eski dekoru kaldır */

.modern-filter h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin: 0 0 16px 0;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Başlık yanına çizgi dekor */
.modern-filter h3::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #f1f2f6;
    border-radius: 2px;
}

/* Checkbox Grupları */
.modern-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  z-index: 1;
}

/* "Hepsi" Seçeneği - 3D Buton Tarzı */
.select-all-option {
  width: 100%;
  margin-bottom: 5px;
}

.select-all-option label {
  background-color: #f1f2f6;
  color: var(--text-light);
  padding: 10px 15px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 0 #dcdde1; /* Alt gölge */
  border: 1px solid transparent;
  margin-bottom: 3px; /* Tıklama payı */
}

.select-all-option label input {
    display: none;
}

.select-all-option label:hover {
    background-color: #e1e4ea;
    transform: translateY(-1px);
    box-shadow: 0 4px 0 #dcdde1;
}

.select-all-option input[type="checkbox"] {
    display: none; /* Checkbox'ı gizle, label yeterli */
}

/* Seçili "Hepsi" Durumu */
.select-all-option:has(input:checked) label {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 3px 0 var(--primary-hover);
}

.select-all-option label:active {
    transform: translateY(3px) !important;
    box-shadow: none !important;
    margin-bottom: 0;
    margin-top: 3px;
}

/* Grid Seçenekler (Rakamlar ve Kısaltmalar) - Baloncuk Tarzı */
.modern-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
  gap: 12px;
}

.modern-option {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 5px;
  cursor: pointer;
  border-radius: 14px;
  background: #ffffff;
  border: 2px solid #f1f2f6;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Yaylanma efekti */
  min-height: 50px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.modern-option:hover {
  border-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 184, 148, 0.15);
}

.modern-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.modern-option span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-light);
  transition: color 0.2s;
}

/* Seçili Durum - Renkli ve Dolu */
.modern-option:has(input:checked) {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
  transform: scale(1.05);
}

.modern-option:has(input:checked) span {
  color: white;
}

/* JS fallback class'ları */
.modern-option-checked {
  background: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3) !important;
  transform: scale(1.05);
}
.modern-option-checked span {
  color: white !important;
}

/* Input Grupları */
.modern-input-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.sound-input-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.sound-input-main-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    width: 100%;
    flex-wrap: wrap;
    overflow: hidden;
}

.sound-input-main-row input {
    flex: 1;
    min-width: 100px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ses Grupları ve Açıklama Stilleri */
.alofon-selection-container {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    width: auto;
    max-width: 100%;
    flex-wrap: wrap;
    visibility: visible;
    opacity: 1;
    flex-shrink: 1;
    flex-grow: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.alofon-group {
    margin: 0;
    padding: 4px 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.alofon-group label {
    display: inline-block;
    margin: 0;
    font-weight: 700;
    color: #0284c7;
    font-size: 12px;
}

.alofon-select {
    width: auto;
    min-width: 80px;
    max-width: 120px;
    padding: 4px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 12px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    height: auto;
    min-height: 28px;
    line-height: 1.4;
    appearance: auto;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    box-sizing: border-box;
    flex-shrink: 1;
}

.alofon-select:hover {
    border-color: #3b82f6;
}

.alofon-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.alofon-select option {
    padding: 6px 8px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
}

.alofon-select option:hover {
    background: #f0f9ff;
}

.sound-mode-description {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding: 16px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.sound-mode-description:empty {
    display: none;
}

.sound-groups-select {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e1e5e9;
    border-radius: 10px; /* Radius küçültüldü */
    padding: 8px 12px; /* Padding azaltıldı */
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem; /* Font küçültüldü */
    font-weight: 500;
    color: #2c3e50;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px; /* İkon küçültüldü */
}

.sound-groups-select:hover {
    border-color: #ff8c00;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.15);
    transform: translateY(-1px);
}

.sound-groups-select:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.1);
}

/* Select Box */
.modern-select-group {
    margin-bottom: 15px;
}

.modern-select {
    width: 100%;
    padding: 8px 12px; /* Padding azaltıldı */
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem; /* Font küçültüldü */
    font-family: 'Source Sans 3', sans-serif;
    color: var(--text-main);
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.modern-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Toggle Switch */
.toggle-section {
  margin-top: 10px; /* Margin azaltıldı */
  padding-top: 10px; /* Padding azaltıldı */
  border-top: 1px dashed #e1e4ea;
}

.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px; /* Margin azaltıldı */
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 8px; /* Gap azaltıldı */
  cursor: pointer;
}

.toggle-switch .toggle-slider {
  position: relative;
  width: 36px; /* Küçültüldü */
  height: 20px; /* Küçültüldü */
  background-color: #ccc;
  border-radius: 20px;
  transition: .4s;
}

.toggle-switch .toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px; /* Küçültüldü */
  width: 16px; /* Küçültüldü */
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px); /* Ayarlandı */
}

.toggle-switch .toggle-label {
  font-size: 0.85rem; /* Font küçültüldü */
  font-weight: 600;
  color: var(--text-main);
}

.info-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-btn:hover {
  color: var(--primary-color);
}

.toggle-info-text {
  background: #e3f2fd;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #0984e3;
  margin-top: 5px;
  line-height: 1.4;
}

.toggle-info-text strong {
    font-weight: 700;
}

/* Modern Input Tasarımları - Genel */
input[type="text"]:not(.editable-title):not(.filter-input),
select:not(.sound-groups-select):not(.modern-select):not(.story-toolbar-font-select) {
    width: 100%;
    padding: 10px 12px; /* Padding azaltıldı (14px -> 10px) */
    border: 2px solid #e2e8f0;
    border-radius: 8px; /* Radius azaltıldı */
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem; /* Font küçültüldü */
    color: var(--text-main);
    background-color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    outline: none;
}

/* Hover Efekti */
input[type="text"]:not(.editable-title):not(.filter-input):hover,
select:not(.sound-groups-select):not(.modern-select):not(.story-toolbar-font-select):hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

/* Focus Efekti (Genel) */
input[type="text"]:not(.editable-title):not(.filter-input):focus,
select:not(.sound-groups-select):not(.modern-select):not(.story-toolbar-font-select):focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15); /* Gölge küçültüldü */
    background-color: #ffffff;
}

/* İstenen Sesler (Yeşil Tema) - Özel ID'ler */
#sound,
#concept-include-sounds {
    border-color: #86efac !important; /* Yeşil-300 */
    background-color: #f0fdf4 !important; /* Yeşil-50 */
    color: #166534; /* Yeşil-800 */
    font-weight: 600;
}

#sound::placeholder,
#concept-include-sounds::placeholder {
    color: #86efac;
    font-weight: 400;
}

#sound:hover,
#concept-include-sounds:hover {
    border-color: #4ade80 !important; /* Yeşil-400 */
    background-color: #dcfce7 !important;
}

#sound:focus,
#concept-include-sounds:focus {
    border-color: #22c55e !important; /* Yeşil-500 */
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25) !important; /* Gölge küçültüldü */
    background-color: #ffffff !important;
}

/* İstenmeyen Sesler (Kırmızı Tema) - Özel ID'ler */
#exclude-letters,
#concept-exclude-sounds {
    border-color: #fca5a5 !important; /* Kırmızı-300 */
    background-color: #fef2f2 !important; /* Kırmızı-50 */
    color: #991b1b; /* Kırmızı-800 */
    font-weight: 600;
}

#exclude-letters::placeholder,
#concept-exclude-sounds::placeholder {
    color: #fca5a5;
    font-weight: 400;
}

#exclude-letters:hover,
#concept-exclude-sounds:hover {
    border-color: #f87171 !important; /* Kırmızı-400 */
    background-color: #fee2e2 !important;
}

#exclude-letters:focus,
#concept-exclude-sounds:focus {
    border-color: #ef4444 !important; /* Kırmızı-500 */
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important; /* Gölge küçültüldü */
    background-color: #ffffff !important;
}

/* Responsive Ayarlar */
@media (max-width: 768px) {
    .sound-input-main-row {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 6px;
    }
    
    .sound-input-main-row input {
        min-width: 150px;
        flex: 1 1 auto;
    }
    
    .alofon-selection-container {
        width: 100%;
        flex-basis: 100%;
        margin-top: 6px;
        gap: 4px;
    }
    
    .alofon-group {
        padding: 3px 6px;
        gap: 4px;
        flex: 0 1 auto;
    }
    
    .alofon-select {
        min-width: 70px;
        max-width: 100px;
        font-size: 11px;
        padding: 3px 5px;
    }
    
    .sound-groups-select {
        width: 100%;
    }
    
    .modern-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .sound-input-main-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sound-input-main-row input {
        width: 100%;
        min-width: 0;
    }
    
    .alofon-selection-container {
        width: 100%;
        flex-basis: 100%;
        margin-top: 8px;
        justify-content: flex-start;
    }
    
    .alofon-group {
        flex: 1 1 auto;
        min-width: 0;
    }
    
    .alofon-select {
        min-width: 60px;
        max-width: 90px;
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .alofon-group label {
        font-size: 11px;
    }
}

/* Alofon Flash Animasyonu */
@keyframes flash-bg {
    0% { 
        background-color: #ffffff;
        border-color: #e2e8f0;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        transform: scale(1);
    }
    25% {
        background-color: #ffedd5; /* Turuncu */
        border-color: #fdba74;
        box-shadow: 0 0 15px rgba(251, 146, 60, 0.3);
        transform: scale(1.02);
    }
    50% {
        background-color: #ffffff;
        border-color: #e2e8f0;
        transform: scale(1);
    }
    75% {
        background-color: #ffedd5; /* Turuncu tekrar */
        border-color: #fdba74;
        box-shadow: 0 0 15px rgba(251, 146, 60, 0.3);
        transform: scale(1.02);
    }
    100% { 
        background-color: #ffffff; 
        border-color: #e2e8f0;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        transform: scale(1);
    }
}

.alofon-group.flash-animation {
    animation: flash-bg 2s ease-out;
    border-radius: 8px;
}

/* Danışan (Kahraman Adı) Dropdown - diğer araçlarla uyumlu */
.danisan-input-wrapper {
    position: relative;
    width: 100%;
    margin-top: 5px;
}

.danisan-input-wrapper .filter-input {
    padding-right: 45px;
}

.danisan-dropdown-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.2s ease;
    border-radius: 4px;
    z-index: 1;
}

.danisan-dropdown-btn:hover {
    background-color: rgba(79, 70, 229, 0.08);
    color: var(--primary-color);
}

.danisan-dropdown-btn.active {
    color: var(--primary-color);
}

.danisan-dropdown-btn.active svg {
    transform: rotate(180deg);
}

.danisan-dropdown-btn svg {
    transition: transform 0.2s ease;
}

.danisan-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 2px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 1000;
    display: none;
    max-height: min(300px, calc(100vh - 200px));
    overflow: hidden;
    flex-direction: column;
}

.danisan-dropdown-menu.show {
    display: flex;
}

.danisan-dropdown-search {
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.danisan-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    box-sizing: border-box;
}

.danisan-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.danisan-dropdown-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 4px 0;
}

.danisan-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.95rem;
    color: var(--text-main);
}

.danisan-dropdown-item:hover {
    background-color: rgba(79, 70, 229, 0.08);
    color: var(--primary-color);
}

.danisan-dropdown-item.selected {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.danisan-dropdown-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

.danisan-dropdown-list::-webkit-scrollbar {
    width: 8px;
}

.danisan-dropdown-list::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 4px;
}

.danisan-dropdown-list::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

.danisan-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #868e96;
}

/* --- Açılış (Splash) Ekranı --- */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(79, 70, 229, 0.12), transparent),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    animation: splashEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes splashEntrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.splash-logo {
    margin-bottom: 20px;
    display: inline-block;
}

.splash-logo .logo-circle {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.16);
    border: 1px solid rgba(79, 70, 229, 0.12);
    position: relative;
    overflow: hidden;
}

.splash-logo .logo-inner {
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.splash-logo .logo-text {
    font-size: 2.5rem;
}

.splash-title {
    margin-bottom: 30px;
}

.splash-title .title-main {
    font-family: 'Raleway', sans-serif;
    font-size: 1.75rem;
    color: var(--text-main);
    margin: 0 0 10px 0;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.splash-title .title-subtitle {
    font-size: 1rem;
    color: var(--text-light, #636e72);
    margin: 0;
    font-weight: 400;
}

.splash-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.splash-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(79, 70, 229, 0.12);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: splashSpin 1s linear infinite;
}

.splash-loading .loading-text {
    font-size: 0.9rem;
    color: var(--text-light, #636e72);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: splashPulseText 2s infinite ease-in-out;
}

@keyframes splashSpin {
    to { transform: rotate(360deg); }
}

@keyframes splashPulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Sağ üst toast bildirimleri */
.hikaye-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.hikaye-toast {
    pointer-events: auto;
    max-width: 360px;
    min-width: 280px;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2937;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hikaye-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.hikaye-toast.hide {
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.hikaye-toast-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-left: 4px solid #10b981;
}

.hikaye-toast-success .hikaye-toast-icon {
    color: #10b981;
}

.hikaye-toast-error {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    border-left: 4px solid #ef4444;
}

.hikaye-toast-error .hikaye-toast-icon {
    color: #ef4444;
}

.hikaye-toast-info {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-left: 4px solid #3b82f6;
}

.hikaye-toast-info .hikaye-toast-icon {
    color: #3b82f6;
}

.hikaye-toast-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    border-left: 4px solid #f59e0b;
}

.hikaye-toast-warning .hikaye-toast-icon {
    color: #d97706;
}

.hikaye-toast-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.hikaye-toast-message {
    flex: 1;
}

@media (max-width: 768px) {
    .hikaye-toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
    .hikaye-toast {
        min-width: auto;
        max-width: none;
    }
}

/* Header: Kaydedilen klasör + Materyal listesi butonları */
.header-util-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    flex-shrink: 0;
}

/* Hikaye PDF Materyal Listesi Modal */
.hikaye-materials-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.hikaye-materials-modal.active {
    display: flex;
}

.hikaye-materials-modal-content {
    background: #fff;
    border-radius: 12px;
    width: min(calc(100vw - 24px), 100%);
    max-width: calc(100vw - 24px);
    height: min(calc(100vh - 24px), 98vh);
    max-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hikaye-materials-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.hikaye-materials-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #111827;
}

.hikaye-materials-modal-close {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hikaye-materials-modal-close:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.hikaye-materials-filter-wrap {
    padding: 12px 20px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.hikaye-materials-danisan-select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 180px;
}

.hikaye-materials-date-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.hikaye-materials-date-wrap:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.hikaye-materials-date-icon {
    font-size: 1rem;
    pointer-events: none;
}

.hikaye-materials-date-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    font-size: 0;
    opacity: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.hikaye-materials-date-input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}

.hikaye-materials-list-wrap {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}

.hikaye-materials-loading,
.hikaye-materials-empty {
    text-align: center;
    color: #6b7280;
    padding: 24px;
    font-size: 0.95rem;
}

.hikaye-materials-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hikaye-materials-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 6px 12px;
    align-items: center;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.hikaye-materials-row .hikaye-materials-danisan {
    grid-column: 1;
    grid-row: 1;
    font-weight: 600;
    color: #374151;
}

.hikaye-materials-row .hikaye-materials-title {
    grid-column: 1 / -1;
    grid-row: 2;
    color: #4b5563;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.hikaye-materials-row .hikaye-materials-date {
    grid-column: 2;
    grid-row: 1;
    color: #6b7280;
    font-size: 0.85rem;
}

.hikaye-materials-row .hikaye-materials-preview-btn {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
}

.hikaye-materials-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    color: #374151;
    transition: background 0.2s, border-color 0.2s;
}

.hikaye-materials-preview-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.hikaye-materials-preview-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* PDF Önizleme Modal (materyal listesinden açılan) */
.hikaye-pdf-preview-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10002;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.hikaye-pdf-preview-modal.active {
    display: flex;
}

.hikaye-pdf-preview-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: min(calc(100vw - 24px), 100%);
    max-width: calc(100vw - 24px);
    height: min(calc(100vh - 24px), 98vh);
    max-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hikaye-pdf-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.hikaye-pdf-preview-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #111827;
}

.hikaye-pdf-preview-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hikaye-pdf-preview-download-btn.lingo-pdf-preview-btn { /* shared */ }

.hikaye-pdf-preview-download-btn.lingo-pdf-preview-btn:hover { /* shared */ }

.hikaye-pdf-preview-iframe {
    flex: 1;
    width: 100%;
    border: none;
    border-radius: 0 0 12px 12px;
}

.hikaye-pdf-preview-content #hikaye-pdf-preview-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

/* Local preview header deferred to lingo-pdf-preview-actions.css */
[class*="-pdf-preview-header"].lingo-pdf-preview-header,
[class*="-pdf-preview-header"].lingo-pdf-preview-header h3,
[class*="-pdf-preview-header-actions"].lingo-pdf-preview-header-actions,
[class*="-pdf-preview-download-btn"].lingo-pdf-preview-btn,
[class*="-pdf-preview-download-btn"].lingo-pdf-preview-btn:hover {
  /* shared design wins via pdf-preview-actions.css */
}
