/* ==========================================================================
   MEDIEVAL FANTASY AAA CRAFTING & WISDOM TOME THEME (IMAGE 1 & IMAGE 2)
   Reptilyan Gölge Hükümdar — Kadim Zanaatkârlık ve Bilgelik Grimoire
   Color Palette:
   - Deep Forge: #120C08
   - Aged Dark Leather: #382013 / #231209
   - Antique Parchment: #D8BE8F / #E8D4AC
   - Burnished Gold: #C69A48 / #E2B45A
   - Ancient Bronze: #91632D / #724A1D
   - Forge Fire: #E87528
   - Success Green: #4EAC78
   - Danger Crimson: #C64D42
   ========================================================================== */

/* GLOBAL MEDIEVAL ATMOSPHERE */
body {
  background-color: #120C08 !important;
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(232, 117, 40, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(145, 99, 45, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #160e0a 0%, #0d0805 100%) !important;
  color: #E2D3B8;
  font-family: 'Crimson Text', serif, system-ui;
}

h1, h2, h3, h4, .hud-title, .modal-title, .tome-title {
  font-family: 'Cinzel', 'MedievalSharp', serif;
  letter-spacing: 0.04em;
}

/* MODAL OVERLAY: MEDIEVAL FORGE AMBIENCE */
#craftingModal, #skillsCatalogModal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(8, 5, 3, 0.93) !important;
  backdrop-filter: blur(8px);
  z-index: 100000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

#craftingModal.hidden, #skillsCatalogModal.hidden {
  display: none !important;
}

/* ==========================================================================
   TOME MODAL BACKDROP (IMAGE 1 & 2 SHELL - FULLSCREEN IMMERSIVE)
   ========================================================================== */
.tome-modal-backdrop,
.wisdom-grimoire-backdrop,
#skillsCatalogModal .tome-modal-backdrop,
#craftingModal .tome-modal-backdrop {
  width: 98vw !important;
  max-width: 1720px !important;
  height: 95vh !important;
  max-height: 980px !important;
  min-height: 720px !important;
  display: flex !important;
  flex-direction: column !important;
  background: #18100B !important;
  border: 2px solid #5A3A1E !important;
  border-radius: 12px !important;
  box-shadow: 
    0 0 60px rgba(0, 0, 0, 0.98),
    0 0 50px rgba(232, 117, 40, 0.3),
    inset 0 0 40px rgba(0, 0, 0, 0.85) !important;
  padding: 10px 16px 12px !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: hidden !important;
}

#skillsCatalogModal .ancient-crafting-tome,
#craftingModal .ancient-crafting-tome {
  flex: 1 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

/* TOP ORNATE BANNER */
.tome-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #5A3A1E;
  background: linear-gradient(90deg, rgba(56, 32, 19, 0.8) 0%, rgba(24, 16, 11, 0.9) 50%, rgba(56, 32, 19, 0.8) 100%);
  border-radius: 8px 8px 0 0;
  padding: 8px 16px;
  margin-bottom: 10px;
}

.tome-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tome-crest-icon {
  font-size: 2.2rem;
  background: linear-gradient(135deg, #3A2314, #1E120A);
  border: 2px solid #C69A48;
  border-radius: 8px;
  padding: 4px 10px;
  box-shadow: 0 0 15px rgba(198, 154, 72, 0.35);
}

.tome-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #F0DCB4;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 10px rgba(198, 154, 72, 0.4);
}

.tome-subtitle {
  font-size: 0.95rem;
  color: #BFA580;
  margin: 2px 0 0 0;
  font-style: italic;
}

.tome-banner-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* MASTERY WIDGET (TOP RIGHT) */
.tome-mastery-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 18, 10, 0.85);
  border: 1px solid #C69A48;
  padding: 6px 14px;
  border-radius: 6px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.tome-mastery-icon {
  font-size: 1.4rem;
  color: #C69A48;
}

.tome-mastery-lvl {
  font-size: 0.88rem;
  font-weight: 700;
  color: #F4E4C4;
  font-family: 'Cinzel', serif;
}

.tome-mastery-bar-wrap {
  width: 140px;
  height: 6px;
  background: #140C07;
  border: 1px solid #70471F;
  border-radius: 3px;
  overflow: hidden;
  margin: 3px 0;
}

