/* vote-top.css - Стили для страницы топ голосующих */

/* Стили для строк топ-3 */
.top-rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
}

.top-rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05));
}

.top-rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05));
}

/* Стили для имен игроков на пьедестале */
.top-rank-name-1 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.top-rank-name-2 {
    color: #c0c0c0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.top-rank-name-3 {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

/* Бейдж игрока */
.player-badge {
    display: inline-block;
    font-size: 15px;
    font-weight: 500;
    padding: 4px 10px;
    margin: 3px;
}

/* Медали */
.rank-medal {
    vertical-align: middle;
}

/* Строка с незанятым местом */
.empty-rank-row {
    opacity: 0.5;
}

.empty-rank-cell {
    text-align: center;
}

/* Статистика за месяц */
.monthly-stats-card {
    margin-bottom: 12px;
}

/* Карточка с инструкцией */
.how-to-top-card {
    margin-top: 12px;
}

.how-to-top-card .document-list {
    margin-top: 6px;
}

.how-to-top-card .admin-nav-footer {
    margin-top: 10px;
}

/* Пустое состояние */
.empty-state-card .info-main-text {
    margin-top: 6px;
}

.empty-state-card .admin-nav-footer {
    margin-top: 10px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .player-badge {
        font-size: 13px;
        padding: 3px 8px;
        margin: 2px;
    }

    .premium-table th,
    .premium-table td {
        font-size: 13px;
        padding: 8px 4px;
    }
}

/* ===== TOOLTIPS ===== */
.vl-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(160,176,255,0.12);
    border: 1px solid rgba(160,176,255,0.25);
    cursor: help;
    font-size: 10px;
    font-weight: 700;
    color: rgba(160,176,255,0.7);
    vertical-align: middle;
    margin-left: 6px;
    flex-shrink: 0;
}
.vl-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a3e;
    border: 1px solid rgba(120,140,255,0.4);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    white-space: normal;
    width: 220px;
    line-height: 1.5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 100;
    text-transform: none;
    letter-spacing: 0;
}
.vl-tip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a3e;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 101;
}
.vl-tip:hover::after,
.vl-tip:hover::before { opacity: 1; }

.rank-node-tip { position: relative; cursor: default; }
.rank-node-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a3e;
    border: 1px solid rgba(120,140,255,0.4);
    border-radius: 6px;
    padding: 9px 13px;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    white-space: normal;
    width: 200px;
    line-height: 1.5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 100;
}
.rank-node-tip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a3e;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 101;
}
.rank-node-tip:hover::after,
.rank-node-tip:hover::before { opacity: 1; }

.rank-node-tip-last::after { left: auto; right: 0; transform: none; }
.rank-node-tip-last::before { left: auto; right: 12px; transform: none; }

.vl-tip-right::after { left: auto; right: 0; transform: none; }
.vl-tip-right::before { left: auto; right: 6px; transform: none; }

.vl-tip-down::after { bottom: auto; top: calc(100% + 8px); }
.vl-tip-down::before {
    bottom: auto;
    top: calc(100% + 3px);
    border-top-color: transparent;
    border-bottom-color: #1a1a3e;
}

/* ===== TABLE ===== */
.ladder-table-wrap { position: relative; z-index: 10; }
.ladder-table tfoot td { padding: 0; }
.ladder-page .admin-nav-footer { margin-top: 16px; }

/* ===== STATS BAR ===== */
.vt-stats { display: flex; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.vt-stat {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(120,140,255,0.2);
    border-radius: 8px;
    padding: 16px 24px;
    flex: 1;
    min-width: 160px;
    text-align: center;
}
.vt-stat__val { font-size: 28px; font-weight: 800; color: #fff; }
.vt-stat__val--md { font-size: 22px; font-variant-numeric: tabular-nums; }
.vt-stat__label { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 4px; }

/* ===== VOTE BUTTON ===== */
.vt-hidden { display: none; }
.vt-stat--vote { justify-content: center; }
.ladder-vote-btn-wrap { margin-top: 20px; }
.ladder-vote-btn {
    display: inline-block;
    padding: 11px 36px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    font-size: 15px;
    font-weight: 800;
    border-radius: 8px;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(255,215,0,0.35);
    transition: box-shadow 0.2s;
}
.ladder-vote-btn:hover { box-shadow: 0 6px 28px rgba(255,215,0,0.55); }

/* ===== LOYALTY BLOCK ===== */
.vl-block {
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(20,20,60,0.95) 0%, rgba(10,10,40,0.95) 100%);
    border: 1px solid rgba(120,140,255,0.3);
    border-radius: 8px;
    padding: 24px 28px;
    position: relative;
    z-index: 0;
}
.vl-block-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}
.vl-grid { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 0; }
.vl-col-left { padding-right: 36px; }
.vl-col-right { padding-left: 36px; display: flex; flex-direction: column; }
.vl-col-divider { background: linear-gradient(to bottom, transparent, rgba(120,140,255,0.25), transparent); }
.vl-col-label {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}
.vl-nodes { display: flex; align-items: center; padding-top: 22px; }
.vl-node-wrap { display: flex; flex-direction: column; align-items: center; position: relative; width: 28px; flex-shrink: 0; overflow: visible; }
.vl-node {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vl-node--current { width: 28px; height: 28px; }
.vl-node-counter { height: 18px; display: flex; align-items: flex-end; }
.vl-node-text { font-size: 11px; font-weight: 700; }
.vl-node-text--current { font-size: 11px; }
.vl-mult-counter { font-size: 10px; color: rgba(160,176,255,0.35); white-space: nowrap; }
.vl-mult-counter--current { color: rgba(160,176,255,0.9); }
.vl-node-above {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    line-height: 1;
}
.vl-rank-label { font-size: 11px; white-space: nowrap; }
.vl-rank-bonus { font-size: 11px; margin-left: 2px; }
.vl-seg {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.07);
    border-radius: 2px;
    overflow: visible;
    margin-bottom: 18px;
    margin-left: 4px;
    margin-right: 4px;
    min-width: 12px;
    position: relative;
}
.vl-seg-fill { height: 100%; transition: width 0.4s; overflow: hidden; border-radius: 2px; }
.vl-seg-fill--mult { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.vl-seg-amount {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
}
.vl-status { margin-top: 28px; margin-left: -14px; font-size: 12px; color: rgba(255,255,255,0.3); align-self: flex-start; }
.vl-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.12); }

