/* ============================================================
   ranking.css — Ranking dialog, items, positions, alliance ranking
   ============================================================ */

/* DIALOGO DE RANKING */
#ranking-dialog-overlay {
    background: transparent;
}

#ranking-dialog {
    margin: 0;
    min-width: 100px;
    max-width: 500px;
}


.ranking-loading {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.ranking-loading .war-loader {
    margin: 0 auto 15px;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 8px;
    padding: 10px 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(240, 192, 64, 0.4);
}

.ranking-item.current-user {
    background: rgba(240, 192, 64, 0.15);
    border-color: #f0c040;
}

.ranking-position {
    font-size: 18px;
    font-weight: bold;
    min-width: 35px;
    text-align: center;
}

.ranking-position.top1 {
    color: #ffd700;
    font-size: 22px;
}

.ranking-position.top2 {
    color: #c0c0c0;
    font-size: 20px;
}

.ranking-position.top3 {
    color: #cd7f32;
    font-size: 20px;
}

.ranking-avatar {
    font-size: 24px;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-name {
    font-size: 16px;
    font-weight: bold;
    color: #f0c040;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #aaa;
}

.ranking-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ranking-stat-value {
    color: #fff;
    font-weight: bold;
}

.ranking-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
}

/* Esconder elementos antigos */
#recruit-progress-container {
    display: none;
}

#recruit-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2d6e2d, #4a8a4a);
    border-radius: 3px;
    transition: width 0.5s;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
    animation: recruitPulse 1s ease-in-out infinite;
}

@keyframes recruitPulse {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
    }
    50% {
        filter: hue-rotate(60deg) brightness(1.2);
        box-shadow: 0 0 10px rgba(74, 138, 74, 0.8), 0 0 0 2px rgba(255, 255, 255, 0.6);
    }
}

.owned-badge {
    background: rgba(45, 110, 45, 0.3);
    border: 1px solid #4a8a4a;
    color: #7dc07d;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
    margin: 6px 0;
}

.warning-text {
    color: #c04040;
    font-size: 11px;
    margin: 4px 0;
}

.actions {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}

#notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 30, 0.95);
    border: 2px solid #f0c040;
    border-radius: 8px;
    padding: 15px 30px;
    color: #f0c040;
    font-size: 16px;
    font-weight: bold;
    z-index: 999999;
    display: none;
    transition: opacity 0.3s;
    text-align: center;
    pointer-events: none;
}

/* Ranking de aliancas */
.ranking-tabs {
    display: flex;
    gap: 3px;
    margin: 15px 0 0;
    border-bottom: 2px solid rgba(240, 192, 64, 0.2);
}

.ranking-tabs-secondary {
    margin: 4px 0 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ranking-tab {
    flex: 1;
    padding: 8px 4px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #888;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Almendra', serif;
    white-space: nowrap;
}

.ranking-tab:hover {
    color: #e0e0e0;
    background: rgba(240, 192, 64, 0.05);
}

.ranking-tab.active {
    color: #f0c040;
    border-bottom-color: #f0c040;
    font-weight: bold;
}

.ranking-tab-secondary {
    flex: 1;
    padding: 6px 4px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #666;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Almendra', serif;
    white-space: nowrap;
}

.ranking-tab-secondary:hover {
    color: #ccc;
    background: rgba(255,255,255,0.03);
}

.ranking-tab-secondary.active {
    color: #c0c0c0;
    border-bottom-color: #c0c0c0;
    font-weight: bold;
}

.alliance-ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(240, 192, 64, 0.05);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.alliance-ranking-item:hover {
    background: rgba(240, 192, 64, 0.1);
    border-color: rgba(240, 192, 64, 0.4);
}

.alliance-ranking-position {
    font-size: 20px;
    font-weight: bold;
    color: #f0c040;
    width: 30px;
    text-align: center;
}

.alliance-ranking-flag {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border: 2px solid rgba(240, 192, 64, 0.4);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px;
}

.alliance-ranking-info {
    flex: 1;
}

.alliance-ranking-name {
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
    margin-bottom: 2px;
}

.alliance-ranking-stats {
    font-size: 12px;
    color: #888;
}