.tome-mastery-bar {
  height: 100%;
  background: linear-gradient(90deg, #91632D, #C69A48, #E2B45A);
  box-shadow: 0 0 8px rgba(226, 180, 90, 0.5);
  transition: width 0.3s ease;
}

.tome-mastery-xp {
  font-size: 0.72rem;
  color: #A38C6E;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}

.tome-close-btn {
  background: #2D1A0F;
  border: 1px solid #70471F;
  color: #D8BE8F;
  font-size: 1.2rem;
  font-weight: 700;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.tome-close-btn:hover {
  background: #C64D42;
  color: #FFF;
  border-color: #E66A60;
  box-shadow: 0 0 12px rgba(198, 77, 66, 0.5);
}

/* ==========================================================================
   THE ANCIENT TOME: DUAL PARCHMENT PAGES & BOOKMARK TABS
   ========================================================================== */
.ancient-crafting-tome {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #2B180E; /* Leather cover border */
  border: 3px solid #724A1D;
  border-radius: 12px;
  box-shadow: 
    inset 0 0 25px rgba(0, 0, 0, 0.9),
    0 10px 30px rgba(0, 0, 0, 0.85);
  padding: 8px 10px;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* MAIN BOOK BODY: ROW HOLDING BOOKMARK TABS + DUAL PAGES */
.tome-book-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  gap: 0;
}

/* LEFT BOOKMARK TABS */
.tome-bookmarks-nav {
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 8px 10px 0;
  border-right: 2px solid #5A3A1E;
  background: #1C0F08;
  border-radius: 8px 0 0 8px;
  flex-shrink: 0;
}

.tome-bookmark-tab {
  background: linear-gradient(90deg, #2A170D 0%, #382013 100%);
  border: 1px solid #664121;
  border-right: none;
  border-radius: 6px 0 0 6px;
  padding: 10px 10px;
  color: #BFA580;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
}

.tome-bookmark-tab .tab-icon {
  font-size: 1.15rem;
}

.tome-bookmark-tab:hover {
  background: linear-gradient(90deg, #3D2214 0%, #4D2B19 100%);
  color: #F4E4C4;
  border-color: #91632D;
  padding-left: 14px;
}

.tome-bookmark-tab.active {
  background: linear-gradient(90deg, #57311B 0%, #6E3E22 100%);
  color: #FFF;
  border: 1px solid #C69A48;
  border-right: 3px solid #E2B45A;
  box-shadow: 0 0 15px rgba(198, 154, 72, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.5);
  padding-left: 14px;
}

.tome-nav-compass {
  margin-top: auto;
  text-align: center;
  font-size: 2.2rem;
  opacity: 0.6;
  padding-bottom: 6px;
}

/* DUAL PARCHMENT CONTAINER */
.tome-pages-container {
  flex: 1;
  display: flex;
  position: relative;
  background: #D8BE8F; /* Antique parchment */
  background-image: 
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 80%),
    linear-gradient(90deg, rgba(70, 40, 20, 0.15) 0%, transparent 15%, transparent 85%, rgba(70, 40, 20, 0.15) 100%);
  border: 2px solid #91632D;
  border-radius: 6px;
  box-shadow: inset 0 0 35px rgba(70, 40, 20, 0.45);
  overflow: hidden;
}

/* CENTER SPINE & BOOKMARK RIBBON */
.tome-center-ribbon {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 22px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(50, 28, 14, 0.5) 0%, rgba(198, 77, 66, 0.7) 40%, rgba(198, 77, 66, 0.9) 60%, rgba(50, 28, 14, 0.5) 100%);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  z-index: 10;
  pointer-events: none;
}

.tome-center-ribbon::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 2px;
  width: 18px;
  height: 25px;
  background: #C64D42;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

/* INDIVIDUAL TOME PAGE */
.tome-page {
  flex: 1;
  width: 50%;
  min-width: 0;
  height: 100%;
  padding: 16px 20px;
  box-sizing: border-box;
  overflow-y: auto;
  position: relative;
}

.tome-page-left {
  border-right: 1px solid rgba(114, 74, 29, 0.35);
  padding-right: 22px;
}

.tome-page-right {
  border-left: 1px solid rgba(114, 74, 29, 0.35);
  padding-left: 22px;
  background: rgba(232, 212, 172, 0.4);
}

.parchment-inner {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   SOL SAYFA: KATEGORİ, SUB-TABS & ÜRÜN KARTLARI (IMAGE 1 LEFT)
   ========================================================================== */
.tome-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(145, 99, 45, 0.4);
  margin-bottom: 10px;
}

.tome-cat-crest {
  font-size: 2.2rem;
  background: #E8D4AC;
  border: 1px solid #91632D;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 10px rgba(114, 74, 29, 0.35);
}

.tome-cat-text h3 {
  margin: 0;
  font-size: 1.45rem;
  color: #2D1A0F;
  font-weight: 800;
}

.tome-cat-text p {
  margin: 2px 0 0 0;
  font-size: 0.88rem;
  color: #5A3A1E;
  line-height: 1.35;
  font-style: italic;
}

/* SUB-CATEGORY PILLS */
.tome-subcat-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.tome-sub-pill {
  background: #CDB384;
  border: 1px solid #91632D;
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #382013;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tome-sub-pill:hover {
  background: #D8BE8F;
  border-color: #5A3A1E;
}

.tome-sub-pill.active {
  background: #382013;
  color: #F0DCB4;
  border-color: #C69A48;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* SCROLLABLE ITEM CARDS LIST */
.tome-items-scroll-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* CUSTOM VINTAGE SCROLLBAR */
.tome-items-scroll-list::-webkit-scrollbar,
.tome-page::-webkit-scrollbar {
  width: 6px;
}

.tome-items-scroll-list::-webkit-scrollbar-thumb,
.tome-page::-webkit-scrollbar-thumb {
  background: #91632D;
  border-radius: 3px;
}

.tome-items-scroll-list::-webkit-scrollbar-track,
.tome-page::-webkit-scrollbar-track {
  background: rgba(145, 99, 45, 0.15);
}

/* CRAFT ITEM ROW (IMAGE 1 LEFT CARDS) */
.tome-craft-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 230, 203, 0.8);
  border: 1px solid #B09264;
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 1px 4px rgba(70, 40, 20, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.tome-craft-row:hover {
  background: #FFF5E0;
  border-color: #724A1D;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(70, 40, 20, 0.2);
}

.tome-craft-row.selected {
  background: #FFF8EB;
  border: 2px solid #C69A48;
  box-shadow: 0 0 12px rgba(198, 154, 72, 0.35);
}

.tome-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.tome-row-icon-box {
  width: 36px;
  height: 36px;
  background: #382013;
  border: 1px solid #C69A48;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.tome-row-meta {
  display: flex;
  flex-direction: column;
}

.tome-row-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.tome-row-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #2D1A0F;
  font-family: 'Cinzel', serif;
}

.tome-row-tier {
  font-size: 0.78rem;
  font-weight: 700;
  color: #724A1D;
  font-family: 'JetBrains Mono', monospace;
}

.tome-row-desc {
  font-size: 0.8rem;
  color: #5A3A1E;
  margin-top: 1px;
}

.tome-row-xp-bar-wrap {
  width: 160px;
  height: 5px;
  background: #BFA580;
  border-radius: 3px;
  margin-top: 4px;
  overflow: hidden;
}

.tome-row-xp-bar-fill {
  height: 100%;
  background: #C69A48;
}

.tome-row-center-specs {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  color: #4D2B19;
  padding: 0 12px;
  text-align: right;
  line-height: 1.35;
}

.tome-row-right {
  display: flex;
  align-items: center;
}

.btn-tome-row-craft {
  background: linear-gradient(180deg, #382013, #231209);
  color: #F0DCB4;
  border: 1px solid #C69A48;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn-tome-row-craft:hover {
  background: linear-gradient(180deg, #57311B, #382013);
  color: #FFF;
  border-color: #E2B45A;
  box-shadow: 0 0 10px rgba(198, 154, 72, 0.5);
}

.btn-tome-row-craft:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #664121;
}

/* LEFT PAGE FOOTER */
.tome-left-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(145, 99, 45, 0.35);
  padding-top: 8px;
  margin-top: 8px;
}

.btn-tome-filter {
  background: #CDB384;
  border: 1px solid #724A1D;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #382013;
  cursor: pointer;
}

.tome-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #382013;
  cursor: pointer;
}

.tome-quick-stats {
  display: flex;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #724A1D;
}

/* ==========================================================================
   SAĞ SAYFA: SEÇİLEN ÜRÜN DETAYI (IMAGE 1 RIGHT INSPECTOR)
   ========================================================================== */
.tome-right-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(145, 99, 45, 0.4);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.tome-right-tab {
  background: #CDB384;
  border: 1px solid #91632D;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #382013;
  cursor: pointer;
}

.tome-right-tab.active {
  background: #382013;
  color: #F0DCB4;
  border-color: #C69A48;
}

.tome-selected-item-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tome-item-headline {
  border-bottom: 1px solid rgba(145, 99, 45, 0.3);
  padding-bottom: 6px;
}

.tome-item-title-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.tome-item-title-box h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #2D1A0F;
  font-weight: 800;
}

.tome-item-tier-badge {
  background: #382013;
  color: #F0DCB4;
  border: 1px solid #C69A48;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.tome-item-subdesc {
  margin: 3px 0 0 0;
  font-size: 0.88rem;
  color: #5A3A1E;
  font-style: italic;
}

/* WEAPON ART FRAME & LORE */
.tome-weapon-display-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(43, 24, 14, 0.85);
  border: 2px solid #C69A48;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.tome-weapon-art-frame {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #57311B 0%, #1E120A 100%);
  border: 1px solid #E2B45A;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.tome-art-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(232, 117, 40, 0.4) 0%, transparent 70%);
}

.tome-art-large-icon {
  font-size: 2.2rem;
  z-index: 2;
}

.tome-lore-quote {
  margin: 0;
  font-size: 0.95rem;
  color: #E8D4AC;
  line-height: 1.4;
  font-style: italic;
  font-family: 'Crimson Text', serif;
}

/* SPECS & MATERIALS GRID */
.tome-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tome-spec-box {
  background: rgba(244, 230, 203, 0.7);
  border: 1px solid #B09264;
  border-radius: 6px;
  padding: 8px 10px;
}

.tome-spec-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #382013;
  font-family: 'Cinzel', serif;
  border-bottom: 1px solid rgba(145, 99, 45, 0.3);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.tome-spec-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
}

