/* ===== HERO ===== */
.ladder-hero {
    padding: 0 20px 24px;
    text-align: center;
    margin-bottom: 0;
}
.ladder-hero-inner { max-width: 700px; margin: 0 auto; }
.ladder-hero-inner h1 { margin-top: 0; }
.ladder-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    padding-top: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.ladder-hero-sub {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    margin: 0 0 24px;
}

/* Переключатель групп */
.ladder-group-switch {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}
.ladder-group-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 24px;
    border-radius: 6px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.15s;
}
.ladder-group-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.ladder-group-btn.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: var(--accent, #c8a84b);
}
.ladder-group-btn img { border-radius: 3px; border: 1px solid rgba(255,255,255,0.15); }

/* Подкатегории */
.ladder-sub-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}
.ladder-sub-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.15s;
}
.ladder-sub-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.ladder-sub-btn.active {
    color: var(--accent, #c8a84b);
    border-color: var(--accent, #c8a84b);
    font-weight: 600;
}
.ladder-sub-btn img { border-radius: 3px; border: 1px solid rgba(255,255,255,0.15); }

/* ===== FILTER BAR ===== */
.ladder-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
input.ladder-search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    outline: none;
    backdrop-filter: blur(4px);
    transition: border-color 0.15s, background 0.15s;
    box-shadow: none !important;
}
input.ladder-search-input::placeholder { color: rgba(255,255,255,0.35); }
input.ladder-search-input:focus {
    border-color: rgba(255,255,255,0.3) !important;
    background: rgba(255,255,255,0.09) !important;
    box-shadow: none !important;
}
.ladder-class-select {
    width: auto;
    min-width: 160px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    backdrop-filter: blur(4px);
    transition: border-color 0.15s, background 0.15s;
}
.ladder-class-select:focus { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.09); }
.ladder-class-select option { background: #1a1a2e; color: #fff; }
.ladder-btn-find {
    padding: 12px 24px;
    background: #22c55e;
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.ladder-btn-find:hover { background: #16a34a; }
.ladder-btn-reset {
    padding: 12px 24px;
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s;
}
.ladder-btn-reset:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* ===== TABLE ===== */
.ladder-table-wrap {
    background: linear-gradient(135deg, rgba(20,20,60,0.95) 0%, rgba(10,10,40,0.95) 100%);
    border-radius: 8px;
    border: 2px solid rgba(120,140,255,0.6);
    overflow: hidden;
}
.ladder-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.ladder-table thead tr {
    background: linear-gradient(135deg, rgba(20,20,60,0.95) 0%, rgba(10,10,40,0.95) 100%);
    border-bottom: 2px solid rgba(120,140,255,0.4);
}
.ladder-table thead th {
    padding: 12px 14px;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: left;
}
.ladder-table tbody tr {
    border-bottom: 1px solid rgba(120,140,255,0.2);
    transition: background 0.2s ease;
}
.ladder-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.03); }
.ladder-table tbody tr:hover { background: rgba(255,255,255,0.06); }
.ladder-table tbody tr:nth-child(even):hover { background: rgba(255,255,255,0.08); }
.ladder-table tbody tr:last-child { border-bottom: none; }
.ladder-table td {
    padding: 7px 14px;
    vertical-align: middle;
    line-height: 1;
}

/* Columns */
.col-rank   { width: 50px; }
.col-realm  { width: 70px; }
.col-level  { width: 80px; }
.col-char, .col-class, .col-faction { width: 160px; }
.col-kills, .col-honor, .col-season, .col-rating, .col-winpct,
.col-achieve, .col-quests, .col-time { width: 110px; }

/* Rank numbers */
.rank-num { font-weight: 700; color: rgba(255,255,255,0.4); }
.rank-1 { color: #fbbf24; font-size: 16px; }
.rank-2 { color: #94a3b8; font-size: 15px; }
.rank-3 { color: #d97706; font-size: 15px; }

/* Character name */
.char-name { font-weight: 600; }

/* Class */
.class-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.class-icon { border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); flex-shrink: 0; }

/* Faction */
.faction-cell { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.faction-icon { border-radius: 50%; flex-shrink: 0; object-fit: cover; width: 20px; height: 20px; }
.faction-alliance { color: #3b82f6; }
.faction-alliance .faction-icon { border: 2px solid #3b82f6; }
.faction-horde { color: #ef4444; }
.faction-horde .faction-icon { border: 2px solid #ef4444; }

/* Stats */
.stat-value { font-weight: 700; color: #fff; }
.season-wins { color: #22c55e; }
.season-loss { color: #ef4444; }
.winpct-high { color: #4ade80; font-weight: 600; }

/* WoW Class Colors */
.class-warrior    { color: #C79C6E; }
.class-paladin    { color: #F58CBA; }
.class-hunter     { color: #ABD473; }
.class-rogue      { color: #FFF569; }
.class-priest     { color: #FFFFFF; }
.class-deathknight{ color: #C41F3B; }
.class-shaman     { color: #0070DE; }
.class-mage       { color: #69CCF0; }
.class-warlock    { color: #9482C9; }
.class-druid      { color: #FF7D0A; }

/* Currency */
.currency-wrap { display: inline-flex; align-items: center; gap: 3px; flex-wrap: nowrap; }
.currency-val { font-weight: 700; color: #fff; font-size: 13px; }
.currency-icon { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }

/* Guild */
.guild-name-cell { font-weight: 700; color: #e2c97e; font-size: 14px; }
.col-guild-name { width: 160px; }
.col-members { width: 100px; }

/* Realm badge */
.realm-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
}
.realm-x5 { background: #1e2d4a; color: #7aaade; }
.realm-x1 { background: #3a2010; color: #de9a5a; }

/* Finder widget */
.ladder-finder {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(112,208,232,0.12);
    border-radius: 6px;
}
.ladder-finder-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.finder-label {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    white-space: nowrap;
}
.finder-result {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 5px;
    font-size: 13px;
    flex-wrap: wrap;
}
.finder-result-found {
    background: rgba(255,215,0,0.06);
    border: 1px solid rgba(255,215,0,0.2);
}
.finder-result-miss {
    background: rgba(255,80,80,0.06);
    border: 1px solid rgba(255,80,80,0.2);
    color: rgba(255,255,255,0.6);
}
.finder-rank {
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    white-space: nowrap;
}
.finder-name {
    font-weight: 700;
    font-size: 14px;
}
.finder-stat {
    color: rgba(255,255,255,0.7);
}
.finder-total {
    margin-left: auto;
    color: rgba(255,255,255,0.35);
    font-size: 12px;
}

/* Race icon in char cell */
.race-icon-sm {
    vertical-align: middle;
    margin-right: 4px;
    border-radius: 50%;
    object-fit: cover;
}

/* Custom finder select */
.finder-custom-select {
    position: relative;
    min-width: 220px;
}
.finder-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(112,208,232,0.2);
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    transition: border-color 0.2s;
}
.finder-trigger:hover { border-color: rgba(112,208,232,0.45); }
.finder-custom-select.open .finder-trigger { border-color: rgba(112,208,232,0.6); }
.fi-arrow { margin-left: auto; color: rgba(255,255,255,0.4); font-size: 11px; }
.fi-race, .fi-class, .fi-faction { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.finder-option img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fi-name { font-weight: 600; }

.finder-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 240px;
    background: #0d1b2e;
    border: 1px solid rgba(112,208,232,0.25);
    border-radius: 5px;
    z-index: 200;
    max-height: 260px;
    overflow-y: auto;
}
.finder-custom-select.open .finder-options { display: block; }

.finder-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}
.finder-option:hover { background: rgba(255,255,255,0.06); }
.finder-option.active { background: rgba(112,208,232,0.08); }

/* Extra row — found character */
.finder-extra-row td {
    border-top: 2px solid rgba(255,215,0,0.25);
}
.finder-extra-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255,215,0,0.04);
    flex-wrap: wrap;
    font-size: 13px;
}
.finder-extra-rank {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
    white-space: nowrap;
}
.finder-extra-total {
    margin-left: auto;
    color: rgba(255,255,255,0.3);
    font-size: 12px;
}

/* Finder result — plain text */
.finder-result-text {
    margin-top: 10px;
    padding: 8px 4px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}
.finder-result-text strong {
    color: #ffd700;
    font-size: 15px;
}
