/* Wyszukiwanie postaci — styl Reborn System (podświetlenia, glow) */
@keyframes char-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 140, 0, 0.45), inset 0 0 10px rgba(255, 60, 0, 0.12); }
    50% { box-shadow: 0 0 20px rgba(255, 200, 50, 0.85), inset 0 0 16px rgba(255, 120, 0, 0.28); }
}
@keyframes char-shine {
    0% { background-position: -120% 0; }
    100% { background-position: 220% 0; }
}
@keyframes char-outfit-pulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 180, 50, 0.6)); }
    50% { filter: drop-shadow(0 0 14px rgba(255, 220, 100, 0.95)); }
}

.char-page {
    color: #ffcc66;
    font-size: 12px;
    padding: 4px 0 8px;
    overflow: visible;
}

.char-page__title {
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    color: #ffcc66;
    margin: 0 0 14px 0;
    padding: 8px 0;
    text-shadow: 0 0 10px #ff6600, 0 0 4px #000;
    letter-spacing: 1px;
}

.char-glow-panel {
    margin-bottom: 14px;
    padding: 0;
    border: 2px solid #c45a00;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a0a00 0%, #3d1800 45%, #1a0500 100%);
    animation: char-glow 2.2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.char-glow-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 220, 120, 0.18) 50%, transparent 65%);
    background-size: 200% 100%;
    animation: char-shine 3.5s linear infinite;
    pointer-events: none;
}

.char-glow-panel__head {
    position: relative;
    z-index: 1;
    margin: 0;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    color: #ffcc66;
    text-shadow: 0 0 8px #ff6600;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(196, 90, 0, 0.5);
    letter-spacing: 0.5px;
}

.char-glow-panel__body {
    position: relative;
    z-index: 1;
    padding: 10px 12px 12px;
}

.char-hero {
    display: flex;
    gap: 14px;
    align-items: center;
}

.char-outfit-showcase {
    flex: 0 0 100px;
    text-align: center;
}

.char-outfit-ring {
    width: 96px;
    height: 110px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 60%, rgba(255, 120, 0, 0.25) 0%, rgba(20, 8, 0, 0.9) 70%);
    border: 2px solid #ff8800;
    border-radius: 8px;
    box-shadow: 0 0 16px rgba(255, 140, 0, 0.5), inset 0 0 12px rgba(255, 80, 0, 0.2);
}

.char-outfit-ring img {
    image-rendering: pixelated;
    width: 80px;
    height: 96px;
    animation: char-outfit-pulse 2s ease-in-out infinite;
}

.char-outfit-lvl {
    margin-top: 6px;
    font-size: 11px;
    color: #ffaa44;
    font-weight: bold;
}

.char-info-table {
    flex: 1;
    min-width: 0;
}

.char-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(196, 90, 0, 0.25);
    gap: 8px;
}

.char-row:last-child { border-bottom: none; }

.char-row__label {
    color: #c9a070;
    font-weight: bold;
}

.char-row__val {
    color: #ffe8a8;
    text-align: right;
}