.tome-spec-row {
  display: flex;
  justify-content: space-between;
  color: #4D2B19;
}

.tome-spec-row strong {
  color: #2D1A0F;
  font-family: 'JetBrains Mono', monospace;
}

.tome-materials-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
}

.mat-check-item {
  display: flex;
  justify-content: space-between;
  color: #382013;
}

.mat-check-item.ok {
  color: #2e7d32;
  font-weight: 700;
}

.mat-check-item.missing {
  color: #c62828;
  font-weight: 700;
}

/* DETAIL BLOCKS */
.tome-detail-block {
  background: rgba(244, 230, 203, 0.65);
  border: 1px solid #B09264;
  border-radius: 6px;
  padding: 6px 10px;
}

.tome-block-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #382013;
  font-family: 'Cinzel', serif;
  margin-bottom: 5px;
}

.tome-main-stats-chips, .tome-skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tome-stat-chip {
  background: #382013;
  color: #F0DCB4;
  border: 1px solid #C69A48;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
}

.tome-skill-badge {
  background: #CDB384;
  color: #2D1A0F;
  border: 1px solid #724A1D;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
}

/* FUSIONS LIST */
.tome-fusions-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tome-fusion-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(43, 24, 14, 0.85);
  border: 1px solid #724A1D;
  border-radius: 4px;
  padding: 4px 8px;
  color: #E8D4AC;
}

