* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
    background-image: url('https://assets.albiononline.com/uploads/media/default/media/ec4e25426a95372524b022ac38744a4ba58317f2.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 30, 40, 0.78);
    z-index: 0;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: rgba(12, 12, 20, 0.96);
    backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.6);
}
.sidebar.open { transform: translateX(0); }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(74, 123, 255, 0.3); border-radius: 4px; }

.sidebar-header {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.sidebar-header .logo .logo-icon { font-size: 28px; color: #4a7bff; }
.sidebar-header .logo .logo-text {
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    letter-spacing: 0.5px;
}
.sidebar-header .logo .logo-sub {
    font-size: 13px;
    font-weight: 600;
    color: #4a7bff;
    letter-spacing: 3px;
}
.sidebar-close {
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
}
.sidebar-close:hover { color: #fff; background: rgba(255,255,255,0.05); }

.sidebar-divider { height: 1px; background: rgba(255,255,255,0.04); margin: 4px 20px; }
.sidebar-nav { flex: 1; padding: 12px; }
.sidebar-nav-bottom { flex: 0; padding-top: 0; }
.sidebar-nav .nav-item {
    display: flex; align-items: center; gap: 14px; padding: 12px 18px;
    color: #888; text-decoration: none; font-size: 14px; font-weight: 500;
    transition: 0.2s; border-radius: 8px; cursor: pointer; margin: 2px 0;
}
.sidebar-nav .nav-item .nav-icon { font-size: 16px; width: 24px; text-align: center; color: #555; }
.sidebar-nav .nav-item:hover { background: rgba(74,123,255,0.06); color: #fff; }
.sidebar-nav .nav-item:hover .nav-icon { color: #4a7bff; }
.sidebar-nav .nav-item.active { color: #4a7bff; background: rgba(74,123,255,0.08); }
.sidebar-nav .nav-item.active .nav-icon { color: #4a7bff; }

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #444;
}
.sidebar-footer .status { color: #66ff88; font-size: 10px; }

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

.main-content {
    margin-left: 0;
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 20px;
    min-height: 100vh;
}

.search-section {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(20,20,30,0.88);
    backdrop-filter: blur(12px);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.search-section .menu-toggle {
    display: block;
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
}
.search-section .menu-toggle:hover { color: #fff; background: rgba(255,255,255,0.05); }

.result {
    background: rgba(20,20,30,0.85);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.04);
    min-height: 200px;
}
.result .error { color: #ff6b6b; text-align: center; padding: 30px 0; }
.result .loading { text-align: center; padding: 30px 0; color: #888; }

/* ===== СТИЛИ ДЛЯ КОНТЕНТА ===== */
.events-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.events-column {
    background: rgba(16,16,24,0.5);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.04);
}
.events-column .col-title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.events-column .col-title.kills { color: #66ff88; }
.events-column .col-title.deaths { color: #ff6666; }

.death-list { display: flex; flex-direction: column; gap: 8px; }
.death-item {
    background: rgba(26,26,46,0.4);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.death-item:hover { border-color: #4a7bff; background: rgba(74,123,255,0.05); }
.death-item .info { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.death-item .info .time { color: #888; font-size: 12px; }
.death-item .info .details { color: #aaa; font-size: 12px; }
.death-item .arrow { color: #666; font-size: 16px; }

.fight-wrapper { display: flex; gap: 40px; justify-content: center; align-items: stretch; margin-top: 10px; flex-wrap: wrap; }
.player-column {
    background: rgba(16,16,24,0.5);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.04);
    display: flex;
    flex-direction: column;
    flex: 0 1 400px;
    min-width: 280px;
}
.player-column.killer { border-color: rgba(102,255,136,0.2); }
.player-column.victim { border-color: rgba(255,102,102,0.2); }
.player-column .header {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.player-column.killer .header { color: #66ff88; }
.player-column.victim .header { color: #ff6666; }
.player-column .subheader {
    text-align: center;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 6px;
}
.player-column .subheader .name { color: #4a7bff; font-weight: 600; font-size: 16px; cursor: pointer; }
.player-column .subheader .name:hover { text-decoration: underline; }
.player-column .subheader .guild { color: #888; }
.player-column .subheader .ip { font-size: 20px; color: #ddd; font-weight: bold; display: block; margin-top: 2px; }

.equip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}
.equip-slot {
    background: rgba(26,26,46,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 2px;
    text-align: center;
    aspect-ratio: 1/1;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.equip-slot:hover { border-color: #4a7bff; background: rgba(74,123,255,0.05); }
.equip-slot img { width: 100%; height: 85%; object-fit: contain; image-rendering: pixelated; display: block; }
.equip-slot .slot-name {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 7px;
    color: rgba(255,255,255,0.2);
    text-transform: uppercase;
    background: rgba(0,0,0,0.4);
    padding: 1px 5px;
    border-radius: 3px;
    z-index: 2;
}
.equip-slot .price-label { display: none; }
.equip-slot.empty {
    opacity: 0.1;
    border: 1px dashed rgba(255,255,255,0.06);
    background: transparent;
    min-height: auto;
    padding: 0;
    aspect-ratio: auto;
    cursor: default;
}
.equip-slot.empty:hover { border-color: rgba(255,255,255,0.06); background: transparent; }

.fight-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    min-width: 80px;
    font-size: 14px;
    color: #ccc;
    text-align: center;
    flex: 0 0 auto;
}
.fight-stats .stat-item {
    background: rgba(16,16,24,0.5);
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.04);
    width: 100%;
}
.fight-stats .stat-item .label { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.fight-stats .stat-item .value { font-size: 18px; font-weight: bold; color: #ffaa66; display: block; margin-top: 2px; }
.fight-stats .stat-item .value.fame { color: #ff6666; }
.fight-stats .stat-item .value.silver { color: #66ff88; }

.build-price {
    background: rgba(16,16,24,0.5);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 6px;
    padding: 6px 12px;
    margin-top: 8px;
    text-align: center;
    font-size: 13px;
}
.build-price .label { color: #888; }
.build-price .value { font-size: 18px; font-weight: bold; color: #66ff88; }

.inventory-section { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.04); }
.inventory-title { text-align: center; font-size: 14px; color: #ff6666; font-weight: 600; margin-bottom: 10px; letter-spacing: 0.5px; }
.inventory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    background: rgba(16,16,24,0.3);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.03);
    min-height: 40px;
}
.inventory-slot {
    background: rgba(26,26,46,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 2px;
    text-align: center;
    width: 64px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    flex: 0 0 auto;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.inventory-slot:hover { border-color: #4a7bff; background: rgba(74,123,255,0.05); }
.inventory-slot img { width: 100%; height: 85%; object-fit: contain; image-rendering: pixelated; }
.inventory-slot .price-label { display: none; }
.inventory-slot.empty-inv { border-color: transparent; background: transparent; width: 30px; height: 30px; cursor: default; }

.helpers-section { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.04); }
.helpers-title { text-align: center; font-size: 14px; color: #66ff88; font-weight: 600; margin-bottom: 10px; letter-spacing: 0.5px; }
.helpers-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(16,16,24,0.3);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.03);
}
.helper-card {
    background: rgba(26,26,46,0.4);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.2s;
    flex-wrap: wrap;
    cursor: pointer;
}
.helper-card:hover { border-color: #4a7bff; background: rgba(74,123,255,0.05); }
.helper-card .helper-info { display: flex; flex-direction: column; min-width: 100px; }
.helper-card .helper-name { font-size: 15px; color: #4a7bff; font-weight: 600; }
.helper-card .helper-ip { font-size: 12px; color: #888; }
.helper-card .helper-items { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.helper-card .helper-items .helper-item-wrap { position: relative; display: inline-block; cursor: pointer; transition: 0.15s; }
.helper-card .helper-items .helper-item-wrap:hover { transform: scale(1.05); }
.helper-card .helper-items img { width: 42px; height: 42px; object-fit: contain; image-rendering: pixelated; border: 1px solid rgba(255,255,255,0.06); border-radius: 4px; background: rgba(0,0,0,0.3); padding: 2px; transition: 0.15s; }
.helper-card .helper-items img:hover { border-color: #4a7bff; }
.helper-card .helper-items .helper-price { display: none; }

.item-tooltip {
    display: none;
    position: fixed;
    background: rgba(16,16,24,0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 13px;
    color: #eee;
    z-index: 1000;
    box-shadow: 0 8px 40px rgba(0,0,0,0.8);
    min-width: 180px;
    max-width: 280px;
    text-align: center;
    pointer-events: auto;
}
.item-tooltip .tooltip-close { position: absolute; top: 6px; right: 10px; background: none; border: none; color: #888; font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1; }
.item-tooltip .tooltip-close:hover { color: #fff; }
.item-tooltip .tooltip-slot { color: #888; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.item-tooltip .tooltip-name { color: #4a7bff; font-weight: 600; font-size: 15px; margin-bottom: 2px; padding-right: 20px; }
.item-tooltip .tooltip-quality { color: #ffaa66; font-size: 12px; margin-top: 2px; }
.item-tooltip .tooltip-enchant { color: #66aaff; font-size: 12px; margin-top: 2px; }
.item-tooltip .tooltip-price { color: #66ff88; font-size: 14px; margin-top: 4px; font-weight: bold; }
.item-tooltip .tooltip-type { color: #666; font-size: 9px; margin-top: 4px; word-break: break-all; }

.kill-info { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.04); display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #888; justify-content: center; }
.kill-info span { color: #aaa; }
.back-btn {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    color: #aaa;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}
.back-btn:hover { background: rgba(74,123,255,0.1); border-color: #4a7bff; color: #fff; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pagination button { padding: 6px 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06); border-radius: 6px; color: #aaa; cursor: pointer; transition: 0.2s; font-size: 13px; }
.pagination button:hover { background: rgba(74,123,255,0.1); border-color: #4a7bff; color: #fff; }
.pagination button.active { background: #4a7bff; border-color: #4a7bff; color: #fff; }

/* ===== СКРЫТИЕ МЕНЮ НА МОБИЛЬНЫХ ===== */
@media (min-width: 901px) {
    .sidebar { transform: translateX(0); width: 260px; }
    .main-content { margin-left: 260px; max-width: calc(100% - 260px); }
    .sidebar-close { display: none; }
    .sidebar-overlay { display: none !important; }
}
@media (max-width: 900px) {
    .sidebar { width: 300px; transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; max-width: 100%; }
    .sidebar-overlay.active { display: block; }
    .events-columns { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .fight-wrapper { flex-direction: column; align-items: center; gap: 20px; }
    .player-column { flex: 0 1 100%; max-width: 400px; min-width: 0; }
    .equip-slot { min-height: 70px; }
    .inventory-slot { width: 54px; height: 54px; }
    .helper-card .helper-items img { width: 34px; height: 34px; }
}
@media (max-width: 400px) {
    .equip-slot { min-height: 56px; }
    .player-column .header { font-size: 15px; }
    .player-column .subheader .ip { font-size: 18px; }
    .inventory-slot { width: 44px; height: 44px; }
    .item-tooltip { max-width: 200px; padding: 12px 14px; font-size: 11px; }
    .helper-card { padding: 8px 10px; gap: 10px; }
    .helper-card .helper-items img { width: 28px; height: 28px; }
}
