/* ====================================================
   Bilgenin Yolu · Tema & Font Sistemi
   Kullanım: <html data-theme="..." data-font="..." data-fontsize="...">
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Almendra:wght@400;700&family=Bona+Nova:wght@400;700&family=Cardo:wght@400;700&family=Caveat:wght@400;700&family=Cinzel:wght@400;500;700&family=Cinzel+Decorative:wght@400;700&family=Comfortaa:wght@400;500;700&family=Cormorant+Garamond:wght@400;600;700&family=Cormorant+SC:wght@400;600;700&family=Dancing+Script:wght@400;700&family=EB+Garamond:wght@400;500;700&family=Fjalla+One&family=Great+Vibes&family=Inter:wght@400;500;600;700&family=Italianno&family=Kalam:wght@400;700&family=Kaushan+Script&family=Libre+Baskerville:wght@400;700&family=Marcellus&family=Marcellus+SC&family=Merriweather:wght@400;700&family=Old+Standard+TT:wght@400;700&family=Pacifico&family=Philosopher:wght@400;700&family=Playfair+Display:wght@400;700&family=Poppins:wght@400;600;700&family=Quicksand:wght@400;500;700&family=Raleway:wght@400;500;700&family=Righteous&family=Sacramento&family=Sorts+Mill+Goudy&family=Spectral:wght@400;500;700&family=Yeseva+One&display=swap');

/* ====================================================
   TEMA SİSTEMİ
   ==================================================== */