.tome-fusion-row .fusion-symbol {
  font-size: 1.2rem;
}

.tome-fusion-row .fusion-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.tome-fusion-row strong {
  font-size: 0.82rem;
  color: #F0DCB4;
}

.tome-fusion-row small {
  font-size: 0.72rem;
  color: #BFA580;
}

.btn-fusion-discover {
  background: #382013;
  color: #C69A48;
  border: 1px solid #C69A48;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

/* ACTION CRAFT BUTTON (LARGE) */
.tome-action-craft-bar {
  margin-top: 4px;
}

.btn-tome-master-craft {
  width: 100%;
  background: linear-gradient(180deg, #A85A1D 0%, #70330E 100%);
  border: 2px solid #E2B45A;
  border-radius: 6px;
  color: #FFF;
  padding: 10px 18px;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: 'Cinzel', serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
}

.btn-tome-master-craft:hover {
  background: linear-gradient(180deg, #C46D24 0%, #8A3E12 100%);
  border-color: #FFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(232, 117, 40, 0.6);
}

.tome-proverb {
  font-size: 0.8rem;
  color: #5A3A1E;
  font-style: italic;
  text-align: center;
  margin-top: 2px;
}

/* ==========================================================================
   BOTTOM RIBBON BAR (AKTİF FÜZYONLAR)
   ========================================================================== */
.tome-bottom-bar {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid #5A3A1E;
  padding: 8px 14px;
  margin-top: 8px;
  background: #140B06;
  border-radius: 6px;
  box-sizing: border-box;
}

.tome-fusions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fusions-bar-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #C69A48;
  font-family: 'Cinzel', serif;
}

.fusion-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.fusion-tag.active-tag {
  background: #2D1A0F;
  border: 1px solid #4EAC78;
  color: #4EAC78;
}

.fusion-tag.locked-tag {
  background: #1E120A;
  border: 1px dashed #664121;
  color: #724A1D;
}

.btn-tome-exit {
  background: #382013;
  color: #D8BE8F;
  border: 1px solid #724A1D;
  border-radius: 4px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  cursor: pointer;
}

.btn-tome-exit:hover {
  background: #57311B;
  color: #FFF;
}

/* ==========================================================================
   IMAGE 2: KADİM BİLGELİK GRIMOIRE (WISDOM & 184 SKILLS TOME)
   ========================================================================== */
.wisdom-grimoire-book {
  background: #22120A;
}

.wisdom-pill-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(145, 99, 45, 0.4);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.w-pill-btn {
  background: #CDB384;
  border: 1px solid #91632D;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #382013;
  cursor: pointer;
  font-family: 'Cinzel', serif;
}

.w-pill-btn.active {
  background: #382013;
  color: #F0DCB4;
  border-color: #C69A48;
}

.wisdom-main-stats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.w-stat-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 230, 203, 0.75);
  border: 1px solid #B09264;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.w-stat-card-row:hover, .w-stat-card-row.active {
  background: #FFF8EB;
  border-color: #C69A48;
  box-shadow: 0 0 10px rgba(198, 154, 72, 0.3);
}