/* ===== TABLE CELLS ===== */
.vt-player { font-weight: 700; }
.vt-mult {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(129,140,248,0.3);
    font-size: 12px;
    font-weight: 700;
    color: #a0b0ff;
}
.vt-rank-name { font-size: 13px; font-weight: 600; }
.vt-empty { color: rgba(255,255,255,0.2); font-size: 12px; }
.vt-bonus { font-size: 13px; font-weight: 700; }
.vt-bonus-icon { vertical-align: middle; margin-left: 2px; }
.vt-last-vote { color: rgba(255,255,255,0.55); font-size: 13px; }

/* ===== INFO ROW (howto + rules) ===== */
.vt-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}
.vt-info-col {
    display: flex;
    flex-direction: column;
}
.vt-info-col .vt-howto,
.vt-info-col .vt-rules {
    flex: 1;
}
@media (max-width: 680px) {
    .vt-info-row { grid-template-columns: 1fr; }
}

/* ≤900px — лояльность в одну колонку */
@media (max-width: 900px) {
    .vl-grid { grid-template-columns: 1fr; }
    .vl-col-divider { display: none; }
    .vl-col-left { padding-right: 0; padding-bottom: 24px; border-bottom: 1px solid rgba(120,140,255,0.15); }
    .vl-col-right { padding-left: 0; padding-top: 24px; }
    /* Скрываем tooltips — на тач-экранах не работают и создают горизонтальный overflow */
    .vl-tip::after, .vl-tip::before,
    .rank-node-tip::after, .rank-node-tip::before { display: none; }
}

/* ≤680px — ладдер: скрыть Монет получено и Последний голос */
@media (max-width: 680px) {
    .col-coins, .col-last { display: none; }
    .vl-block { padding: 20px 18px; }
}

/* ≤480px — мобиль */
@media (max-width: 480px) {
    /* Ладдер: скрыть Множитель/Ранг и Бонус */
    .col-mult-rank, .col-bonus { display: none; }

    /* Прогресс-бары */
    .vl-block { padding: 16px 14px; }
    .vl-nodes { padding-top: 18px; }
    .vl-node { width: 20px; height: 20px; }
    .vl-node--current { width: 20px; height: 20px; }
    .vl-node-above { font-size: 8px; }
    .vl-rank-label, .vl-rank-bonus { font-size: 9px; white-space: normal; }
    .vl-node-text { font-size: 9px; }
    .vl-mult-counter { font-size: 9px; white-space: normal; }
    .vl-seg { margin-bottom: 16px; margin-left: 3px; margin-right: 3px; }
    .vl-seg-amount { font-size: 9px; }
    .vl-node-counter { height: 16px; overflow: hidden; }
    .vl-status { font-size: 11px; }
}

/* ===== HOWTO BLOCK ===== */
.vt-howto {
    margin-top: 24px;
    background: linear-gradient(135deg, rgba(20,20,60,0.95) 0%, rgba(10,10,40,0.95) 100%);
    border: 1px solid rgba(120,140,255,0.3);
    border-radius: 8px;
    padding: 24px 28px;
}
.vt-howto-title {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.vt-howto-steps { display: flex; flex-direction: column; gap: 12px; }
.vt-howto-step { display: flex; align-items: center; gap: 14px; }
.vt-howto-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(120,140,255,0.15);
    border: 1px solid rgba(120,140,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #a0b0ff;
    flex-shrink: 0;
}
.vt-howto-text { font-size: 14px; color: rgba(255,255,255,0.7); }
.vt-howto-note {
    margin-top: 6px;
    margin-bottom: -10px;
    padding: 10px 14px;
    background: rgba(251,191,36,0.06);
    border-left: 3px solid #fbbf24;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #fbbf24;
    font-weight: 600;
}
.vt-howto { margin-top: 0; }
.vt-howto-note--info {
    background: rgba(112,208,232,0.06);
    border-left-color: #70d0e8;
    color: rgba(112,208,232,0.8);
}

/* ===== RULES BLOCK ===== */
.vt-rules {
    background: linear-gradient(135deg, rgba(20,20,60,0.95) 0%, rgba(10,10,40,0.95) 100%);
    border: 1px solid rgba(120,140,255,0.3);
    border-radius: 8px;
    padding: 24px 28px;
}
.vt-rules-title {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.vt-rules-list { display: flex; flex-direction: column; gap: 14px; }
.vt-rule-item {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
}
.vt-rule-n {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(248,113,113,0.12);
    border: 1px solid rgba(248,113,113,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #f87171;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Таймер кулдауна голосования */
.vote-timer-label {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 10px;
}
.vote-countdown {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #a0b0ff;
    font-variant-numeric: tabular-nums;
}
.vote-timer-hint {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

.vote-action-block {
    text-align: center;
    margin-bottom: 28px;
}
.vote-btn-hidden {
    display: none;
}

.col-coins,
.col-last {
    white-space: nowrap;
}
