/* Okuma teması: sayfa arka planı + yazı + okuyucu alanları. Üst bar ve alt bilgi her zaman koyu kalır. */
html[data-reader-theme="dark"]:root {
  --color-bg-primary: #0e0f12; --color-bg-secondary: #121317; --color-bg-tertiary: #17181d; --color-bg-card: #14151a; --color-bg-hover: #1d1e24;
  --color-bg-input: #0f1013; --color-surface: #17181d; --color-surface-alt: #1d1e24; --color-border: #2a2b31; --color-border-light: #383940;
  --color-text-primary: #f3eee4; --color-text-secondary: #b3afa5; --color-text-muted: #7f7c74;
  --color-accent: #c4a06a; --color-accent-hover: #d2ae78; --color-accent-light: rgba(196, 160, 106, .13); --color-accent-rgb: 196, 160, 106;
  --reader-bg: #0e0f12; --reader-text: #e8e4da; color-scheme: dark;
}
html[data-reader-theme="black"]:root {
  --color-bg-primary: #000; --color-bg-secondary: #050506; --color-bg-tertiary: #0d0d0f; --color-bg-card: #08080a; --color-bg-hover: #141416;
  --color-bg-input: #050506; --color-surface: #0d0d0f; --color-surface-alt: #141416; --color-border: #1b1b1f; --color-border-light: #26262b;
  --color-text-primary: #ece9e3; --color-text-secondary: #a7a49c; --color-text-muted: #6f6d67;
  --color-accent: #c4a06a; --color-accent-hover: #d2ae78; --color-accent-light: rgba(196, 160, 106, .13); --color-accent-rgb: 196, 160, 106;
  --reader-bg: #000; --reader-text: #d8d5ce; color-scheme: dark;
}
html[data-reader-theme="light"]:root {
  --color-bg-primary: #f6f3ec; --color-bg-secondary: #ffffff; --color-bg-tertiary: #efeadf; --color-bg-card: #ffffff; --color-bg-hover: #e9e3d5;
  --color-bg-input: #ffffff; --color-surface: #ffffff; --color-surface-alt: #efeadf; --color-border: #ddd5c4; --color-border-light: #cfc6b2;
  --color-text-primary: #1f1d1a; --color-text-secondary: #4c4840; --color-text-muted: #8a8478;
  --color-accent: #9a7430; --color-accent-hover: #7f5f26; --color-accent-light: rgba(154, 116, 48, .12); --color-accent-rgb: 154, 116, 48;
  --reader-bg: #f6f3ec; --reader-text: #26231f; color-scheme: light;
}
html[data-reader-theme="sepia"]:root {
  --color-bg-primary: #f1e7cf; --color-bg-secondary: #f6edd8; --color-bg-tertiary: #e9dcbc; --color-bg-card: #f6edd8; --color-bg-hover: #e3d5b2;
  --color-bg-input: #f8f1e0; --color-surface: #f6edd8; --color-surface-alt: #e9dcbc; --color-border: #d6c59b; --color-border-light: #c9b684;
  --color-text-primary: #3b2f1d; --color-text-secondary: #5e4d33; --color-text-muted: #8a7650;
  --color-accent: #8b5a2b; --color-accent-hover: #6f4620; --color-accent-light: rgba(139, 90, 43, .13); --color-accent-rgb: 139, 90, 43;
  --reader-bg: #f1e7cf; --reader-text: #4a3b27; color-scheme: light;
}

/* üst bar, alt bilgi ve menüler her zaman koyu */
html[data-reader-theme] .site-header, html[data-reader-theme] .site-footer,
html[data-reader-theme] .mobile-menu, html[data-reader-theme] .announcement-bar {
  --color-bg-primary: #0e0f12; --color-bg-secondary: #121317; --color-bg-tertiary: #17181d; --color-bg-card: #14151a; --color-bg-hover: #1d1e24;
  --color-bg-input: #0f1013; --color-surface: #17181d; --color-surface-alt: #1d1e24; --color-border: #2a2b31; --color-border-light: #383940;
  --color-text-primary: #f3eee4; --color-text-secondary: #b3afa5; --color-text-muted: #7f7c74;
  --color-accent: #c4a06a; --color-accent-hover: #d2ae78; --color-accent-light: rgba(196, 160, 106, .13); --color-accent-rgb: 196, 160, 106;
  color: var(--color-text-primary);
}