.w-stat-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.w-stat-icon {
  font-size: 1.4rem;
}

.w-stat-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #2D1A0F;
  font-family: 'Cinzel', serif;
}

.w-stat-lvl {
  font-size: 0.82rem;
  font-weight: 700;
  color: #724A1D;
  font-family: 'JetBrains Mono', monospace;
}

.w-stat-bar-track {
  width: 90px;
  height: 5px;
  background: #BFA580;
  border-radius: 3px;
  overflow: hidden;
}

.w-stat-bar-fill {
  height: 100%;
  background: #C69A48;
}

/* DERIVED ATTRIBUTES SUMMARY (IMAGE 2 MIDDLE COLUMN) */
.wisdom-derived-summary-box {
  background: rgba(244, 230, 203, 0.6);
  border: 1px solid #B09264;
  border-radius: 6px;
  padding: 8px 10px;
}

.summary-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2D1A0F;
  font-family: 'Cinzel', serif;
  border-bottom: 1px solid rgba(145, 99, 45, 0.3);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.derived-props-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 0.8rem;
}

.derived-prop-item {
  display: flex;
  justify-content: space-between;
  color: #4D2B19;
}

.derived-prop-item strong {
  color: #2D1A0F;
  font-family: 'JetBrains Mono', monospace;
}

/* STAT DEEP INSPECTION & RELATIONSHIP TREE (IMAGE 2 RIGHT) */
.wisdom-stat-crest-header {
  text-align: center;
  border-bottom: 1px solid rgba(145, 99, 45, 0.3);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.stat-crest-icon {
  font-size: 3rem;
  margin-bottom: 4px;
}

.stat-focus-title {
  font-size: 1.5rem;
  color: #2D1A0F;
  margin: 0;
  font-family: 'Cinzel', serif;
}

.stat-focus-lvl {
  font-size: 1.05rem;
  font-weight: 700;
  color: #724A1D;
  margin-top: 2px;
}

.stat-focus-bar-wrap {
  width: 240px;
  height: 8px;
  background: #BFA580;
  border-radius: 4px;
  margin: 6px auto;
  overflow: hidden;
}

.stat-focus-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #91632D, #C69A48, #E2B45A);
}

.stat-focus-xp-text {
  font-size: 0.78rem;
  color: #5A3A1E;
  font-family: 'JetBrains Mono', monospace;
}

.stat-focus-desc {
  font-size: 0.9rem;
  color: #4D2B19;
  text-align: center;
  line-height: 1.4;
  margin: 8px 0;
  font-style: italic;
}

