@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,400&display=swap');

/* ========================================
   FUENTES Y LAYOUT GENERAL
   ======================================== */
:root { --font-rpg: "Minion Pro", "Crimson Text", "EB Garamond", serif; --font-titles: "Cinzel", serif; }
body { text-shadow: 0px 3px 4px rgba(0, 0, 0, 1); font-family: var(--font-rpg); font-size: 1rem; }
html { scroll-behavior: smooth; }
h1, h2, h3 { font-family: var(--font-titles); letter-spacing: 1px; text-transform: uppercase; }
.md-typeset { font-family: var(--font-rpg); font-size: 1rem; }

/* ========================================
   NAVEGACIÓN Y HEADER
   ======================================== */
.md-header { background-color: #2b1d12 !important; border-bottom: 1px solid rgba(245, 194, 39, 0.3) !important; height: 3rem !important; }
.md-header__title { font-size: 1rem !important; line-height: 3rem !important; }
.md-header__title, .md-header__button { color: #f5c227 !important; }
.md-tabs { background-color: #3d2b1f !important; height: 2.5rem !important; }
.md-tabs__list { display: flex; align-items: center; }
.md-tabs__item { border-right: 1px solid rgba(245, 194, 39, 0.2); display: flex; align-items: stretch; margin: 0 !important; padding: 0 !important; }
.md-tabs__item:last-child { border-right: none; }
.md-tabs__item:hover:not(.md-tabs__item--active) { background: rgba(255, 255, 255, 0.05); }
.md-tabs__item:hover .md-tabs__link { opacity: 1 !important; color: #f5c227 !important; }
.md-tabs__item:has(.md-tabs__link--active) { border-right: 1px solid rgba(245, 194, 39, 0.5); }
.md-tabs__item--active { background: rgba(245, 194, 39, 0.12) !important; box-shadow: inset 0 -3px 0 #f5c227; }
.md-tabs__item--active .md-tabs__link { color: #f5c227 !important; opacity: 1 !important; text-shadow: 0 0 10px rgba(245, 194, 39, 0.3); }
.md-tabs__link { display: flex !important; align-items: center; line-height: 2.5rem !important; padding: 0 15px !important; font-size: 1.3rem !important; height: 100%; margin: 0 !important; transition: all 0.2s ease; opacity: 0.7; }
.md-tabs__link:hover { color: #f5c227 !important; opacity: 1 !important; background: rgba(255, 255, 255, 0.05); text-shadow: 0 0 8px rgba(245, 194, 39, 0.6); }
.md-logo { height: 1.8rem !important; width: auto !important; margin: 0.4rem; }
.md-logo img { height: 38px !important; width: auto !important; image-rendering: pixelated; transition: transform 0.3s ease; position: relative; top: -2px !important; }
.md-logo:hover img { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(245, 194, 39, 0.6)); }
.md-search { display: none !important; }
.md-search__input { background-color: rgba(0, 0, 0, 0.2) !important; }
.md-search__form { background-color: rgba(255, 255, 255, 0.05) !important; border: 1px solid rgba(245, 194, 39, 0.2); }
.custom-header-search { position: relative; margin-left: auto; margin-right: 15px; width: 250px; max-width: 10rem; margin: 0 auto; flex-grow: 1; }
#header-search-input { width: 100%; padding: 6px 15px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(245, 194, 39, 0.4); border-radius: 20px; color: #f5c227; font-size: 0.75rem; outline: none; }
#header-search-input:focus { border-color: #f5c227; background: rgba(0, 0, 0, 0.5); }
.md-sidebar--primary { display: none !important; }
.md-main__inner { margin-left: auto !important; margin-right: auto !important; max-width: 60rem; display: block !important; }
.md-content { margin-left: 0 !important; max-width: 100%; }
.md-content__inner { margin: 0 auto !important; }

/* ========================================
   CONFIGURACIÓN DE PÁGINA Y GRID
   ======================================== */
.md-grid { max-width: 85%; }

/* ========================================
   TÍTULOS ESTILO RPG
   ======================================== */
.md-typeset h1, .md-typeset h2 { color: #f5c227; text-transform: uppercase; text-align: center; border-bottom: none; padding-bottom: 0; margin-bottom: 20px; position: relative; font-weight: 800; }
.md-typeset h1::after, .md-typeset h2::after { display: none !important; }
.md-typeset h3 { background: linear-gradient(90deg, rgba(245,194,39,.1) 0%, transparent 100%); padding: 5px 10px; border-left: 4px solid #f5c227; color: #e8e8e8; text-align: left; }

/* ========================================
   RELIQUIAS (RELIC CARDS)
   ======================================== */
.relics-container { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; justify-content: center; font-size: 0.85rem; }
.relic-card { border: 1px solid rgba(46, 139, 87, 0.3); border-radius: 8px; padding: 20px; background: rgba(20, 35, 25, 0.6); display: inline-block; width: min-content; min-width: 400px; height: fit-content; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; overflow: visible !important; }
.relic-hidden { opacity: 0 !important; visibility: hidden !important; }
.relic-card:hover { transform: translateY(-5px) scale(1.02); border-color: rgba(76, 175, 80, 0.6); background: rgba(30, 50, 35, 0.8); box-shadow: 0 10px 25px rgba(0, 255, 100, 0.05); }
.relic-header { display: flex; align-items: center; margin-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 8px; white-space: nowrap; }
.relic-icon { width: 40px !important; height: 40px !important; image-rendering: pixelated; margin-right: 15px; object-fit: contain; flex-shrink: 0; }
.relic-name { font-weight: bold; font-size: 1.1rem; color: #fff; margin: 0 !important; padding: 0 !important; background: none !important; border: none !important; }
.relic-card p { margin-bottom: 15px; line-height: 1.5; }
.relic-card details { border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px; padding: 0.5em; cursor: pointer; background: rgba(0, 0, 0, 0.15); }
.relic-card summary { font-weight: bold; color: var(--md-accent-fg-color); outline: none; }
.relic-card details div, .relic-card details summary, .relic-card details p { font-size: 0.75rem !important; line-height: 1.4; color: #ccc; }
.card-icon { width: 56px !important; height: 56px !important; image-rendering: pixelated; margin-right: 15px; object-fit: contain; flex-shrink: 0; }

/* ========================================
   BUSCADORES Y FILTROS
   ======================================== */
.custom-search-container { margin: 20px auto; max-width: 500px; position: relative; z-index: 100; }
#tag-search-input { width: 100%; padding: 12px 20px; background: rgba(20, 35, 25, 0.9); border: 1px solid rgba(46, 139, 87, 0.5); border-radius: 25px; color: white; font-family: inherit; outline: none; transition: all 0.3s ease; }
#tag-search-input:focus { border-color: #76af50; box-shadow: 0 0 15px rgba(118, 175, 80, 0.2); }
.tag-search-results { position: absolute; top: 110%; left: 0; right: 0; background: rgba(15, 25, 20, 0.95); border: 1px solid rgba(46, 139, 87, 0.4); border-radius: 8px; max-height: 300px; overflow-y: auto; display: none; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.tag-result-item { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; transition: background 0.2s; }
.tag-result-item:hover { background: rgba(46, 139, 87, 0.2); background-color: rgba(245, 194, 39, 0.1) !important; }
.tag-result-item:hover .keyword { text-shadow: 0 0 8px rgba(245, 194, 39, 0.5); }
.tag-result-name { display: block; font-weight: bold; color: #f5c227; font-size: 0.9rem; margin-bottom: 4px; }
.tag-result-desc { display: block; font-size: 0.8rem; color: #ccc; line-height: 1.3; }
.filter-container { margin: 20px auto 30px; max-width: 450px; text-align: center; }
#relic-filter-input { width: 100%; padding: 12px 20px; background: rgba(20, 35, 25, 0.7); border: 1px solid rgba(46, 139, 87, 0.4); border-radius: 20px; color: white; font-family: inherit; transition: border-color 0.3s; }
#relic-filter-input:focus { border-color: #76af50; outline: none; }
#relic-filter-input:not(:placeholder-shown) { border-color: #f5c227; background: rgba(46, 139, 87, 0.1); }
#clear-filter { margin-top: 10px; background: rgba(46, 139, 87, 0.2); border: 1px solid #76af50; color: #76af50; padding: 5px 12px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
#clear-filter:hover { background: rgba(46, 139, 87, 0.4); }

/* ========================================
   KEYWORDS Y TOOLTIPS
   ======================================== */
.keyword { font-weight: bold; cursor: help; position: relative; display: inline-block; }
.relic-card, .skill-upgrade-container, .skill-tags-pills { overflow: visible !important; }
.skill-tag-bubble.keyword { position: relative; cursor: help; }
.custom-tooltip { visibility: hidden; position: absolute; z-index: 999; bottom: 125%; left: 50%; transform: translateX(-50%); text-align: center; padding: 8px 12px; border: 1px solid #f5c227; border-radius: 4px; color: #b0b8c4 !important; text-transform: none !important; font-weight: 400 !important; font-style: normal !important; letter-spacing: normal; background-color: rgba(15, 25, 35, 0.98) !important; width: 200px; font-size: 0.7rem; line-height: 1.3; pointer-events: none; opacity: 0; transition: opacity 0.2s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.custom-tooltip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #f5c227 transparent transparent transparent; }
.keyword:hover .custom-tooltip { visibility: visible; opacity: 1; }
.relic-card:nth-child(-n+3) .custom-tooltip { bottom: auto; top: 125%; }
.relic-card:nth-child(-n+3) .custom-tooltip::after { top: auto; bottom: 100%; border-color: transparent transparent #f5c227 transparent; }
.skill-tag-bubble[style*="color"]:hover { filter: brightness(1.2); background-color: color-mix(in srgb, currentColor, transparent 30%) !important; }

/* ========================================
   DESPLEGABLES (DOWN Y BIG)
   ======================================== */
.md-typeset details.down, .md-typeset details.big { margin: 8px 0; border: 1px solid #3a4556; border-radius: 4px; overflow: visible !important; }
.md-typeset details.down > summary, .md-typeset details.big > summary { font-weight: 700; list-style: none; cursor: pointer; display: flex; align-items: center; transition: background 0.3s, color 0.3s; }
.md-typeset details.down > summary img, .md-typeset details.big > summary img { --img-size: 40px; width: var(--img-size) !important; height: var(--img-size) !important; margin-right: 15px; image-rendering: pixelated; object-fit: contain; vertical-align: middle; }
.md-typeset details.big.large-ratio > summary img { --img-size: 56px; }
.md-typeset details.down > summary::after, .md-typeset details.big > summary::after { content: "▶"; font-size: 0.75em; margin-left: auto; transition: transform .25s ease; }
.md-typeset details.down > summary::before, .md-typeset details.big > summary::before { display: none !important; }
.md-typeset details[open] > summary::after { transform: rotate(90deg); }
.md-typeset details[open] > summary { border-bottom: 1px solid #3a4556; margin-bottom: 4px; }
.md-typeset details.down { background: transparent !important; box-shadow: none !important; }
.md-typeset details.down, .md-typeset details.down > summary { background-color: transparent !important; }
.md-typeset details.down > summary { font-size: 1.1rem; padding: 8px 12px; }
.md-typeset details.big { background: rgba(30, 40, 56, 0.15); max-width: 900px; margin-left: auto !important; margin-right: auto !important; width: 100%; }
.md-typeset details.big > summary { font-size: 1.8rem; padding: 10px 14px; color: #ffd700; }
.md-typeset details.down > :not(summary), .md-typeset details.big > :not(summary) { padding: 15px !important; margin-top: 2px !important; margin-bottom: 2px !important; padding-top: 2px !important; padding-bottom: 2px !important; font-size: 0.75rem !important; line-height: 1.4 !important; color: #b0b8c4 !important; }
.md-typeset details.down, .md-typeset details.down > :not(summary), .md-typeset details.down p { margin-top: 2px !important; margin-bottom: 2px !important; padding-top: 2px !important; padding-bottom: 2px !important; }
.text-title-small { font-size: 0.75em; font-weight: bold; }
/* Warrior + Tortoise (Azul) */
details.big:has(img[src*="warrior"]),
details.big:has(img[src*="tortoise"]) { border-color: rgba(60, 100, 150, 0.5); background: rgba(30, 45, 70, 0.2); }
details.big:has(img[src*="warrior"]) > summary,
details.big:has(img[src*="tortoise"]) > summary { color: #8eb1e0 !important; }
/* Mage (Morado) */
details.big:has(img[src*="mage"]) { border-color: rgba(120, 80, 160, 0.4); background: rgba(50, 30, 70, 0.2); }
details.big:has(img[src*="mage"]) > summary { color: #b39ddb !important; }
/* Rogue + Wolf (Rojo) */
details.big:has(img[src*="rogue"]),
details.big:has(img[src*="wolf"]) { border-color: rgba(160, 60, 60, 0.4); background: rgba(70, 30, 30, 0.2); }
details.big:has(img[src*="rogue"]) > summary,
details.big:has(img[src*="wolf"]) > summary { color: #e57373 !important; }
/* Archer + Owl (Verde) */
details.big:has(img[src*="archer"]),
details.big:has(img[src*="owl"]) { border-color: rgba(60, 140, 80, 0.4); background: rgba(30, 60, 40, 0.2); }
details.big:has(img[src*="archer"]) > summary,
details.big:has(img[src*="owl"]) > summary { color: #a5d6a7 !important; }
/* Farmer (Dorado) */
details.big:has(img[src*="farmer"]) { border-color: rgba(160, 130, 40, 0.4); background: rgba(60, 50, 20, 0.2); }
details.big:has(img[src*="farmer"]) > summary { color: #ffe082 !important; }
details.down p, details.down div { margin-bottom: 10px; }
details.down strong { color: #fff; font-size: 0.95rem; letter-spacing: 0.5px; display: inline-block; margin-top: 10px; }

/* ========================================
   CLASES Y STATS
   ======================================== */
.class-intro-wrapper { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; margin: 20px 0; }
.class-description { flex: 1.5; min-width: 300px; font-size: 0.75rem; line-height: 1.5; }
.class-stats-side { flex: 1; min-width: 400px; transition: transform 0.3s ease, filter 0.3s ease; }
.stats-container-side { position: relative; display: flex !important; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.03); padding: 30px 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); min-height: 180px; }
.stat-col { display: flex !important; flex-direction: column; gap: 10px; z-index: 1; }
.stat-col.left { align-items: flex-start; text-align: left; }
.stat-col.right { align-items: flex-end; text-align: right; }
.stat-label-side, .stat-value-side { white-space: nowrap; height: 1.2rem; display: flex; align-items: center; font-size: 0.75rem; font-weight: bold; }
.stat-label-side { color: #cccccc; }
.class-stat-image { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 130px !important; height: 130px !important; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 12px rgba(245, 194, 39, 0.4)); animation: float-center-final 3s ease-in-out infinite; pointer-events: none; z-index: 2; }
@keyframes float-center-final { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 10px)); } }
.render-stars { display: flex !important; align-items: center; height: 1.2rem; gap: 0; }
.render-stars span { line-height: 1; display: inline-block; }
.stars-gold { color: #ffd700; text-shadow: 0 0 5px rgba(255, 215, 0, 0.4); letter-spacing: 2px; }
.stars-empty { color: rgba(255, 255, 255, 0.1); letter-spacing: 2px; }

/* ========================================
   SKILL UPGRADES
   ======================================== */
.skill-block { display: block; width: 100%; margin: 0; padding: 0; background: transparent; border: none; }
.skill-upgrade-container { display: flex; gap: 80px; background: rgba(0, 0, 0, 0.2); padding: 20px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05); align-items: center; width: 100%; box-sizing: border-box; margin-top: 10px; overflow: visible !important; }
.skill-branches-wrapper { flex: 0 0 180px; display: flex; justify-content: center; align-items: center; margin: 20px 40px 0 60px !important; padding: 0 !important; overflow: visible !important; }
.skill-branches-map { width: 180px; height: auto; display: block; overflow: visible; margin-bottom: 0 !important; transform: scale(2.2); transform-origin: center center; }
.skill-branches-info { flex: 1; min-width: 0; font-size: 0.75rem; line-height: 1.6; color: #cccccc; text-align: left; display: block !important; }
.skill-branches-info strong, .skill-branches-info b { color: #f5c227; font-weight: bold; display: inline; }
.skill-branches-info br { display: block; content: ""; margin-top: 8px; }
.skill-tags-bottom { display: block; width: 100%; margin-top: 15px !important; font-weight: bold; font-size: 0.75rem; }
.skill-tags-bottom em strong { color: #f5c227; font-style: italic; line-height: 1; }
.skill-tags-label { font-size: 0.65rem; text-transform: uppercase; color: #666; letter-spacing: 1px; font-weight: bold; }
.skill-tags-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; border: none !important; margin-bottom: 0; padding: 0; }
.skill-tags-pills:hover { position: relative; z-index: 1000; }
.skill-tag-bubble { display: inline-block; padding: 2px 10px; border: 1px solid; background: rgba(255, 255, 255, 0.05); border-radius: 4px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; margin: 2px; transition: all 0.2s ease; opacity: 0.9; }
.skill-tag-bubble[class*="keyword-"] { background-color: color-mix(in srgb, currentColor, transparent 90%); }
.skill-tag-bubble:hover { background-color: color-mix(in srgb, currentColor, transparent 80%); transform: scale(1.05); opacity: 1; }
.skill-tag-bubble:first-child .custom-tooltip { left: 0; transform: translateX(0); }
.skill-tag-bubble:last-child .custom-tooltip { left: auto; right: 0; transform: translateX(0); }
.upgrade-title { color: #f5c227 !important; font-weight: 800 !important; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; margin: 20px 0 10px 0 !important; display: block; border-bottom: 1px solid rgba(245, 194, 39, 0.2); padding-bottom: 5px; }
.passive-title { color: #f5c227; font-weight: bold; font-style: italic; margin-bottom: 15px; border-left: 3px solid #f5c227; padding-left: 10px; }
.branch-line { fill: none; stroke: rgba(245, 194, 39, 0.3); stroke-width: 2; transition: all 0.3s ease; pointer-events: none; }
.branch-text { fill: #ffffff; font-size: 10px; font-weight: bold; text-transform: uppercase; font-family: 'Segoe UI', sans-serif; letter-spacing: 0.5px; transition: fill 0.3s ease; user-select: none; pointer-events: none; }
.branch-node-mid { fill: #1a1a1a; stroke: rgba(245, 194, 39, 0.6); stroke-width: 1.5; }
.branch-node-end { fill: #f5c227; stroke: #f5c227; filter: drop-shadow(0 0 3px rgba(245, 194, 39, 0.5)); }
.branch-node { transition: all 0.15s ease; cursor: pointer !important; }
.branch-node:hover { stroke-width: 3 !important; filter: brightness(1.3) !important; }

/* ========================================
   GEAR PIECES
   ======================================== */
.character-stats-container { display: flex; justify-content: space-between; align-items: center; background: rgba(0, 0, 0, 0.2); padding: 20px; border-radius: 8px; color: #fff; max-width: 600px; margin: 20px auto; font-family: var(--font-rpg); }
.stats-column { display: flex; flex-direction: column; gap: 15px; flex: 1; }
.stat-row { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; width: 100%; transition: all 0.2s; }
.left-c .stat-row:nth-child(1), .left-c .stat-row:nth-child(5) { margin-left: 20px; }
.left-c .stat-row:nth-child(2), .left-c .stat-row:nth-child(4) { margin-left: 5px; }
.right-c { align-items: flex-end; }
.right-c .stat-row { justify-content: flex-end; margin-right: 5px; }
.right-c .stat-row:nth-child(1), .right-c .stat-row:nth-child(5) { margin-right: 20px; }
.right-c .stat-details { align-items: flex-end; text-align: right; }
.stat-details { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.stat-details span { white-space: nowrap; display: flex !important; overflow: hidden; flex-direction: row !important; gap: 6px; }
.right-c .stat-details span { flex-direction: row !important; justify-content: flex-end; }
.item-name { font-size: 0.75rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; display: block !important; width: 100%; }
.stat-row img { width: 40px; height: 40px; image-rendering: pixelated; flex-shrink: 0; }
.icon-wrapper { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background-image: url('../icons_gear/t1.png'); background-size: contain; background-repeat: no-repeat; image-rendering: pixelated; transition: background-image 0s ease; }
.icon-wrapper img { width: 40px !important; height: 40px !important; z-index: 1; image-rendering: pixelated; }
.dot-container { position: absolute; top: 3px; display: flex; gap: 3px; justify-content: center; width: 100%; z-index: 2; pointer-events: none; }
.dot { width: 7px; height: 7px; background: #fff; border: 1.5px solid #000; border-radius: 50%; display: none; }
.dot.active { display: block; }
.stats-center { flex: 1.2; text-align: center; }
@keyframes float-center-final-2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.main-avatar { width: 120px; height: auto; image-rendering: pixelated; animation: float-center-final-2 3s ease-in-out infinite; pointer-events: none; }
.slider-container { width: 100%; max-width: 500px; margin: 5px auto; text-align: center; padding: 0; }
.tier-slider { -webkit-appearance: none; width: 100%; height: 8px; background: #33261a; border-radius: 5px; outline: none; border: 1px solid #555; }
.tier-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: #f5c227; cursor: pointer; border: 2px solid #000; border-radius: 4px; box-shadow: 0 0 10px rgba(245,194,39,0.5); }
.tier-display { margin-top: 5px; color: #aaa; font-family: sans-serif; font-size: 0.9rem; letter-spacing: 1px; }
#display-tier, #display-level { color: #fff; font-weight: bold; }

/* ========================================
   UTILIDADES Y VARIOS
   ======================================== */
.md-search-result__teaser { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: 3em; font-size: 0.75rem; }
.twitch-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 20px 0; border-radius: 8px; border: 1px solid #3a4556; }
.twitch-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.nota-guia, .centrado { display: block; text-align: center; margin: 1.5em 0; opacity: 0.8; }
.nota-guia { font-style: italic; }
.centrado { font-weight: bold; }
.town-section { display: flex; flex-direction: column; gap: 40px; margin: 40px auto; max-width: 900px; }
.building-row { display: flex; align-items: center; gap: 20px; flex-wrap: nowrap; }
.building-row:nth-child(even) { flex-direction: row-reverse; }
.building-image { flex: 0 0 300px; display: flex; justify-content: center; }
.building-image img { width: 100%; height: auto; border-radius: 8px; image-rendering: pixelated; border: none !important; background: transparent !important; box-shadow: none; transition: transform 0.4s ease, filter 0.4s ease; }
.building-row:hover .building-image img { transform: translateY(-10px); filter: drop-shadow(0 10px 15px rgba(245, 194, 39, 0.4)); }
.building-info { flex: 1; }
.building-title { font-size: 1.1rem; color: #f5c227; margin-bottom: 8px; font-weight: 800; text-transform: uppercase; }
.building-description { font-size: 0.75rem; line-height: 1.5; color: #e0e0e0; text-align: justify; }
.introduction-row { display: flex; align-items: flex-start; gap: 40px; margin-bottom: 40px; }
.introduction-row.reverse { flex-direction: row-reverse; }
.introduction-image { flex: 0 0 120px; display: flex; justify-content: center; padding-top: 10px; }
.introduction-image img { width: auto !important; height: auto !important; scale: 3; image-rendering: pixelated; border: none !important; background: transparent !important; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease; }
.introduction-row .introduction-image img { transform: translateY(30px) scaleX(-1); }
.introduction-row.reverse .introduction-image img { transform: translateY(30px) scaleX(1); }
.introduction-row:not(.reverse):hover .introduction-image img { transform: translateY(30px) scaleX(1); }
.introduction-row.reverse:hover .introduction-image img { transform: translateY(30px) scaleX(-1); }
.introduction-info { flex: 1; display: flex; flex-direction: column; }
.introduction-title { font-size: 1.4rem; color: #f5c227; margin-bottom: 12px; font-weight: 800; text-transform: uppercase; width: 100%; }
.introduction-row .introduction-title, .introduction-row .introduction-description { text-align: left; }
.introduction-row.reverse .introduction-title, .introduction-row.reverse .introduction-description { text-align: right; }
.introduction-description { font-size: 1rem; line-height: 1.6; color: #e0e0e0; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.download-btn-rpg {
    display: inline-block;
    padding: 10px 20px;
    background-color: rgba(60, 140, 80, 0.4); /* Verde tipo Archer */
    border: 2px solid #a5d6a7;
    color: #fff !important;
    text-decoration: none !important;
    font-family: var(--font-rpg);
    image-rendering: pixelated;
    transition: all 0.3s;
    cursor: pointer;
}

.download-btn-rpg:hover {
    background-color: rgba(60, 140, 80, 0.8);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(165, 214, 167, 0.4);
}

/* ========================================
   ADAPTACIÓN MÓVIL (RESPONSIVE)
   ======================================== */
@media screen and (max-width: 76.25em) { .custom-header-search { flex-grow: 1; margin: 0 10px; } }
@media screen and (max-width: 768px) {
    html, body { overflow-x: hidden !important; max-width: 100vw !important; margin: 0 !important; padding: 0 !important; }
    body { width: 100% !important; }
    .md-main, .md-content, .md-content__inner { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100vw !important; overflow-x: hidden !important; }
    .md-typeset { padding: 0 5% !important; margin: 0 auto !important; width: 100% !important; max-width: 100vw !important; box-sizing: border-box !important; font-size: 0.95rem; overflow-x: hidden !important; }
    .md-logo { width: auto !important; height: auto !important; min-width: 50px !important; }
    .md-logo img { width: auto !important; height: 38px !important; min-width: 38px !important; object-fit: contain !important; image-rendering: pixelated !important; }
    .md-header__button.md-logo, .md-header__title { display: flex !important; opacity: 1 !important; visibility: visible !important; }
    [for="__drawer"] { display: none !important; }
    .class-intro-wrapper { display: flex !important; flex-direction: column !important; align-items: center !important; width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 20px 0 !important; box-sizing: border-box !important; overflow: visible !important; }
    .class-description { text-align: center !important; width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 0 0 20px 0 !important; box-sizing: border-box !important; }
    .class-stats-side { width: 100% !important; max-width: 100% !important; margin: 0 auto !important; padding: 0 !important; transform: scale(0.85) !important; transform-origin: center center !important; box-sizing: border-box !important; }
    .class-stats-side:hover { transform: scale(0.87) !important; }
    .stats-container-side { margin: 0 auto !important; max-width: 95% !important; width: 100% !important; box-sizing: border-box !important; }
    .class-stat-image { max-width: 100px !important; max-height: 100px !important; }
    .relics-container { width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 20px 0 !important; gap: 15px !important; box-sizing: border-box !important; }
    .relic-card { width: 100% !important; max-width: 100% !important; min-width: 0 !important; padding: 15px !important; margin: 0 0 15px 0 !important; box-sizing: border-box !important; overflow: visible !important; }
    .relic-header { display: flex; align-items: center; flex-wrap: nowrap; width: 100%; }
    .relic-icon { width: 35px !important; height: 35px !important; margin-right: 10px; flex-shrink: 0; }
    .relic-name { font-size: 1rem !important; line-height: 1.2; word-break: break-word; }
    .skill-upgrade-container { display: flex !important; flex-direction: column !important; align-items: center !important; width: 100% !important; max-width: 100% !important; gap: 0 !important; margin: 15px 0 !important; padding: 10px !important; box-sizing: border-box !important; overflow: visible !important; }
    .skill-branches-wrapper { width: 100% !important; max-width: 100% !important; margin: 0 auto !important; padding: 0 !important; transform: scale(0.7) !important; transform-origin: center center !important; }
    .skill-branches-map { width: 180px !important; margin: 0 auto !important; }
    .skill-branches-info { width: 100% !important; max-width: 100% !important; margin-top: -30px !important; padding: 0 10px !important; box-sizing: border-box !important; }
    .skill-branches-info br { display: block; margin-top: 5px; }
    .introduction-row, .introduction-row.reverse { flex-direction: column !important; align-items: center !important; text-align: center !important; gap: 15px !important; width: 100% !important; max-width: 100% !important; margin-bottom: 30px !important; }
    .introduction-image { flex: 0 0 auto; width: 100% !important; max-width: 180px !important; height: auto !important; margin: 0 auto !important; padding: 0 !important; }
    .introduction-image img { scale: 0.8 !important; transform: scaleX(1) !important; width: 100% !important; height: auto !important; max-width: 100% !important; display: block !important; margin: 0 auto !important; }
    .introduction-row:hover .introduction-image img, .introduction-row.reverse:hover .introduction-image img { transform: scaleX(1) !important; }
    .introduction-info { width: 100% !important; max-width: 100% !important; }
    .introduction-title, .introduction-description { text-align: center !important; width: 100% !important; }
    .introduction-title { font-size: 1.2rem !important; margin-bottom: 10px !important; }
    .introduction-description { font-size: 0.9rem !important; line-height: 1.5 !important; }
    .town-section { width: 100% !important; max-width: 100% !important; padding: 0 !important; gap: 30px !important; }
    .building-row, .building-row:nth-child(even) { flex-direction: column !important; align-items: center !important; width: 100% !important; max-width: 100% !important; gap: 15px !important; }
    .building-image { flex: 0 0 auto; width: 100% !important; max-width: 250px !important; }
    .building-image img { width: 100% !important; height: auto !important; }
    .building-info { width: 100% !important; max-width: 100% !important; }
    .building-title { font-size: 1rem !important; text-align: center !important; }
    .building-description { font-size: 0.85rem !important; text-align: center !important; }
    .custom-tooltip { width: 180px !important; max-width: 75vw !important; white-space: normal; font-size: 0.65rem !important; }
    .skill-tags-pills { gap: 5px !important; justify-content: center !important; }
    .skill-tag-bubble { font-size: 0.65rem !important; padding: 3px 8px !important; }
    img { max-width: 100% !important; height: auto !important; }
    .md-typeset details.big { width: 100% !important; max-width: 100% !important; margin: 10px 0 !important; }
    .md-typeset details.big > summary { font-size: 1.4rem !important; padding: 8px 10px !important; }
    .md-typeset details.big > summary img { width: 30px !important; height: 30px !important; }
    .md-typeset details.big > :not(summary) { padding: 10px !important; }
    details.big .class-intro-wrapper { margin: 20px auto !important; padding: 0 !important; }
    details.big .class-description { padding: 0 5% !important; }
    details.big .class-stats-side { left: 0 !important; transform: scale(0.85) translateX(0) !important; }
    .md-typeset h1 { font-size: 1.6rem !important; }
    .md-typeset h2 { font-size: 1.3rem !important; }
    .md-typeset h3 { font-size: 1.1rem !important; }
    .filter-container, .custom-search-container { width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 15px 0 !important; }
    #relic-filter-input, #tag-search-input { width: 100% !important; box-sizing: border-box !important; }
}