/* sayfa + okuma alanı */
html[data-reader-theme], html[data-reader-theme] body { background: var(--color-bg-primary); color: var(--color-text-primary); transition: background-color .25s, color .25s; }
html[data-reader-theme] .chapter-reader-header { background: var(--color-bg-primary) !important; }
html[data-reader-theme] .chapter-content[data-theme] {
  background: transparent; border-radius: 0; padding-left: 0; padding-right: 0; color: var(--reader-text);
}
html[data-reader-theme] .chapter-content p { color: var(--reader-text); }
html[data-reader-theme] .chapter-content a { color: var(--color-accent); }
html[data-reader-theme] .chapter-content blockquote { border-left-color: var(--color-border-light); background: var(--color-bg-tertiary); color: var(--color-text-secondary); }
html[data-reader-theme] .chapter-content > h3:first-child, html[data-reader-theme] .chapter-content h3 { color: var(--color-text-primary); }

/* yazı tipi seçimi */
html[data-reader-font="serif"] .chapter-content, html[data-reader-font="serif"] .paywall-content-preview { font-family: Georgia, "Times New Roman", serif; }
html[data-reader-font="sans"] .chapter-content, html[data-reader-font="sans"] .paywall-content-preview { font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif; }
html[data-reader-font="mono"] .chapter-content, html[data-reader-font="mono"] .paywall-content-preview { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

/* ayar paneli */
.reader-settings-panel .rs-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.reader-settings-panel .rs-theme {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; cursor: pointer;
  border: 1.5px solid var(--color-border); border-radius: 10px; background: var(--color-bg-tertiary); color: var(--color-text-secondary);
  font-size: .78rem; font-weight: 600; transition: border-color .15s, color .15s;
}
.reader-settings-panel .rs-theme:hover { border-color: var(--color-border-light); color: var(--color-text-primary); }
.reader-settings-panel .rs-theme.active { border-color: var(--color-accent); color: var(--color-text-primary); box-shadow: 0 0 0 2px var(--color-accent-light); }
.reader-settings-panel .rs-dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(128, 128, 128, .45); }
.reader-settings-panel .rs-fonts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: 100%; }
.reader-settings-panel .rs-font {
  padding: 9px 10px; border: 1.5px solid var(--color-border); border-radius: 10px; background: var(--color-bg-tertiary);
  color: var(--color-text-secondary); font-size: .85rem; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s;
}
.reader-settings-panel .rs-font[data-font="serif"] { font-family: Georgia, serif; }
.reader-settings-panel .rs-font[data-font="sans"] { font-family: "Inter", sans-serif; }
.reader-settings-panel .rs-font[data-font="mono"] { font-family: ui-monospace, Menlo, Consolas, monospace; }
.reader-settings-panel .rs-font:hover { border-color: var(--color-border-light); color: var(--color-text-primary); }
.reader-settings-panel .rs-font.active { border-color: var(--color-accent); color: var(--color-text-primary); box-shadow: 0 0 0 2px var(--color-accent-light); }
.reader-settings-panel .rs-value { min-width: 48px; text-align: center; font-weight: 700; color: var(--color-text-primary); }
.reader-settings-panel .rs-reset {
  width: 100%; margin-top: 4px; padding: 10px; border-radius: 10px; border: 1px solid var(--color-border); background: transparent;
  color: var(--color-text-secondary); font-weight: 600; cursor: pointer;
}
.reader-settings-panel .rs-reset:hover { border-color: var(--color-accent); color: var(--color-accent); }
