/* =========================================================
   LUMINA READER - CSS DESIGN SYSTEM & STYLES
   Themes: Light, Sepia, Dark, OLED
   ========================================================= */

:root {
  /* Renk Paleti - Temel (Light/Gündüz) */
  --bg-app: #f4f5f8;
  --bg-surface: rgba(255, 255, 255, 0.88);
  --bg-surface-solid: #ffffff;
  --bg-book: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --highlight-sentence: rgba(254, 240, 138, 0.7);
  --highlight-word: #fde047;
  --paper-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --header-height: 60px;
  --mobile-bottom-height: 64px;

  /* Tipografi */
  --font-family-reader: 'Merriweather', Georgia, serif;
  --font-size-reader: 18px;
  --line-height-reader: 1.7;
}

/* Sepya Parşömen Teması */
[data-theme="sepia"] {
  --bg-app: #ede5d8;
  --bg-surface: rgba(246, 241, 232, 0.92);
  --bg-surface-solid: #f4ede1;
  --bg-book: #fbf7ee;
  --text-main: #433422;
  --text-muted: #84725d;
  --border-color: #dfd4c3;
  --accent-primary: #b45309;
  --accent-primary-hover: #92400e;
  --accent-glow: rgba(180, 83, 9, 0.2);
  --highlight-sentence: rgba(253, 224, 71, 0.55);
  --highlight-word: #fcd34d;
  --paper-shadow: 0 10px 25px -5px rgba(90, 65, 30, 0.12);
}

/* Koyu Gece Teması */
[data-theme="dark"] {
  --bg-app: #0f172a;
  --bg-surface: rgba(30, 41, 59, 0.88);
  --bg-surface-solid: #1e293b;
  --bg-book: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --accent-primary: #60a5fa;
  --accent-primary-hover: #3b82f6;
  --accent-glow: rgba(96, 165, 250, 0.3);
  --highlight-sentence: rgba(59, 130, 246, 0.35);
  --highlight-word: #2563eb;
  --paper-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.45);
}

/* OLED Siyahı Teması */
[data-theme="oled"] {
  --bg-app: #000000;
  --bg-surface: rgba(18, 18, 18, 0.94);
  --bg-surface-solid: #121212;
  --bg-book: #080808;
  --text-main: #e2e8f0;
  --text-muted: #71717a;
  --border-color: #27272a;
  --accent-primary: #38bdf8;
  --accent-primary-hover: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.25);
  --highlight-sentence: rgba(56, 189, 248, 0.3);
  --highlight-word: #0284c7;
  --paper-shadow: 0 0 0 1px #27272a, 0 10px 30px rgba(0, 0, 0, 0.8);
}

/* =========================================================
   GENEL VE RESET
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
  user-select: text;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* =========================================================
   ÜST BAŞLIK (HEADER)
   ========================================================= */

.reader-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.header-left, .header-center, .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-left {
  flex: 1;
  min-width: 0;
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.doc-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-glow);
  color: var(--accent-primary);
  text-transform: uppercase;
}

.doc-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

/* Buton Stilleri */
.icon-btn, .icon-btn-small, .btn-step, .icon-btn-close {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.icon-btn {
  width: 38px;
  height: 38px;
}

.icon-btn-small {
  width: 32px;
  height: 32px;
}

.icon-btn:hover, .icon-btn-small:hover {
  background: rgba(125, 125, 125, 0.12);
  border-color: var(--border-color);
}

.icon-btn:active, .icon-btn-small:active {
  transform: scale(0.95);
}

.btn-primary-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-primary-compact:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Sayfa Gezinti Kutusu */
.pagination-widget {
  display: flex;
  align-items: center;
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px 4px;
  gap: 4px;
}

.page-counter {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.page-counter input {
  width: 38px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  padding: 2px;
}

.page-counter input:focus {
  outline: 2px solid var(--accent-primary);
  border-radius: 4px;
}

.page-slash {
  margin: 0 2px;
  opacity: 0.6;
}

/* Yakınlaştırma (Zoom) Araçları */
.zoom-toolbar {
  display: flex;
  align-items: center;
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px 4px;
}

.zoom-badge {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
}

.zoom-badge:hover {
  background: rgba(125, 125, 125, 0.15);
}

.tts-highlight-btn {
  position: relative;
  color: var(--accent-primary);
}

.tts-pulse-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

/* =========================================================
   ANA İÇERİK ALANI & KARŞILAMA EKRANI
   ========================================================= */

.reader-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

.welcome-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.welcome-card {
  max-width: 680px;
  width: 100%;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--paper-shadow);
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-glow);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.welcome-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
  line-height: 1.3;
}