/* ===== KARANLIK ===== */
:root[data-theme="karanlik"]{
  --bg:#1a1410; --card:#2a2018; --text:#f5e6cf; --text-light:#d4b896;
  --text-muted:#998866; --border:#4a3a2a; --border-light:#3a2e20;
  --gold:#d4b454; --gold-dark:#a8932e; --gold-light:#e8c75c;
  --c1:#d4495c; --c2:#e09b3a; --c3:#4a9070; --c4:#5b85b5; --c5:#9367ad;
  --green:#4a9070; --green-bg:#1f3327;
  --blue:#5b85b5; --blue-bg:#1a2b3d;
  --gray:#998866; --gray-bg:#2a2520;
}
:root[data-theme="karanlik"] body{
  background:#1a1410 !important;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(212,180,84,0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(212,73,92,0.05) 0%, transparent 40%) !important;
}
:root[data-theme="karanlik"] .stat-card,
:root[data-theme="karanlik"] .nav-card,
:root[data-theme="karanlik"] .card,
:root[data-theme="karanlik"] .cat-card,
:root[data-theme="karanlik"] .book-card,
:root[data-theme="karanlik"] .kutub-card,
:root[data-theme="karanlik"] .result-card,
:root[data-theme="karanlik"] .cilt-row,
:root[data-theme="karanlik"] .cilt-card,
:root[data-theme="karanlik"] .stat-mini,
:root[data-theme="karanlik"] .mini,
:root[data-theme="karanlik"] .winner,
:root[data-theme="karanlik"] .finding,
:root[data-theme="karanlik"] .milestone,
:root[data-theme="karanlik"] .milestone-mini,
:root[data-theme="karanlik"] .tempo,
:root[data-theme="karanlik"] .info-cell,
:root[data-theme="karanlik"] section.block,
:root[data-theme="karanlik"] .detail-block,
:root[data-theme="karanlik"] .current-pos,
:root[data-theme="karanlik"] .edition-card,
:root[data-theme="karanlik"] .acc,
:root[data-theme="karanlik"] .acc-body,
:root[data-theme="karanlik"] .section,
:root[data-theme="karanlik"] .preview,
:root[data-theme="karanlik"] .preview .quote,
:root[data-theme="karanlik"] .preview .stat-prev,
:root[data-theme="karanlik"] .theme-card,
:root[data-theme="karanlik"] .font-card,
:root[data-theme="karanlik"] .size-card,
:root[data-theme="karanlik"] .block{
  background:#2a2018 !important; color:var(--text);
  border-color:var(--border-light) !important;
}
:root[data-theme="karanlik"] .pos-item,
:root[data-theme="karanlik"] .timeline-wrap,
:root[data-theme="karanlik"] .book-visual,
:root[data-theme="karanlik"] .progress-big .track,
:root[data-theme="karanlik"] .pos-detail,
:root[data-theme="karanlik"] .custom-tempo,
:root[data-theme="karanlik"] .progress-bar-mini,
:root[data-theme="karanlik"] .detail-extra .micro,
:root[data-theme="karanlik"] .tempo-compare,
:root[data-theme="karanlik"] .tempo-row{
  background:#1a1410 !important; color:var(--text);
}
:root[data-theme="karanlik"] .tempo-row.tempo-current{
  background:linear-gradient(135deg,#3a2e20,#2a2018) !important;
}
:root[data-theme="karanlik"] th{ background:#3a2e20 !important; color:var(--gold-light) !important; }
:root[data-theme="karanlik"] tr:hover td{ background:rgba(212,180,84,0.08) !important; }
:root[data-theme="karanlik"] tr.total{ background:rgba(212,180,84,0.15) !important; color:var(--gold-light) !important; }
:root[data-theme="karanlik"] .topic{ background:#3a2e20 !important; color:var(--gold-light); border-color:var(--border); }
:root[data-theme="karanlik"] .insight,
:root[data-theme="karanlik"] .hero,
:root[data-theme="karanlik"] .today-card,
:root[data-theme="karanlik"] .result-summary,
:root[data-theme="karanlik"] .progress-card,
:root[data-theme="karanlik"] .lead-box,
:root[data-theme="karanlik"] .kaynak-box,
:root[data-theme="karanlik"] .font-live-preview{
  background:linear-gradient(135deg,#2a2018,#3a2e20) !important;
  color:var(--text); border-color:var(--border) !important;
}
:root[data-theme="karanlik"] input,
:root[data-theme="karanlik"] select,
:root[data-theme="karanlik"] textarea,
:root[data-theme="karanlik"] .radio{
  background:#1a1410 !important; color:var(--text) !important; border-color:var(--border) !important;
}
:root[data-theme="karanlik"] .page-crumb a,
:root[data-theme="karanlik"] .crumb a{ color:var(--gold-light) !important; }
:root[data-theme="karanlik"] .back-link{
  background:rgba(212,180,84,0.15) !important; color:var(--gold-light) !important;
}

/* ===== SEPYA ===== */
:root[data-theme="sepya"]{
  --bg:#f4ecd8; --card:#faf3e0;
  --text:#4a3520; --text-light:#6b4a2a; --text-muted:#8b6a4a;
  --border:#c8a878; --border-light:#e0c8a0;
  --gold:#b8860b; --gold-dark:#8b6914; --gold-light:#d4a017;
}
:root[data-theme="sepya"] body{ background:#f4ecd8 !important; }

/* ===== MODERN AÇIK ===== */
:root[data-theme="modern"]{
  --bg:#f8f9fa; --card:#ffffff;
  --text:#212529; --text-light:#495057; --text-muted:#6c757d;
  --border:#ced4da; --border-light:#e9ecef;
  --gold:#0d6efd; --gold-dark:#0a58ca; --gold-light:#6ea8fe;
  --c1:#dc3545; --c2:#fd7e14; --c3:#198754; --c4:#0d6efd; --c5:#6f42c1;
  --green:#198754; --green-bg:#d1e7dd;
  --blue:#0d6efd; --blue-bg:#cfe2ff;
}
:root[data-theme="modern"] body{ background:#f8f9fa !important; background-image:none !important; }

/* ===== YEŞİL ===== */
:root[data-theme="yesil"]{
  --bg:#f0f8f4; --card:#ffffff;
  --text:#1a3d2d; --text-light:#2d6a4f; --text-muted:#5a8a72;
  --border:#b5d8c4; --border-light:#d5e8de;
  --gold:#2d6a4f; --gold-dark:#1a3d2d; --gold-light:#4a9070;
}
:root[data-theme="yesil"] body{
  background:#f0f8f4 !important;
  background-image:radial-gradient(circle at 15% 20%, rgba(45,106,79,0.05) 0%, transparent 40%) !important;
}

/* ===== OKYANUS ===== */
:root[data-theme="okyanus"]{
  --bg:#eef4fa; --card:#ffffff;
  --text:#1a3a5c; --text-light:#2c5282; --text-muted:#5a7a9e;
  --border:#a5c0e0; --border-light:#d5e0ee;
  --gold:#2c5282; --gold-dark:#1a3a5c; --gold-light:#4670a5;
}
:root[data-theme="okyanus"] body{
  background:#eef4fa !important;
  background-image:radial-gradient(circle at 15% 20%, rgba(44,82,130,0.05) 0%, transparent 40%) !important;
}

/* ===== GÜL ===== */
:root[data-theme="gul"]{
  --bg:#fdf2f4; --card:#ffffff;
  --text:#5a1d29; --text-light:#8b2d3f; --text-muted:#a06070;
  --border:#e0b5c0; --border-light:#f0d5dc;
  --gold:#a02334; --gold-dark:#7a1825; --gold-light:#d4495c;
}
:root[data-theme="gul"] body{ background:#fdf2f4 !important; }

/* ===== GECE ===== */
:root[data-theme="gece"]{
  --bg:#0a0805; --card:#14100a;
  --text:#c9a227; --text-light:#a8932e; --text-muted:#8b6914;
  --border:#2a2018; --border-light:#1f1812;
  --gold:#d4b454; --gold-dark:#b8860b; --gold-light:#e8c75c;
}
:root[data-theme="gece"] body{
  background:#0a0805 !important;
  background-image:radial-gradient(circle at 50% 50%, rgba(201,162,39,0.05) 0%, transparent 60%) !important;
}
:root[data-theme="gece"] .stat-card,
:root[data-theme="gece"] .nav-card,
:root[data-theme="gece"] .card,
:root[data-theme="gece"] .cat-card,
:root[data-theme="gece"] .book-card,
:root[data-theme="gece"] .kutub-card,
:root[data-theme="gece"] .result-card,
:root[data-theme="gece"] .cilt-row,
:root[data-theme="gece"] .cilt-card,
:root[data-theme="gece"] section.block,
:root[data-theme="gece"] .section,
:root[data-theme="gece"] .acc,
:root[data-theme="gece"] .acc-body,
:root[data-theme="gece"] .edition-card,
:root[data-theme="gece"] .info-cell,
:root[data-theme="gece"] .theme-card,
:root[data-theme="gece"] .font-card,
:root[data-theme="gece"] .size-card{
  background:#14100a !important; color:var(--text);
  border-color:var(--border) !important;
}
:root[data-theme="gece"] input,
:root[data-theme="gece"] select,
:root[data-theme="gece"] textarea,
:root[data-theme="gece"] .radio{ background:#1a140c !important; color:var(--text) !important; }
:root[data-theme="gece"] th{ background:#1a140c !important; color:var(--gold) !important; }
:root[data-theme="gece"] .lead-box,
:root[data-theme="gece"] .hero,
:root[data-theme="gece"] .kaynak-box,
:root[data-theme="gece"] .font-live-preview{
  background:linear-gradient(135deg,#1a140c,#0a0805) !important; color:var(--text);
}
:root[data-theme="gece"] .timeline-wrap,
:root[data-theme="gece"] .progress-bar-mini,
:root[data-theme="gece"] .detail-extra .micro,
:root[data-theme="gece"] .tempo-compare,
:root[data-theme="gece"] .tempo-row{ background:#0a0805 !important; color:var(--text); }

/* ====================================================
   FONT SİSTEMİ — Özel karakter fontları
   ==================================================== */

/* Sistem fallback */
:root[data-font="sistem"] *:not(.font-aa){font-family:-apple-system,BlinkMacSystemFont,system-ui,'Segoe UI',sans-serif !important}
:root[data-font="inter"] *:not(.font-aa){font-family:'Inter',-apple-system,sans-serif !important}

/* Klasik & Roma Serif */
:root[data-font="marcellus"] *:not(.font-aa){font-family:'Marcellus',Georgia,serif !important}
:root[data-font="cinzel"] *:not(.font-aa){font-family:'Cinzel',Georgia,serif !important}
:root[data-font="cinzeldec"] *:not(.font-aa){font-family:'Cinzel Decorative',Georgia,serif !important}
:root[data-font="cormorant"] *:not(.font-aa){font-family:'Cormorant Garamond',Garamond,serif !important}
:root[data-font="cormorantsc"] *:not(.font-aa){font-family:'Cormorant SC',Garamond,serif !important}
:root[data-font="ebgaramond"] *:not(.font-aa){font-family:'EB Garamond',Garamond,serif !important}
:root[data-font="librebaskerville"] *:not(.font-aa){font-family:'Libre Baskerville',Baskerville,serif !important}
:root[data-font="cardo"] *:not(.font-aa){font-family:'Cardo',Georgia,serif !important}

/* Edebî Serif */
:root[data-font="spectral"] *:not(.font-aa){font-family:'Spectral',Georgia,serif !important}
:root[data-font="oldstandard"] *:not(.font-aa){font-family:'Old Standard TT',Georgia,serif !important}
:root[data-font="bonanova"] *:not(.font-aa){font-family:'Bona Nova',Georgia,serif !important}
:root[data-font="philosopher"] *:not(.font-aa){font-family:'Philosopher',Georgia,serif !important}
:root[data-font="playfair"] *:not(.font-aa){font-family:'Playfair Display',Georgia,serif !important}
:root[data-font="merriweather"] *:not(.font-aa){font-family:'Merriweather',Georgia,serif !important}

/* Dekoratif Display */
:root[data-font="yeseva"] *:not(.font-aa){font-family:'Yeseva One',Georgia,serif !important}
:root[data-font="sortsmill"] *:not(.font-aa){font-family:'Sorts Mill Goudy',Georgia,serif !important}
:root[data-font="almendra"] *:not(.font-aa){font-family:'Almendra',Georgia,serif !important}
:root[data-font="righteous"] *:not(.font-aa){font-family:'Righteous',Arial,sans-serif !important}

/* El Yazısı / Script */
:root[data-font="marcellussc"] *:not(.font-aa){font-family:'Marcellus SC',Georgia,serif !important}
:root[data-font="kalam"] *:not(.font-aa){font-family:'Kalam',cursive !important}
:root[data-font="kaushan"] *:not(.font-aa){font-family:'Kaushan Script',cursive !important}
:root[data-font="dancing"] *:not(.font-aa){font-family:'Dancing Script',cursive !important}
:root[data-font="sacramento"] *:not(.font-aa){font-family:'Sacramento',cursive !important}
:root[data-font="greatvibes"] *:not(.font-aa){font-family:'Great Vibes',cursive !important}
:root[data-font="pacifico"] *:not(.font-aa){font-family:'Pacifico',cursive !important}
:root[data-font="caveat"] *:not(.font-aa){font-family:'Caveat',cursive !important}
:root[data-font="italianno"] *:not(.font-aa){font-family:'Italianno',cursive !important}

/* Modern Sans Display */
:root[data-font="raleway"] *:not(.font-aa){font-family:'Raleway',Arial,sans-serif !important}
:root[data-font="quicksand"] *:not(.font-aa){font-family:'Quicksand',Arial,sans-serif !important}
:root[data-font="comfortaa"] *:not(.font-aa){font-family:'Comfortaa',Arial,sans-serif !important}
:root[data-font="fjalla"] *:not(.font-aa){font-family:'Fjalla One',Impact,sans-serif !important}
:root[data-font="poppins"] *:not(.font-aa){font-family:'Poppins',Arial,sans-serif !important}

/* ARAPÇA HER ZAMAN ARAPÇA FONTUNDA — yukarıdaki * kuralından sonra geldiği için ezer */
:root[data-font] .ar,
:root[data-font] .ar-title,
:root[data-font] .ar-mini,
:root[data-font] .ar-name,
:root[data-font] .ar-prev,
:root[data-font] .brand-ar,
:root[data-font] .book-ar,
:root[data-font] .kutub-ar,
:root[data-font] .nav-brand .ar,
:root[data-font] [lang="ar"]{
  font-family:'Traditional Arabic','Amiri','Scheherazade New',serif !important;
}

/* ====================================================
   YAZI BOYUTU
   ==================================================== */
:root[data-fontsize="kucuk"] body{ zoom:0.88; }
:root[data-fontsize="normal"] body{ zoom:1; }
:root[data-fontsize="buyuk"] body{ zoom:1.12; }
:root[data-fontsize="xbuyuk"] body{ zoom:1.25; }
:root[data-fontsize="xxbuyuk"] body{ zoom:1.4; }