.char-row__val--green { color: #7fff7f; font-weight: bold; text-shadow: 0 0 6px rgba(100, 255, 100, 0.4); }
.char-row__val--red { color: #ff8866; font-weight: bold; }
.char-row__val--blue { color: #88ccff; font-weight: bold; }

.char-stats-split {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 0;
    position: relative;
    z-index: 1;
}

.char-stats-left {
    border-right: 1px solid rgba(196, 90, 0, 0.35);
}

.char-stats-right {
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
}

.char-stats-right__title {
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    color: #ffcc66;
    margin-bottom: 8px;
    text-shadow: 0 0 6px #ff6600;
}

.char-stats-right__level {
    text-align: center;
    margin-bottom: 10px;
    padding: 6px;
    border: 1px solid rgba(255, 180, 50, 0.4);
    border-radius: 6px;
    background: rgba(255, 100, 0, 0.1);
}

.char-stats-right__level-label {
    font-size: 10px;
    color: #c9a070;
}

.char-stats-right__level-val {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px #ff8800;
}

.char-reborn-mini {
    margin-bottom: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    text-align: center;
    font-size: 11px;
}

.char-reborn-mini--dmg {
    background: rgba(180, 30, 0, 0.45);
    border: 1px solid #ff4422;
    color: #ff9988;
}

.char-reborn-mini--def {
    background: rgba(20, 60, 120, 0.45);
    border: 1px solid #44aaff;
    color: #99ddff;
}

.char-reborn-mini__count {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    line-height: 1.2;
}

.char-reborn-mini__bonus {
    color: #7fff7f;
    font-size: 10px;
}

.char-reborn-mini--exp {
    background: rgba(120, 40, 0, 0.45);
    border: 1px solid #ff6622;
    color: #ffaa88;
}

.char-reborn-mini__count--loss {
    color: #ff6644;
    text-shadow: 0 0 8px rgba(255, 80, 0, 0.65);
}

.char-reborn-mini__bonus--loss {
    color: #ff8866;
}

.char-bar-block {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(196, 90, 0, 0.2);
}

.char-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    font-size: 11px;
    color: #c9a070;
}

.char-bar-label span:last-child {
    color: #ffe8a8;
    font-weight: bold;
}

.char-bar {
    height: 14px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid #8a4a00;
    border-radius: 3px;
    overflow: hidden;
}

.char-bar__fill { height: 100%; }
.char-bar__fill--hp { background: linear-gradient(180deg, #ff4444, #aa1111); box-shadow: 0 0 6px rgba(255, 0, 0, 0.5); }
.char-bar__fill--mana { background: linear-gradient(180deg, #4488ff, #1133aa); box-shadow: 0 0 6px rgba(0, 100, 255, 0.5); }
.char-bar__fill--exp { background: linear-gradient(180deg, #44cc44, #117711); box-shadow: 0 0 6px rgba(0, 255, 0, 0.4); }
.char-bar__fill--exp-loss {
    background: linear-gradient(180deg, #ff6644, #aa2200);
    box-shadow: 0 0 6px rgba(255, 80, 0, 0.55);
}

.char-bar-block--exp-loss .char-bar-label__loss {
    color: #ff6644;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255, 80, 0, 0.5);
}

.char-bar-pct {
    font-size: 10px;
    color: #a08050;
    margin-top: 2px;
}

.char-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
    overflow: visible;
}

@media (max-width: 560px) {
    .char-stats-split { grid-template-columns: 1fr; }
    .char-stats-left { border-right: none; border-bottom: 1px solid rgba(196, 90, 0, 0.35); }
    .char-grid-2 { grid-template-columns: 1fr; }
    .char-hero { flex-direction: column; text-align: center; }
    .char-eq-overlay__card { padding: 10px 12px; }
    .char-eq-overlay__title { font-size: 12px; }
}

.char-panel--eq.char-glow-panel {
    overflow: hidden;
    z-index: 1;
}

.char-panel--eq.char-glow-panel:has(.char-eq-slot--item:hover),
.char-panel--eq.char-glow-panel:has(.char-eq-slot--item:focus-within) {
    z-index: 12;
}

@keyframes char-eq-card-in {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes char-eq-glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 120, 0, 0.45), 0 0 50px rgba(255, 60, 0, 0.2), inset 0 0 18px rgba(255, 140, 0, 0.1); }
    50% { box-shadow: 0 0 30px rgba(255, 180, 50, 0.7), 0 0 70px rgba(255, 100, 0, 0.35), inset 0 0 24px rgba(255, 160, 0, 0.18); }
}

.char-eq-body {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 6px 6px;
}

.char-eq-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.char-eq-slot {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid #8a4a00;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.char-eq-slot img {
    max-width: 32px;
    max-height: 32px;
    image-rendering: pixelated;
}

.char-eq-slot--item {
    position: static;
}

.char-eq-slot--item:hover,
.char-eq-slot--item:focus-within {
    z-index: 50;
}

.char-eq-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    cursor: help;
    outline: none;
}

.char-eq-thumb__img {
    display: block;
    max-width: 32px;
    max-height: 32px;
    padding: 2px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #8a4a00;
    border-radius: 4px;
    image-rendering: pixelated;
    box-shadow: 0 0 6px rgba(255, 120, 0, 0.25);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.char-eq-slot--item:hover .char-eq-thumb__img,
.char-eq-slot--item:focus-within .char-eq-thumb__img {
    border-color: #ffcc44;
    box-shadow: 0 0 14px rgba(255, 180, 0, 0.65);
    transform: scale(1.08);
}

.char-eq-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.char-eq-slot--item:hover .char-eq-overlay,
.char-eq-slot--item:focus-within .char-eq-overlay {
    opacity: 1;
    visibility: visible;
}

.char-eq-overlay__shade {
    position: absolute;
    inset: 0;
    background: rgba(4, 2, 0, 0.78);
    backdrop-filter: blur(1px);
}

.char-eq-overlay__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 290px;
    max-height: 100%;
    overflow-y: auto;
    padding: 14px 16px 12px;
    border: 2px solid #ff8800;
    border-radius: 10px;
    background: linear-gradient(155deg, rgba(45, 20, 0, 0.97) 0%, rgba(12, 5, 0, 0.99) 100%);
    animation: char-eq-card-in 0.22s ease-out, char-eq-glow-pulse 2.4s ease-in-out infinite;
    text-align: center;
}

.char-eq-overlay__card::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 200, 100, 0.25);
    border-radius: 7px;
    pointer-events: none;
}

.char-eq-overlay__icon-wrap {
    display: block;
    margin: 0 auto 10px;
    width: 52px;
    height: 52px;
    padding: 4px;
    border: 2px solid #ffaa44;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 18px rgba(255, 160, 0, 0.55);
}

.char-eq-overlay__icon {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.char-eq-overlay__title {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #ffdd66;
    text-shadow: 0 0 12px rgba(255, 150, 0, 0.85), 0 1px 2px #000;
    letter-spacing: 0.3px;
}

.char-eq-overlay__comment {
    display: block;
    margin-bottom: 10px;
    padding: 6px 8px;
    border-left: 3px solid #c45a00;
    background: rgba(0, 0, 0, 0.4);
    color: #ffe8b8;
    font-size: 11px;
    font-style: italic;
    text-align: left;
}

.char-eq-overlay__bonuses,
.char-eq-overlay__meta {
    display: block;
    text-align: left;
}

.char-eq-overlay__bonuses {
    margin-bottom: 6px;
}

.char-eq-overlay__line--bonus {
    display: block;
    padding: 5px 8px;
    margin: 4px 0;
    font-size: 11px;
    font-weight: bold;
    color: #90ffaa;
    background: linear-gradient(90deg, rgba(0, 90, 40, 0.45) 0%, rgba(0, 40, 20, 0.2) 100%);
    border-radius: 4px;
    border-left: 3px solid #44ff88;
    text-shadow: 0 0 10px rgba(0, 255, 120, 0.45);
}

.char-eq-overlay__line--malus {
    color: #ff9999;
    background: linear-gradient(90deg, rgba(90, 0, 0, 0.45) 0%, rgba(40, 0, 0, 0.2) 100%);
    border-left-color: #ff5555;
    text-shadow: 0 0 10px rgba(255, 80, 80, 0.45);
}

.char-eq-overlay__line--meta {
    display: block;
    padding: 2px 0;
    font-size: 10px;
    color: #c9a070;
    border-bottom: 1px solid rgba(196, 90, 0, 0.12);
}

.char-eq-overlay__line--meta:last-child {
    border-bottom: none;
}

.char-eq-overlay__empty {
    display: block;
    font-size: 10px;
    font-style: italic;
    color: #8a6848;
}

.char-panel--eq .char-glow-panel__body {
    padding: 10px 12px 12px;
}

.char-skills-list { padding: 4px 0; }

.char-skill-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(196, 90, 0, 0.2);
    font-size: 11px;
}

.char-skill-row__name { color: #c9a070; }
.char-skill-row__val { color: #ffe8a8; font-weight: bold; }

.char-achieve-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.char-achieve-grid img { width: 40px; height: 40px; }

.char-panel--quests {
    overflow: visible;
}

.char-panel--quests .char-glow-panel__body {
    overflow: visible;
}

.char-quest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(196, 90, 0, 0.2);
    font-size: 11px;
}

.char-quest-row__label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.char-quest-row__name {
    color: #c9a070;
    min-width: 0;
}

.char-quest-thumb {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.char-quest-thumb__img {
    display: block;
    width: 24px;
    height: 24px;
    padding: 2px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #8a4a00;
    border-radius: 4px;
    image-rendering: pixelated;
    box-shadow: 0 0 6px rgba(255, 120, 0, 0.25);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.char-quest-thumb:hover .char-quest-thumb__img,
.char-quest-thumb:focus .char-quest-thumb__img {
    border-color: #ffaa44;
    box-shadow: 0 0 10px rgba(255, 160, 0, 0.45);
}

.char-quest-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    min-width: 160px;
    max-width: 260px;
    padding: 8px 10px;
    background: linear-gradient(135deg, #120800 0%, #2a1200 50%, #0d0500 100%);
    border: 1px solid #8a4a00;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), 0 0 12px rgba(255, 100, 0, 0.2);
    color: #e8c890;
    font-size: 10px;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 30;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.char-quest-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #8a4a00;
}

.char-quest-thumb:hover .char-quest-tooltip,
.char-quest-thumb:focus .char-quest-tooltip,
.char-quest-thumb:focus-within .char-quest-tooltip {
    opacity: 1;
    visibility: visible;
}

.char-quest-tooltip__title {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: bold;
    color: #ffcc66;
    text-shadow: 0 0 6px rgba(255, 120, 0, 0.4);
}

.char-quest-tooltip__comment {
    display: block;
    margin-bottom: 6px;
    padding: 4px 6px;
    border-left: 2px solid #c45a00;
    background: rgba(0, 0, 0, 0.35);
    color: #ffe8a8;
    font-style: italic;
}

.char-quest-tooltip__attrs {
    display: block;
}

.char-quest-tooltip__line {
    display: block;
    padding: 1px 0;
    color: #c9a070;
    border-bottom: 1px solid rgba(196, 90, 0, 0.15);
}

.char-quest-tooltip__line:last-child {
    border-bottom: none;
}

.char-quest-done { color: #7fff7f; font-weight: bold; flex-shrink: 0; }
.char-quest-no { color: #ff6666; font-weight: bold; flex-shrink: 0; }

.char-death-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(196, 90, 0, 0.2);
    font-size: 11px;
    color: #c9a070;
}

.char-death-row__time {
    flex: 0 0 auto;
    min-width: 128px;
    font-weight: bold;
    color: #ffcc66;
    white-space: nowrap;
}

.char-death-row__info {
    flex: 1 1 160px;
    color: #c9a070;
}

.char-death-killer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

.char-death-killer a {
    color: #ffcc66;
    text-decoration: none;
    font-weight: bold;
}

.char-death-killer a:hover {
    color: #ffe8a8;
    text-decoration: underline;
}

.char-death-killer--player {
    cursor: help;
}

.char-death-killer--mob {
    cursor: help;
}

.char-death-killer__icon {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    vertical-align: middle;
    background: transparent;
    border: none;
}

/* Tooltip śmierci — bez ramki i tła, sama miniatura + nazwa */
#tt:has(.char-death-tip) {
    background: none !important;
    box-shadow: none !important;
}

#tt:has(.char-death-tip) #tttop,
#tt:has(.char-death-tip) #ttbot {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
}

#tt:has(.char-death-tip) #ttcont {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.char-death-tip {
    text-align: center;
    background: transparent;
}

.char-death-tip__img {
    display: block;
    margin: 0 auto 4px;
    image-rendering: pixelated;
    background: transparent;
    border: none;
}

.char-death-tip__name {
    display: block;
    font-weight: bold;
    font-size: 12px;
    color: #ffcc66;
    text-shadow: 0 1px 2px #000, 0 0 6px #000;
}

.char-search-form {
    margin-top: 16px;
    text-align: center;
    padding: 14px;
    border: 2px solid #c45a00;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a0a00 0%, #3d1800 100%);
    animation: char-glow 2.5s ease-in-out infinite;
}

.char-search-form .char-search-info {
    color: #c9a070;
    font-size: 11px;
    margin-bottom: 10px;
}

/* Reborn showcase (bez zmian wizualnych) */
@keyframes reborn-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 140, 0, 0.5), inset 0 0 12px rgba(255, 60, 0, 0.15); }
    50% { box-shadow: 0 0 22px rgba(255, 200, 50, 0.95), inset 0 0 20px rgba(255, 120, 0, 0.35); }
}
@keyframes reborn-shine {
    0% { background-position: -120% 0; }
    100% { background-position: 220% 0; }
}
.reborn-showcase {
    margin: 0 0 14px 0;
    padding: 12px 14px;
    border: 2px solid #c45a00;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a0a00 0%, #3d1800 45%, #1a0500 100%);
    animation: reborn-glow 2.2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}
.reborn-showcase::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 220, 120, 0.22) 50%, transparent 65%);
    background-size: 200% 100%;
    animation: reborn-shine 3.5s linear infinite;
    pointer-events: none;
}
.reborn-showcase__title {
    position: relative;
    z-index: 1;
    margin: 0 0 10px 0;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    color: #ffcc66;
    text-shadow: 0 0 10px #ff6600, 0 0 4px #000;
    letter-spacing: 1px;
}
.reborn-showcase__row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.reborn-badge {
    flex: 1 1 200px;
    max-width: 320px;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
}
.reborn-badge--dmg {
    background: rgba(180, 30, 0, 0.55);
    border: 1px solid #ff4422;
    color: #ff9988;
}
.reborn-badge--def {
    background: rgba(20, 60, 120, 0.55);
    border: 1px solid #44aaff;
    color: #99ddff;
}
.reborn-badge--exp {
    background: rgba(120, 40, 0, 0.55);
    border: 1px solid #ff6622;
    color: #ffaa88;
}
.reborn-badge__val { font-size: 18px; color: #fff; }
.reborn-badge__val--loss {
    color: #ff6644;
    text-shadow: 0 0 10px rgba(255, 80, 0, 0.7);
}
.reborn-badge__pct { color: #7fff7f; font-size: 13px; }
.reborn-badge__pct--loss { color: #ff8866; }
.reborn-showcase__hint {
    position: relative;
    z-index: 1;
    margin-top: 10px;
    text-align: center;
    font-size: 11px;
    color: #c9a070;
}
.reborn-showcase__hint a { color: #ffaa44; font-weight: bold; }