.welcome-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Sürükle Bırak Alanı */
.drop-zone {
  border: 2px dashed var(--border-color);
  background: rgba(125, 125, 125, 0.03);
  border-radius: 16px;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drop-zone.dragover {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
  transform: scale(1.01);
}

.drop-zone-icon {
  color: var(--accent-primary);
}

.drop-zone-text strong {
  display: block;
  font-size: 16px;
  margin-bottom: 2px;
}

.drop-zone-text span {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-browse {
  margin-top: 6px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all 0.15s ease;
}

.btn-browse:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.supported-formats {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.fmt-pill {
  font-size: 11px;
  font-weight: 700;
  background: rgba(125, 125, 125, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--text-muted);
}

/* Örnek Dosyalar */
.sample-section {
  margin-top: 26px;
  text-align: left;
}

.sample-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sample-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sample-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(125, 125, 125, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.sample-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.sample-icon {
  font-size: 24px;
}

.sample-info strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
}

.sample-info small {
  font-size: 12px;
  color: var(--text-muted);
}

/* Özellikler */
.features-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  text-align: left;
}

.feature-item {
  background: rgba(125, 125, 125, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
}

.f-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.feature-item h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.feature-item p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* =========================================================
   BELGE GÖRÜNTÜLEME VE KİTAP ALANI (DOCUMENT STAGE)
   ========================================================= */

.document-stage {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 100px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  user-select: text;
}

.document-canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

/* Kitap Sayfa Sayfası (Paper sheet) */
.book-sheet {
  background: var(--bg-book);
  color: var(--text-main);
  box-shadow: var(--paper-shadow);
  border-radius: 8px;
  max-width: 820px;
  width: 100%;
  min-height: calc(100vh - 160px);
  padding: 48px 56px;
  position: relative;
  transition: background-color 0.25s, box-shadow 0.25s;
}

/* Tipografi Dinamik Değerler */
.document-content {
  font-family: var(--font-family-reader);
  font-size: var(--font-size-reader);
  line-height: var(--line-height-reader);
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* HTML / Mammoth DOCX / TXT Stilleri */
.document-content h1, .document-content h2, .document-content h3 {
  font-family: 'Inter', sans-serif;
  margin-top: 1.4em;
  margin-bottom: 0.6em;
  color: var(--text-main);
  line-height: 1.3;
}

.document-content h1 { font-size: 1.8em; font-weight: 800; border-bottom: 2px solid var(--border-color); padding-bottom: 8px; }
.document-content h2 { font-size: 1.4em; font-weight: 700; }
.document-content h3 { font-size: 1.2em; font-weight: 600; }

.document-content p {
  margin-bottom: 1.2em;
  text-align: justify;
}

.document-content blockquote {
  border-left: 4px solid var(--accent-primary);
  padding-left: 16px;
  margin: 16px 0;
  font-style: italic;
  opacity: 0.9;
}

.document-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

/* PDF Render Sayfası (Dikey Alt Alta Sıralama) */
.pdf-page-wrapper {
  position: relative;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
  border-radius: 8px;
  margin: 0 auto 28px auto;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: box-shadow 0.2s ease;
}

.pdf-page-wrapper:last-child {
  margin-bottom: 60px;
}

.pdf-page-wrapper canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  user-select: none;
}

.pdf-page-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(125, 125, 125, 0.05);
  width: 100%;
  height: 100%;
  min-height: 480px;
}

.pdf-page-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(125, 125, 125, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

.pdf-page-num-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.spinner-small {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* PDF Metin Katmanı (Text Layer) - Seçilebilirlik ve TTS için */
.pdf-text-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 1;
  line-height: 1.0;
  pointer-events: auto;
}

.pdf-text-layer span {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
}

.pdf-text-layer ::selection {
  background: rgba(59, 130, 246, 0.45);
}

.pdf-text-layer span.tts-highlight-active {
  background-color: rgba(254, 240, 138, 0.85) !important;
  box-shadow: 0 0 0 3px rgba(254, 240, 138, 0.85);
  border-radius: 3px;
  color: transparent !important;
}

/* Word, TXT, EPUB Dikey Alt Alta Sayfa Bölümleri */
.doc-page-section {
  position: relative;
  margin-bottom: 40px;
  padding-bottom: 24px;
}

.doc-page-section:not(:last-child)::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: var(--border-color);
  margin-top: 36px;
  opacity: 0.6;
}

.doc-page-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
  background: var(--accent-glow);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 18px;
}

/* Seslendirilen Cümle Vurgusu */
.tts-highlight-active {
  background-color: var(--highlight-sentence) !important;
  border-radius: 4px;
  transition: background-color 0.15s ease;
  box-shadow: 0 0 0 3px var(--highlight-sentence);
}

.tts-word-active {
  background-color: var(--highlight-word) !important;
  color: #000000 !important;
  border-radius: 2px;
  font-weight: bold;
}

/* Yükleniyor Göstergesi */
.loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(var(--bg-app), 0.7);
  backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 50;
}

