/* ============================================
   RANKING STYLE - Versão Old School
   Copie este bloco inteiro para seu arquivo CSS
   ============================================ */

/* Ranking Geral---------------------------------------- */
.rankings-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
}

.ranking-block {
    width: 33%; /* Cada um ocupa ~1/3 da linha com espaço entre eles */
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-block:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.ranking-block h3 {
    font-size: 18px;
    margin-bottom: 14px;
    color: #007bff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 6px;
}

.ranking-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.ranking-row:hover {
    background: rgba(0,123,255,0.1);
}

.rank-number {
    width: 15px;
    font-weight: bold;
    color: #555;
    text-align: center;
}

/* Cores especiais para os 3 primeiros colocados */
.ranking-row:nth-child(2) .rank-number { color: #ffd700; font-size: 16px; } /* 1º */
.ranking-row:nth-child(3) .rank-number { color: #c0c0c0; font-size: 15px; } /* 2º */
.ranking-row:nth-child(4) .rank-number { color: #cd7f32; font-size: 14px; } /* 3º */

.rank-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #ffd700;
    box-shadow: 0 0 6px rgba(0,0,0,0.3);
    margin: 0 10px;
    object-fit: cover;
}

.rank-name {
    flex-grow: 1;
    font-weight: 600;
    font-size: 11px;
    color: #222;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

.rank-name a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

.rank-name a:hover {
    color: #007bff;
    text-shadow: 0 0 5px rgba(0,123,255,0.5);
    cursor: pointer;
}

.rank-resets {
    width: 40px;
    font-size: 10px;
    font-weight: bold;
    color: #444;
    text-align: center;
}

/* Medalhas */
.medal {
    width: 35px;
    height: 30px;
    margin: 2px auto 0 auto;
    background-size: contain;
    background-repeat: no-repeat;
}

.medal-gold {
    background-image: url('https://imgur.com/0lJ9SOs.png');
}

.medal-silver {
    background-image: url('https://imgur.com/MPjYi0V.png');
}

.medal-bronze {
    background-image: url('https://imgur.com/T2aKCwI.png');
}

/* ============================================
   RANKING GUILD - ESTILO HORIZONTAL (CARDS)
   ============================================ */

/* Container principal da guild horizontal */
.rankr-guild-horizontal {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.rankr-guild-horizontal h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #007bff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Container flexível para os cards */
.guild-cards-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: unset;
}

/* Cada card de guild */
.guild-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    padding: 15px;
    width: 135px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e7ff;
}

.guild-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,123,255,0.2);
    border-color: #007bff;
}

/* Posição da guild (1º, 2º, 3º...) */
.guild-position {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 10px;
}

.guild-position small {
    font-size: 12px;
    color: #999;
}

/* Avatar da guild */
.guild-avatar {
    margin: 10px auto;
}

.guild-avatar img {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 3px solid #ffd700;
    padding: 3px;
    background: #fff;
    transition: transform 0.3s;
}

.guild-avatar img:hover {
    transform: scale(1.1);
    border-color: #007bff;
}

/* Nome da guild */
.guild-name {
    margin: 10px 0;
    font-weight: bold;
    font-size: 14px;
}

.guild-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.guild-name a:hover {
    color: #007bff;
    text-decoration: underline;
}

/* Score da guild */
.guild-score {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

/* ============================================
   ESTILOS ANTIGOS DA GUILD (TABELA) - MANTIDO PARA COMPATIBILIDADE
   ============================================ */

.ranking-guild {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.ranking-guild caption {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    padding: 8px;
    text-transform: uppercase;
    border-bottom: 1px solid #ddd;
}

.ranking-guild td {
    padding: 6px;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: 13px;
}

.ranking-guild tr:last-child td {
    border-bottom: none;
}

.ranking-guild td img {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
    background: #fff;
    transition: transform 0.2s, border-color 0.2s;
    max-width: 95px;
    height: auto;
}

.ranking-guild td img:hover {
    transform: scale(1.05);
    border-color: #999;
}

.ranking-guild td a {
    text-decoration: none;
    color: inherit;
    pointer-events: auto;
}

.ranking-guild td a:hover {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   CLASSES ADICIONAIS
   ============================================ */

/* Container principal do ranking */
#rankss {
    height: auto;
    width: auto;
    margin-bottom: 5px;
    overflow: auto;
}

.rankr {
    height: auto;
    width: auto;
    float: left;
    margin-right: 5px;
    margin-top: 20px;
    text-align: center;
}

/* Mensagem quando não tem dados */
.no-ranking {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .rankings-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .ranking-block {
        width: 90%;
        margin-bottom: 20px;
    }
    
    .ranking-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .rank-name {
        font-size: 11px;
        white-space: normal;
    }
    
    .rank-avatar img {
        width: 35px;
        height: 35px;
    }
    
    /* Responsividade para os cards da guild */
    .guild-cards-container {
        gap: 15px;
    }
    
    .guild-card {
        width: 150px;
        padding: 10px;
    }
    
    .guild-avatar img {
        width: 50px;
        height: 50px;
    }
    
    .guild-position {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .ranking-block h3 {
        font-size: 14px;
    }
    
    .rank-number {
        width: 25px;
        font-size: 12px;
    }
    
    .rank-resets {
        width: 35px;
        font-size: 9px;
    }
    
    .medal {
        width: 25px;
        height: 22px;
    }
    
    /* Responsividade para os cards da guild em mobile */
    .guild-cards-container {
        flex-direction: column;
        align-items: center;
    }
    
    .guild-card {
        width: 90%;
        max-width: 250px;
    }
}

