/* ==========================================================================
   CanlıGB — Beyaz (Aydınlık) Mod Stil Katmanı (html.light)
   Mevcut Karanlık (Obsidian & Gold) tasarımına DOKUNULMAZ.
   Tüm kurallar yalnızca html.light sınıfı aktifken devreye girer.
   ========================================================================== */

html.light {
  color-scheme: light;
}

html.light body {
  background-color: #f8fafc !important;
  background-image:
    radial-gradient(circle at 18% 0%, rgba(255, 138, 0, 0.08), transparent 42%),
    radial-gradient(circle at 84% 4%, rgba(16, 185, 129, 0.06), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #f1f5f9 100%) !important;
  color: #0f172a !important;
}

html.light ::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
}
html.light ::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
}
html.light ::-webkit-scrollbar-thumb:hover {
  background: #f97316 !important;
}

/* Logo kontrast koruması */
html.light img[src*="logo_full.png"] {
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.22));
}

/* ==========================================================================
   1. ÜST BAR, MEGA MENÜ, MOBİL ÇEKMECE, ALT MENÜ & FOOTER
   ========================================================================== */
html.light header {
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08) !important;
}

html.light #desktop-layer-1,
html.light #mobile-top-ticker {
  background-color: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #1e293b !important;
}

html.light #desktop-layer-2,
html.light #desktop-layer-3,
html.light #mobile-main-header,
html.light #mobile-server-filter-bar {
  background-color: rgba(255, 255, 255, 0.97) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
}

/* Desktop orta menü dock kapsayıcısı */
html.light #desktop-layer-2 nav > div {
  background-color: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05) !important;
}

/* Mega-menü açılır panelleri (inline dark style'ı ezer) */
html.light .cgb-mega-panel {
  background-color: #ffffff !important;
  border-color: rgba(249, 115, 22, 0.35) !important;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16) !important;
  color: #0f172a !important;
}

/* Mobil slide-over çekmece */
html.light #cgb-mobile-drawer {
  background-color: #ffffff !important;
  border-left-color: rgba(249, 115, 22, 0.3) !important;
  color: #0f172a !important;
}
html.light #cgb-mobile-drawer > div:first-child,
html.light #cgb-mobile-drawer > div:last-child {
  background-color: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

/* Footer */
html.light footer {
  background-color: #ffffff !important;
  border-top-color: rgba(249, 115, 22, 0.25) !important;
  color: #475569 !important;
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.04);
}

/* Mobil alt sabit gezinme çubuğu */
html.light nav[aria-label="Mobil Alt Menü"] {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-top-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 -8px 26px rgba(15, 23, 42, 0.1) !important;
}

html.light #cgb-back-to-top {
  background-color: #ffffff !important;
  color: #ea580c !important;
  border-color: rgba(234, 88, 12, 0.4) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16) !important;
}

html.light #cookie-banner {
  background-color: #ffffff !important;
  color: #334155 !important;
  border-color: rgba(249, 115, 22, 0.4) !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18) !important;
}

/* Tema değiştirme butonu */
html.light .cgb-theme-btn {
  background-color: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
  color: #1e293b !important;
}
html.light .cgb-theme-btn:hover {
  background-color: #e2e8f0 !important;
  border-color: rgba(234, 88, 12, 0.45) !important;
}

/* ==========================================================================
   2. KARTLAR, PANELLER & KOYU ARKA PLAN YÜZEYLERİ
   ========================================================================== */
html.light .canli-panel,
html.light .cgb-card,
html.light .cgb-auth-card,
html.light .ca-panel,
html.light .frm-card,
html.light .usko-card,
html.light .item-card-glass,
html.light .quest-card,
html.light .card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.11) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.09) !important;
}