.loader-overlay.active {
  display: flex;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* =========================================================
   SEÇİLEN METİN İÇİN YÜZEN MENÜ (SELECTION POPUP)
   ========================================================= */

.floating-selection-menu {
  position: fixed;
  z-index: 200;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 4px;
  display: flex;
  gap: 4px;
  transform: translate(-50%, -100%);
  animation: popupSlide 0.15s ease-out;
}

.selection-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.selection-action-btn:hover {
  background: rgba(125, 125, 125, 0.12);
}

.selection-action-btn.speak-action {
  background: var(--accent-primary);
  color: #ffffff;
}

.selection-action-btn.speak-action:hover {
  background: var(--accent-primary-hover);
}

/* =========================================================
   SESLİ OKUMA OYNATICI (FLOATING TTS PLAYER BAR)
   ========================================================= */

.tts-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  width: min(720px, calc(100% - 32px));
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  z-index: 150;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.tts-floating-bar.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.tts-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  gap: 16px;
}

.tts-status-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* Ses Dalgası Efekti */
.tts-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
  width: 22px;
}

.tts-wave .bar {
  width: 3px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 2px;
  transition: height 0.15s;
}

.tts-wave.speaking .bar-1 { animation: soundWave 0.7s infinite alternate ease-in-out; }
.tts-wave.speaking .bar-2 { animation: soundWave 0.5s infinite 0.2s alternate ease-in-out; }
.tts-wave.speaking .bar-3 { animation: soundWave 0.6s infinite 0.4s alternate ease-in-out; }
.tts-wave.speaking .bar-4 { animation: soundWave 0.8s infinite 0.1s alternate ease-in-out; }

.tts-status-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tts-sentence-preview {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tts-speaker-name {
  font-size: 11px;
  color: var(--text-muted);
}

.tts-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tts-ctrl-btn {
  background: rgba(125, 125, 125, 0.1);
  border: none;
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.tts-ctrl-btn:hover {
  background: rgba(125, 125, 125, 0.2);
}

.tts-play-btn {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: all 0.15s;
}

.tts-play-btn:hover {
  background: var(--accent-primary-hover);
  transform: scale(1.05);
}

.tts-options {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Ses Seviyesi (Volume) */
.tts-volume-selector {
  display: flex;
  align-items: center;
  gap: 5px;
}

#ttsVolumeSlider {
  width: 70px;
  height: 4px;
  accent-color: var(--accent-primary);
  cursor: pointer;
  border-radius: 2px;
}

.volume-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 32px;
}

.tts-speed-selector, .tts-voice-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tts-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Hız ve Okuyucu Seçim Kutuları (Font Rengi Daima Okunabilir) */
.tts-speed-selector select, 
.tts-voice-selector select {
  background-color: var(--bg-surface-solid) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 5px 8px;
  outline: none;
  max-width: 140px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tts-speed-selector select:focus, 
.tts-voice-selector select:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 2px var(--accent-glow) !important;
}

.tts-speed-selector select option, 
.tts-voice-selector select option {
  background-color: var(--bg-surface-solid) !important;
  color: var(--text-main) !important;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 500;
}

/* Uyku Zamanlayıcısı Açılır Menü (Popup Menu) */
.tts-timer-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.timer-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sleep-timer-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  right: -20px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 6px;
  min-width: 195px;
  z-index: 250;
  animation: popupSlide 0.15s ease-out;
}