.wisdom-linked-stats-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.linked-chip {
  background: #382013;
  color: #F0DCB4;
  border: 1px solid #C69A48;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* ATTRIBUTE RELATIONSHIPS TREE DIAGRAM */
.wisdom-relationships-tree {
  background: rgba(244, 230, 203, 0.8);
  border: 1px solid #B09264;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  margin: 12px 0;
}

.tree-header-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #382013;
  font-family: 'Cinzel', serif;
  margin-bottom: 8px;
}

.tree-root-node {
  margin-bottom: 12px;
}

.root-badge {
  background: #382013;
  color: #E2B45A;
  border: 2px solid #C69A48;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: 'Cinzel', serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tree-branches-row {
  display: flex;
  justify-content: space-around;
  gap: 8px;
}

.tree-leaf-node {
  background: #E8D4AC;
  border: 1px solid #91632D;
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.78rem;
  color: #2D1A0F;
  flex: 1;
}

.tree-leaf-node .leaf-icon {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.tree-leaf-node small {
  color: #724A1D;
  font-weight: 700;
}

.wisdom-flavor-quote {
  font-size: 0.92rem;
  color: #5A3A1E;
  font-style: italic;
  text-align: center;
  margin: 10px 0 0 0;
}

/* 184 SKILLS VIEW IN GRIMOIRE */
.tome-search-input {
  background: #E8D4AC !important;
  color: #2D1A0F !important;
  border: 1px solid #91632D !important;
  font-family: 'Crimson Text', serif !important;
  font-size: 0.95rem !important;
}

.tome-search-input::placeholder {
  color: #724A1D !important;
}

.tome-pills-bar {
  margin: 8px 0;
}

.tome-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

/* MAIN DASHBOARD MEDIEVAL CARDS POLISH */
.card {
  background: #18110B !important;
  border: 1px solid #4D3019 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
}

.card-header {
  border-bottom: 1px solid #4D3019 !important;
  background: linear-gradient(90deg, rgba(56, 32, 19, 0.5) 0%, transparent 100%) !important;
}

.btn-primary, .choice-btn {
  background: linear-gradient(180deg, #2D1A0F, #1C0F08) !important;
  border-color: #664121 !important;
  color: #E2D3B8 !important;
}

.btn-primary:hover, .choice-btn:hover {
  background: linear-gradient(180deg, #422615, #2D1A0F) !important;
  border-color: #C69A48 !important;
  color: #FFF !important;
}

/* ==========================================================================
   GRIMOIRE ADVANCED TAB PANES (ALT STATS, EFFECTS, 184 SKILLS)
   ========================================================================== */
.wisdom-pane-header {
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(145, 99, 45, 0.3);
  padding-bottom: 6px;
}

.wisdom-pane-header h4 {
  margin: 0 0 2px 0;
  font-family: 'Cinzel', serif;
  color: #2D1A0F;
  font-size: 1rem;
}

.wisdom-pane-header p {
  margin: 0;
  font-size: 0.78rem;
  color: #5A3A1E;
}

.wisdom-alt-stats-scroll,
.wisdom-effects-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  padding-right: 4px;
}

.w-alt-card-row, .w-effect-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 230, 203, 0.75);
  border: 1px solid #B09264;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.w-alt-card-row:hover, .w-alt-card-row.active,
.w-effect-card-row:hover, .w-effect-card-row.active {
  background: #FFF8EB;
  border-color: #C69A48;
  box-shadow: 0 0 10px rgba(198, 154, 72, 0.35);
  transform: translateX(2px);
}

.w-alt-card-left, .w-effect-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.w-alt-val-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2D1A0F;
  background: rgba(198, 154, 72, 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #C69A48;
}

.wisdom-formula-box {
  background: rgba(244, 230, 203, 0.8);
  border: 1px solid #B09264;
  border-radius: 8px;
  padding: 12px;
  margin: 14px 0;
}

.formula-title, .sources-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #2D1A0F;
  font-family: 'Cinzel', serif;
  margin-bottom: 6px;
}

.formula-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #724A1D;
  background: #E8D4AC;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #C69A48;
}

.wisdom-sources-box {
  background: rgba(244, 230, 203, 0.5);
  border: 1px solid #B09264;
  border-radius: 8px;
  padding: 12px;
}

.sources-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-chip {
  background: #E8D4AC;
  border: 1px solid #91632D;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.78rem;
  color: #2D1A0F;
  font-weight: 600;
}

.catalog-left-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}