html.light .canli-panel-gold,
html.light .cgb-card-gold,
html.light .cgb-auth-gold,
html.light .ca-panel-gold,
html.light .frm-hero {
  background: linear-gradient(180deg, #ffffff 0%, #fffbf5 100%) !important;
  border-color: rgba(249, 115, 22, 0.32) !important;
  color: #0f172a !important;
  box-shadow: 0 14px 36px -14px rgba(15, 23, 42, 0.11), 0 0 0 1px rgba(249, 115, 22, 0.08) !important;
}

/* Koyu hex & slate Tailwind arka planları -> temiz beyaz / açık gri */
html.light [class*="bg-[#0"],
html.light [class*="bg-[#10"],
html.light [class*="bg-[#11"],
html.light [class*="bg-[#12"],
html.light [class*="bg-[#14"],
html.light [class*="bg-[#15"],
html.light [class*="bg-[#16"],
html.light [class*="bg-[#182"],
html.light [class*="bg-[#1a2"],
html.light [class*="bg-[#1f2"],
html.light [class*="bg-[#303"],
html.light .bg-slate-950,
html.light .bg-slate-900,
html.light .bg-slate-800,
html.light [class*="bg-slate-9"],
html.light [class*="bg-slate-8"],
html.light .bg-gray-900,
html.light .bg-zinc-900 {
  background-color: #ffffff !important;
}

/* Yarı şeffaf koyu/beyaz iç kutular (modal backdrop'ları hariç!) */
html.light [class*="bg-black/2"]:not(.fixed),
html.light [class*="bg-black/3"]:not(.fixed),
html.light [class*="bg-black/4"]:not(.fixed),
html.light [class*="bg-black/5"]:not(.fixed),
html.light [class*="bg-black/6"]:not(.fixed),
html.light [class*="bg-white/[0.0"],
html.light .bg-white\/5,
html.light .bg-white\/10 {
  background-color: #f1f5f9 !important;
}

/* Koyu gradient kapsayıcılar ve koyu gradient sonları (API bandı, AP/AC kutuları) */
html.light [class*="from-[#0"],
html.light [class*="from-[#1"],
html.light [class*="from-slate-9"] {
  background-image: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  background-color: #ffffff !important;
}

html.light [class*="via-black/"],
html.light [class*="via-[#0"],
html.light [class*="via-[#1"],
html.light [class*="via-slate-9"] {
  --tw-gradient-via: #f8fafc !important;
  --tw-gradient-stops: var(--tw-gradient-from), #f8fafc, var(--tw-gradient-to) !important;
}

html.light [class*="to-black/"],
html.light [class*="to-[#0"],
html.light [class*="to-[#1"],
html.light [class*="to-slate-9"] {
  --tw-gradient-to: #ffffff !important;
}

/* Hover yüzeyleri */
html.light [class*="hover:bg-white/"]:hover {
  background-color: rgba(15, 23, 42, 0.06) !important;
}

/* Beyaz şeffaf kenarlıklar ve ayırıcılar -> ince koyu gri çizgi */
html.light [class*="border-white/"],
html.light [class*="border-[#303"],
html.light [class*="border-slate-7"],
html.light [class*="border-slate-8"] {
  border-color: rgba(15, 23, 42, 0.12) !important;
}

html.light [class*="divide-white/"] > :not([hidden]) ~ :not([hidden]) {
  border-color: rgba(15, 23, 42, 0.09) !important;
}

html.light .glow-gold {
  opacity: 0.06 !important;
}

/* ==========================================================================
   3. YAZI RENKLERİ — YÜKSEK KONTRAST AYDINLIK MOD PALETİ
   ========================================================================== */
html.light .text-white,
html.light .text-slate-50,
html.light .text-slate-100,
html.light .text-gray-100 {
  color: #0f172a !important;
}

html.light .text-slate-200,
html.light .text-gray-200,
html.light .frm-body {
  color: #1e293b !important;
}

html.light .text-slate-300,
html.light .text-gray-300 {
  color: #334155 !important;
}

html.light .text-slate-400,
html.light .text-gray-400 {
  color: #475569 !important;
}

html.light .text-slate-500 {
  color: #64748b !important;
}

/* Pastel vurgu renklerini beyaz zeminde okunaklı zengin tonlara çek */
html.light .text-amber-200,
html.light .text-amber-300,
html.light .text-amber-400,
html.light .text-yellow-300,
html.light .text-yellow-400,
html.light [class*="text-[#ffb"] {
  color: #b45309 !important;
}

html.light .text-orange-200,
html.light .text-orange-300,
html.light .text-orange-400 {
  color: #c2410c !important;
}

html.light .text-emerald-200,
html.light .text-emerald-300,
html.light .text-emerald-400,
html.light .text-green-300,
html.light .text-green-400 {
  color: #047857 !important;
}

html.light .text-sky-200,
html.light .text-sky-300,
html.light .text-sky-400,
html.light .text-blue-200,
html.light .text-blue-300,
html.light .text-blue-400,
html.light .text-cyan-200,
html.light .text-cyan-300,
html.light .text-cyan-400 {
  color: #0369a1 !important;
}

html.light .text-violet-200,
html.light .text-violet-300,
html.light .text-purple-200,
html.light .text-purple-300,
html.light .text-purple-400,
html.light .text-indigo-200,
html.light .text-indigo-300,
html.light .text-indigo-400 {
  color: #6d28d9 !important;
}

html.light .text-rose-200,
html.light .text-rose-300,
html.light .text-rose-400,
html.light .text-red-300,
html.light .text-red-400 {
  color: #be123c !important;
}

html.light .text-teal-300,
html.light .text-teal-400 {
  color: #0f766e !important;
}

/* Gradient başlıklar (beyaz zeminde görünmez olmaması için koyu-turuncu gradient) */
html.light [class*="bg-clip-text"] {
  background-image: linear-gradient(90deg, #c2410c 0%, #b45309 50%, #047857 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* USKO Pazar item nadirlik renkleri (beyaz zemin uyumu) */
html.light .usko-rarity-reverse { color: #be185d !important; }
html.light .usko-rarity-unique_item { color: #b45309 !important; }
html.light .usko-rarity-high_class { color: #7e22ce !important; }
html.light .usko-rarity-middle_class { color: #0369a1 !important; }
html.light .usko-rarity-low_class { color: #15803d !important; }
html.light .usko-rarity-white { color: #0f172a !important; }
html.light .usko-rarity-event_item { color: #0f766e !important; }

/* ==========================================================================
   4. FORMLAR, GİRDİLER & TABLOLAR
   ========================================================================== */
html.light input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
html.light select,
html.light textarea,
html.light .cgb-input {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #64748b !important;
}

html.light input:focus,
html.light select:focus,
html.light textarea:focus,
html.light .cgb-input:focus {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14) !important;
}

html.light option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Canlı GB Tablosu & Genel Tablolar */
html.light thead,
html.light thead th,
html.light #matrix-thead th,
html.light .ko-sticky-col-header {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html.light .ko-sticky-col-cell {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-right-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 4px 0 12px rgba(15, 23, 42, 0.06) !important;
}

html.light tbody tr:hover {
  background-color: rgba(249, 115, 22, 0.05) !important;
}

/* Canlı GB Fiyat Hapları (Alış / Satış) */
html.light .price-pill-satis {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(5, 150, 105, 0.28) !important;
  color: #047857 !important;
}
html.light .price-pill-satis.best-deal {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: #059669 !important;
  color: #065f46 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.18) !important;
}
html.light .price-pill-alis {
  background: rgba(244, 63, 94, 0.08) !important;
  border-color: rgba(225, 29, 72, 0.26) !important;
  color: #be123c !important;
}
html.light .price-pill-alis.best-deal {
  background: rgba(244, 63, 94, 0.16) !important;
  border-color: #e11d48 !important;
  color: #9f1239 !important;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.16) !important;
}

/* Borsa site logoları (koyu zeminli logolar beyaz zeminde kaybolmasın!) */
html.light .site-logo-link,
html.light .card-site-logo,
html.light .ko-table .site-head-fill {
  background: #0b101b !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
}
html.light .site-logo-link.plate-light {
  background: #f8fafc !important;
}

/* ==========================================================================
   5. KRİTİK KONTRAST İSTİSNALARI (BUTONLAR, HP/MP, 3B SAHNE, KO TOOLTIP)
   Yüksek özgüllük (html.light body ...) ile her sayfada korunur!
   ========================================================================== */

/* Koyu/Canlı dolgulu rozetler & butonlar -> Beyaz yazı korunur */
html.light body .cgb-blink-canli,
html.light body .bg-red-600,
html.light body .bg-red-500,
html.light body .bg-emerald-600,
html.light body .bg-rose-600,
html.light body .bg-violet-600,
html.light body .bg-sky-600,
html.light body .bg-blue-600,
html.light body .bg-indigo-600,
html.light body .bg-purple-600,
html.light body .bg-orange-600,
html.light body [class*="bg-[#5865F2]"],
html.light body [class*="bg-[#1877F2]"],
html.light body [class*="bg-[#FF0000]"],
html.light body [class*="bg-[#229ED9]"],
html.light body [class*="from-violet-500"],
html.light body .srv-pill-active,
html.light body .game-switcher-btn.active {
  color: #ffffff !important;
}
html.light body .cgb-blink-canli *,
html.light body .bg-red-600 *,
html.light body .bg-emerald-600 *,
html.light body .bg-rose-600 *,
html.light body .bg-violet-600 *,
html.light body [class*="from-violet-500"] *,
html.light body .srv-pill-active *,
html.light body .game-switcher-btn.active * {
  color: #ffffff !important;
}

/* Parlak turuncu/altın/WhatsApp-yeşili CTA butonları -> Koyu mürekkep yazı korunur */
html.light body .bg-orange-500,
html.light body .bg-amber-500,
html.light body .bg-emerald-500,
html.light body [class*="bg-[#25D366]"],
html.light body [class*="bg-[#ff6600]"],
html.light body [class*="bg-[#ff7700]"],
html.light body [class*="from-[#ff6a00]"]:not([class*="from-[#ff6a00]/"]),
html.light body [class*="from-orange-500"]:not([class*="from-orange-500/"]),
html.light body [class*="from-amber-400"]:not([class*="from-amber-400/"]),
html.light body [class*="from-sky-400"]:not([class*="from-sky-400/"]),
html.light body .text-slate-950 {
  color: #020617 !important;
}
html.light body [class*="from-[#ff6a00]"]:not([class*="from-[#ff6a00]/"]) *,
html.light body [class*="from-orange-500"]:not([class*="from-orange-500/"]) *,
html.light body [class*="bg-[#25D366]"] *,
html.light body .bg-emerald-500 *,
html.light body .bg-amber-500 *,
html.light body .bg-orange-500 * {
  color: #020617 !important;
}

/* Knight Online HP & MP Çubukları */
html.light body .ko-bar-hp,
html.light body .ko-bar-hp *,
html.light body .ko-bar-mp,
html.light body .ko-bar-mp * {
  color: #ffffff !important;
}

/* 3B WebGL Karakter Sahnesi (parlama/zırh kontrastı için koyu sahne korunur) */
html.light body .cd3-sahne,
html.light body .cd3-kapi,
html.light body #cd3B .cd3-sahne,
html.light body #home-cd3B .cd3-sahne {
  background: radial-gradient(120% 80% at 50% 0%, rgba(255, 120, 0, 0.14), transparent 62%), linear-gradient(180deg, #101626 0%, #070a12 100%) !important;
  border-color: rgba(249, 115, 22, 0.35) !important;
}
html.light body .cd3-tam {
  background: rgba(11, 15, 22, 0.85) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}
html.light body .cd3-atak,
html.light body .cd3-emote-dugme {
  background: #f1f5f9 !important;
  color: #b45309 !important;
  border-color: rgba(234, 88, 12, 0.35) !important;
}
html.light body .cd3-atak:hover,
html.light body .cd3-emote-dugme:hover {
  background: #fff7ed !important;
  border-color: #f97316 !important;
}

/* Knight Online Eşya Slotları (siyah zeminli KO ikonlarıyla uyumlu çerçeve) */
html.light body .equip-slot,
html.light body .ca-slot,
html.light body .ko-slot-box {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
  border-color: #94a3b8 !important;
}
html.light body .equip-slot.has-item,
html.light body .ca-slot.has-item {
  border-color: #f59e0b !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.22) !important;
}
html.light body .equip-slot .text-slate-500,
html.light body .ca-slot .text-slate-500,
html.light body .equip-slot .text-slate-400,
html.light body .ca-slot .text-slate-400 {
  color: #cbd5e1 !important;
}
html.light body .equip-slot .text-white,
html.light body .ca-slot .text-white {
  color: #ffffff !important;
}
html.light body .equip-slot .text-amber-300,
html.light body .ca-slot .text-amber-300 {
  color: #fcd34d !important;
}

/* Knight Online Oyun-İçi Koyu Tooltip Kutuları (ikonik koyu görünüm korunur) */
html.light body #cd-item-tooltip,
html.light body #tip,
html.light body #home-char-tip,
html.light body .ca-tip {
  background: rgba(8, 12, 22, 0.97) !important;
  border-color: rgba(255, 168, 0, 0.65) !important;
  color: #f8fafc !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35) !important;
}
html.light body #cd-item-tooltip .text-white,
html.light body #tip .text-white,
html.light body #home-char-tip .text-white,
html.light body .ca-tip .text-white {
  color: #ffffff !important;
}
html.light body #cd-item-tooltip .text-slate-300,
html.light body #cd-item-tooltip .text-slate-400,
html.light body #home-char-tip .text-slate-300,
html.light body #home-char-tip .text-slate-400,
html.light body .ca-tip .text-slate-300,
html.light body .ca-tip .text-slate-400 {
  color: #cbd5e1 !important;
}
html.light body #cd-item-tooltip .text-amber-300,
html.light body #cd-item-tooltip .text-amber-400,
html.light body #home-char-tip .text-amber-300,
html.light body .ca-tip .text-amber-300 {
  color: #fcd34d !important;
}
html.light body #cd-item-tooltip .text-emerald-300,
html.light body #cd-item-tooltip .text-emerald-400,
html.light body #home-char-tip .text-emerald-300,
html.light body .ca-tip .text-emerald-300 {
  color: #6ee7b7 !important;
}