.timer-menu-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
}

.timer-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.timer-menu-item:hover {
  background: var(--accent-glow);
  color: var(--accent-primary);
}

/* =========================================================
   MOBİL ALT ÇUBUK (MOBILE BOTTOM BAR)
   ========================================================= */

.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-bottom-height);
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  z-index: 90;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}

.m-nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.m-nav-item:active {
  transform: scale(0.92);
}

.m-nav-item.highlight-item {
  color: var(--accent-primary);
  font-weight: 700;
}

/* =========================================================
   AYARLAR MODAL & DRAWER
   ========================================================= */

.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.setting-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Tema Seçiciler */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.theme-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  background: rgba(125, 125, 125, 0.06);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.theme-choice-btn.active {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
}

.theme-preview {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.theme-light { background: #ffffff; }
.theme-sepia { background: #fbf7ee; border-color: #dfd4c3; }
.theme-dark { background: #1e293b; }
.theme-oled { background: #000000; border-color: #333; }

/* Font Seçiciler */
.font-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.font-choice-btn {
  padding: 10px;
  background: rgba(125, 125, 125, 0.06);
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.font-choice-btn.active {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
}

/* Sürgü ve Adım Kontrolleri */
.slider-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-step {
  padding: 6px 12px;
  font-weight: 700;
  font-size: 13px;
  background: rgba(125, 125, 125, 0.1);
}

input[type="range"] {
  flex: 1;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.segmented-control {
  display: flex;
  background: rgba(125, 125, 125, 0.1);
  padding: 3px;
  border-radius: 8px;
}

.seg-btn {
  flex: 1;
  padding: 8px;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--bg-surface-solid);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Switch Toggle */
.setting-toggle-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.setting-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider.round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Toast Bildirim */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #1e293b;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 400;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Excel Tablo Stilleri */
.excel-sheet-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.excel-sheet-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.excel-tag {
  background: #10b981;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.excel-table-scrollable {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface-solid);
}

.excel-table-scrollable table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

.excel-table-scrollable th,
.excel-table-scrollable td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.excel-table-scrollable tr:nth-child(even) {
  background: rgba(125, 125, 125, 0.03);
}

.excel-table-scrollable tr:hover {
  background: var(--accent-glow);
}

/* PowerPoint Slayt Stilleri */
.pptx-slide-card {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.slide-badge {
  display: inline-block;
  background: #f97316;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.slide-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  line-height: 1.3;
}

.slide-para {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: var(--text-main);
}

.slide-empty {
  font-style: italic;
  color: var(--text-muted);
}

.chapter-divider, .sheet-divider, .slide-divider {
  border: none;
  border-top: 1px dashed var(--border-color);
  margin: 32px 0;
}

.formatted-text-content {
  white-space: pre-wrap;
  font-family: inherit;
  line-height: inherit;
}

/* Kütüphane & Son Okunanlar Rafı */
.library-section {
  margin-top: 24px;
  text-align: left;
}

.library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.library-badge-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-glow);
  color: var(--accent-primary);
  padding: 2px 8px;
  border-radius: 12px;
}

.library-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.library-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.library-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.lib-cover {
  width: 42px;
  height: 52px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.lib-meta {
  flex: 1;
  min-width: 0;
}

.lib-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.lib-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.lib-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(125, 125, 125, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.lib-progress-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 2px;
}

.lib-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.lib-delete-btn:hover {
  color: #ef4444;
}

/* Biyonik Okuma Stili */
.bionic-fixation {
  font-weight: 800 !important;
  color: var(--text-main);
}

/* Uyku Zamanlayıcısı Butonu & Badge */
.tts-timer-selector {
  position: relative;
  display: flex;
  align-items: center;
}

.timer-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f97316;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 8px;
  box-shadow: 0 0 4px #f97316;
}

.timer-dropdown {
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 12px;
  border-radius: 6px;
  padding: 4px 6px;
  outline: none;
  max-width: 130px;
  margin-left: 4px;
}

/* Belge İçi Arama Modalı */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 350;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 60px;
}

.search-card {
  position: relative;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 580px;
  width: calc(100% - 32px);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 12px;
}

.search-input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.btn-clear-search {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.search-results-list {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.search-result-item {
  padding: 10px 14px;
  background: rgba(125, 125, 125, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.search-result-item:hover {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
}

.search-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.search-page-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
}

.search-match-badge {
  font-size: 11px;
  background: rgba(125, 125, 125, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.search-snippet {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-main);
}

.search-snippet mark {
  background: #fef08a;
  color: #000;
  border-radius: 2px;
  padding: 0 2px;
  font-weight: 600;
}

/* Hızlı Tema ve Akıllı Kaydırma Butonları */
.theme-toggle-btn, .auto-scroll-btn {
  color: var(--text-main);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  color: #f59e0b;
  transform: rotate(15deg);
}

.auto-scroll-btn:hover {
  color: #10b981;
}

.auto-scroll-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: #10b981;
}

/* AKILLI HIZ MODU (AUTO-SCROLL) YÜZEN KONTROL PANELİ */
.autoscroll-floating-bar {
  position: fixed;
  bottom: 96px;
  right: 24px;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 140;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.autoscroll-floating-bar.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.autoscroll-bar-inner {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  gap: 12px;
}

.autoscroll-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.autoscroll-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 1.2s infinite ease-in-out;
}

.autoscroll-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.autoscroll-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.autoscroll-speed-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-primary);
  background: var(--accent-glow);
  padding: 3px 8px;
  border-radius: 6px;
  min-width: 42px;
  text-align: center;
}

.autoscroll-play-btn {
  background: #10b981;
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  transition: all 0.15s;
}

.autoscroll-play-btn:hover {
  transform: scale(1.08);
}

@keyframes pulseDot {
  0% { transform: scale(0.8); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.7; }
}

@media (max-width: 768px) {
  .autoscroll-floating-bar {
    right: 50%;
    transform: translateX(50%) translateY(100px);
    bottom: 128px;
    width: min(340px, calc(100% - 24px));
  }

  .autoscroll-floating-bar.active {
    transform: translateX(50%) translateY(0);
  }
}

/* =========================================================
   RESPONSIVE (MOBİL UYARLAMALARI)
   ========================================================= */

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-bottom-bar {
    display: flex;
  }

  .reader-header {
    padding: 0 10px;
  }

  .doc-title {
    max-width: 130px;
  }

  .welcome-card {
    padding: 24px 18px;
  }

  .welcome-title {
    font-size: 21px;
  }

  .sample-buttons {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .book-sheet {
    padding: 28px 20px;
    border-radius: 4px;
    min-height: calc(100vh - 140px);
  }

  .document-stage {
    padding: 12px 8px 90px 8px;
  }

  .tts-floating-bar {
    bottom: 74px;
    width: calc(100% - 20px);
    border-radius: 14px;
  }

  .tts-bar-inner {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tts-status-block {
    width: 100%;
    order: 1;
  }

  .tts-controls {
    order: 2;
  }

  .tts-options {
    order: 3;
    margin-left: auto;
  }

  .tts-voice-selector {
    display: none; /* Mobilde yer kazanmak için ayarlarda tutulur */
  }
}

/* Animasyonlar */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes popupSlide {
  from { opacity: 0; transform: translate(-50%, -85%); }
  to { opacity: 1; transform: translate(-50%, -100%); }
}

@keyframes soundWave {
  0% { height: 4px; }
  100% { height: 18px; }
}

/* =========================================================
   ONLİNE KÜTÜPHANE & KATALOG STILLERI
   ========================================================= */

.online-library-section {
  margin-top: 32px;
  text-align: left;
}

.online-library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.online-lib-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lib-globe-icon {
  font-size: 26px;
}

.online-lib-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.online-lib-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.online-lib-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.online-lib-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.online-lib-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text-main);
}

.online-lib-categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.online-lib-categories::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: rgba(125, 125, 125, 0.05);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-pill:hover {
  background: var(--accent-glow);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.cat-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* Çevrimiçi Kitap Kartları Izgarası */
.online-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.online-book-card {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.online-book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
  border-color: var(--accent-primary);
}

.book-card-cover-wrapper {
  height: 180px;
  background: rgba(125, 125, 125, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.book-card-cover-img {
  height: 160px;
  width: auto;
  max-width: 85%;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
  object-fit: cover;
}

.online-book-card:hover .book-card-cover-img {
  transform: scale(1.04);
}

.book-card-format-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.book-card-featured-star {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.book-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-card-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.book-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-author {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.book-card-summary {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  flex: 1;
}

.book-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: auto;
}

.book-card-pages {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.book-card-btns {
  display: flex;
  gap: 6px;
}

.btn-card-read {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-read:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-card-info {
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-card-info:hover {
  background: rgba(125, 125, 125, 0.16);
}

/* =========================================================
   YÖNETİM & ADMİN PANELİ MODALI
   ========================================================= */

.admin-modal, .book-edit-modal, .book-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.admin-modal-card {
  max-width: 960px;
  width: 100%;
  max-height: 92vh;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.admin-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-badge {
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.admin-header-title h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.admin-tabs-bar {
  display: flex;
  background: rgba(125, 125, 125, 0.05);
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  gap: 8px;
}

.admin-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.admin-tab-btn:hover {
  color: var(--text-main);
}

.admin-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.admin-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.admin-pane-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(125, 125, 125, 0.06);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 8px;
  min-width: 260px;
}

.admin-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text-main);
  width: 100%;
}

.admin-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-stat-pill {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(125, 125, 125, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

/* Kitap Yönetim Tablosu */
.admin-books-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.admin-books-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.admin-books-table th {
  background: rgba(125, 125, 125, 0.06);
  padding: 12px 14px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.admin-books-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.admin-books-table tr:hover {
  background: rgba(125, 125, 125, 0.03);
}

.tbl-cover-thumb {
  width: 44px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.tbl-book-title {
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

.tbl-book-author {
  font-size: 12px;
  color: var(--text-muted);
}

.tbl-category-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(125, 125, 125, 0.1);
  color: var(--text-main);
}

.tbl-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.tbl-status-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.tbl-status-badge.draft {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}

.tbl-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.btn-tbl-action {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-tbl-action:hover {
  background: rgba(125, 125, 125, 0.12);
}

.btn-tbl-action.delete:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* Parametreler Sekmesi */
.admin-params-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.param-group-box {
  background: rgba(125, 125, 125, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px 20px;
}

.param-box-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.param-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.param-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.param-field.full-width {
  grid-column: span 2;
}

.param-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.param-field small {
  font-size: 11px;
  color: var(--text-muted);
}

.param-field input, .param-field select {
  background-color: var(--bg-surface-solid) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

.param-field select option {
  background-color: var(--bg-surface-solid) !important;
  color: var(--text-main) !important;
}

.cpanel-test-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.data-mgmt-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-outline-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-outline-compact:hover {
  background: rgba(125, 125, 125, 0.1);
}

.btn-danger-compact {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-danger-compact:hover {
  background: #ef4444;
  color: #fff;
}

.admin-footer-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-save-params {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all 0.15s;
}

.btn-save-params:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

/* =========================================================
   KİTAP EKLEME & DÜZENLEME MODALI
   ========================================================= */

.book-edit-card {
  max-width: 780px;
  width: 100%;
  max-height: 92vh;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.book-edit-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.book-edit-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.book-edit-form {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.book-form-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
}

.book-form-cover-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.cover-preview-box {
  width: 160px;
  height: 220px;
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(125, 125, 125, 0.04);
  position: relative;
}

.cover-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.cover-preview-box img[src]:not([src=""]) {
  display: block;
}

.cover-placeholder-tip {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.cover-preview-box img[src]:not([src=""]) + .cover-placeholder-tip {
  display: none;
}

.cover-actions {
  display: flex;
  gap: 6px;
  width: 100%;
}

.btn-upload-cover, .btn-gen-cover {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: rgba(125, 125, 125, 0.08);
  color: var(--text-main);
}

.btn-upload-cover:hover, .btn-gen-cover:hover {
  background: rgba(125, 125, 125, 0.16);
}

.cover-url-input {
  font-size: 11px !important;
  padding: 6px 8px !important;
}

.book-form-fields-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input, .form-textarea {
  background-color: var(--bg-surface-solid) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.book-file-upload-box {
  border: 1px solid var(--border-color);
  background: rgba(125, 125, 125, 0.04);
  padding: 10px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-choose-book-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.selected-file-name {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkbox-field .check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.book-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.btn-cancel {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit-book {
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* =========================================================
   KİTAP DETAY MODALI
   ========================================================= */

.book-detail-card {
  max-width: 620px;
  width: 100%;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.3);
  position: relative;
  z-index: 10;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  padding: 28px;
}

.modal-close-top {
  position: absolute;
  top: 16px;
  right: 16px;
}

.book-detail-content {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
}

.detail-cover-wrapper img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.detail-info-wrapper {
  display: flex;
  flex-direction: column;
}

.detail-category-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.detail-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
}

.detail-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.detail-meta-row {
  display: flex;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.detail-summary-block {
  flex: 1;
  margin-bottom: 20px;
}

.detail-summary-block h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.detail-summary-block p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.btn-read-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all 0.15s;
}

.btn-read-now:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .book-form-layout {
    grid-template-columns: 1fr;
  }
  .param-grid-2 {
    grid-template-columns: 1fr;
  }
  .book-detail-content {
    grid-template-columns: 1fr;
  }
  .detail-cover-wrapper {
    display: flex;
    justify-content: center;
  }
  .detail-cover-wrapper img {
    height: 180px;
    width: auto;
  }
}

/* =========================================================
   KULLANICI OTURUMU & HEADER BUTONU
   ========================================================= */

.user-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-glass);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

.user-nav-btn:hover {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
  transform: translateY(-1px);
}

.nav-user-avatar {
  font-size: 15px;
}

.nav-user-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   FARKLI CİHAZDA KALINAN YER BİLDİRİMİ (CROSS-DEVICE RESUME BANNER)
   ========================================================= */

.resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(79, 70, 229, 0.3);
  border-radius: 14px;
  margin: 16px 20px 0 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.15);
  animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.resume-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.resume-banner-icon {
  font-size: 26px;
  flex-shrink: 0;
  animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.resume-banner-text strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.resume-banner-text p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.resume-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-resume-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: var(--accent-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px var(--accent-glow);
  transition: all 0.2s;
}

.btn-resume-now:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-resume-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-resume-dismiss:hover {
  color: var(--text-main);
  background: rgba(125, 125, 125, 0.15);
}

/* =========================================================
   KULLANICI GİRİŞ & KAYIT MODALI (AUTH MODAL)
   ========================================================= */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-card {
  max-width: 440px;
  width: 100%;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 10;
  padding: 24px 28px;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.auth-logo-badge {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.auth-tabs {
  display: flex;
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-auth-submit {
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: var(--accent-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all 0.15s;
}

.btn-auth-submit:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.auth-error-msg {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: #e11d48;
  font-size: 12px;
  font-weight: 600;
}

.auth-demo-shortcuts {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
  text-align: center;
}

.auth-demo-shortcuts small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.demo-auth-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-demo-auth {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-glass);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-demo-auth:hover {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
}

.btn-demo-auth.admin-demo:hover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

/* =========================================================
   KULLANICI PROFİL MODALI
   ========================================================= */

.user-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.user-profile-card {
  max-width: 420px;
  width: 100%;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 10;
  padding: 24px 28px;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
}

.profile-header-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar-large {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}

.profile-meta-block h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.profile-email {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.profile-role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-glow);
  color: var(--accent-primary);
}

.profile-sync-status-box {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-bottom: 20px;
}

.sync-icon-status {
  font-size: 20px;
}

.profile-sync-status-box strong {
  display: block;
  font-size: 12px;
  color: #10b981;
  margin-bottom: 2px;
}

.profile-sync-status-box p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.profile-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-glass);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.profile-action-btn:hover {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
  transform: translateY(-1px);
}

.profile-action-btn.danger-action {
  color: #e11d48;
}

.profile-action-btn.danger-action:hover {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(225, 29, 72, 0.3);
}

/* Rol Rozetleri (Admin Tablosu) */
.badge-role-admin {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.badge-role-user {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}


