/* ARQUIVO: public/css/style_Ranking.css */
/* Página de Ranking Unificada - CAAC Arena Cataratas */

/* ============================================ */
/* FUNDO DINÂMICO */
/* ============================================ */

.ranking-body {
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.85)), 
                url('/public/img/fundo.jpg');
    background-size: cover;
    background-position: 50% center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

body.ranking-body.bg-street-focus {
    background-position: 15% center !important;
}

body.ranking-body.bg-offroad-focus {
    background-position: 85% center !important;
}

/* ============================================ */
/* CONTAINER E UTILITÁRIOS */
/* ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-tag {
    display: inline-block;
    background: rgba(255, 69, 0, 0.15);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-color, #ff4500);
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.section-tag.muted {
    background: rgba(255,255,255,0.05);
    color: #666;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #fff;
}

.section-header h2 span {
    color: var(--primary-color, #ff4500);
}

.section-header p {
    color: #aaa;
}

/* ============================================ */
/* HERO SECTION */
/* ============================================ */

.ranking-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
}

.ranking-hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 69, 0, 0.2);
    border: 1px solid var(--primary-color, #ff4500);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color, #ff4500);
    margin-bottom: 30px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #fff;
}

.hero-title-accent {
    background: linear-gradient(135deg, var(--primary-color, #ff4500), #ffaa00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1rem;
    color: #ccc;
    line-height: 1.6;
}

/* ============================================ */
/* TABS DO RANKING */
/* ============================================ */

.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid #444;
    border-radius: 40px;
    color: #ccc;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.tab-btn i {
    margin-right: 8px;
}

.tab-btn:hover {
    border-color: var(--primary-color, #ff4500);
    color: var(--primary-color, #ff4500);
}

.tab-btn.active {
    background: var(--primary-color, #ff4500);
    border-color: var(--primary-color, #ff4500);
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================ */
/* TABELA DE RANKING */
/* ============================================ */

.ranking-table {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 40px;
}

.ranking-header-row {
    display: grid;
    grid-template-columns: 70px 1fr 120px 100px 120px;
    background: rgba(0,0,0,0.5);
    padding: 15px 20px;
    color: #888;
    font-size: 0.8rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rank-row {
    display: grid;
    grid-template-columns: 70px 1fr 120px 100px 120px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
    transition: background 0.2s;
}

.rank-row:hover {
    background: rgba(255,255,255,0.05);
}

.rank-row.is-me {
    background: rgba(255,69,0,0.15);
    border-left: 3px solid var(--primary-color, #ff4500);
}

.rank-pos {
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-piloto {
    display: flex;
    align-items: center;
    gap: 12px;
}

.piloto-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color, #ff4500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
}

.piloto-info strong {
    color: #fff;
    font-size: 0.9rem;
}

.tribo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.tribo-badge.street {
    background: rgba(0, 188, 212, 0.15);
    border: 1px solid #00bcd4;
    color: #00bcd4;
}

.tribo-badge.offroad {
    background: rgba(255, 87, 34, 0.15);
    border: 1px solid #ff5722;
    color: #ff5722;
}

.rank-nivel {
    color: #ffaa00;
    font-weight: 600;
}

.rank-extra {
    color: #fff;
    font-weight: 600;
}

.rank-pontos {
    font-weight: 800;
    color: #fff;
}

.empty-ranking {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

/* ============================================ */
/* MINHA POSIÇÃO CARD */
/* ============================================ */

.minha-posicao-card {
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    border-radius: 20px;
    margin: 40px 0;
    border: 1px solid rgba(255,69,0,0.3);
    overflow: hidden;
}

.minha-posicao-header {
    background: rgba(255,69,0,0.15);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.minha-posicao-header i {
    font-size: 1.2rem;
    color: var(--primary-color, #ff4500);
}

.minha-posicao-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #fff;
}

.minha-posicao-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 25px;
}

.posicao-item {
    text-align: center;
}

.posicao-label {
    display: block;
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 8px;
}

.posicao-value {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.posicao-numero {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color, #ff4500);
}

.posicao-pontos {
    font-size: 0.8rem;
    color: #fff;
}

.minha-posicao-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

.btn-conquistas {
    display: inline-block;
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--primary-color, #ff4500);
    border-radius: 30px;
    color: var(--primary-color, #ff4500);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    transition: 0.2s;
}

.btn-conquistas:hover {
    background: var(--primary-color, #ff4500);
    color: #fff;
}

/* ============================================ */
/* PRÓXIMAS COMPETIÇÕES */
/* ============================================ */

.proximas-competicoes {
    padding: 60px 0 80px;
}

.competicoes-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

.competicao-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 18px 25px;
    transition: 0.2s;
}

.competicao-card:hover {
    background: rgba(30, 30, 30, 0.8);
    transform: translateX(5px);
}

.competicao-data {
    text-align: center;
    min-width: 60px;
}

.competicao-data .dia {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color, #ff4500);
    line-height: 1;
}

.competicao-data .mes {
    display: block;
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
}

.competicao-info {
    flex: 1;
}

.competicao-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.competicao-info p {
    font-size: 0.75rem;
    color: #aaa;
}

.competicao-pontos {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,69,0,0.15);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffaa00;
}

.btn-detalhes {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid #444;
    border-radius: 30px;
    color: #ccc;
    font-size: 0.7rem;
    text-decoration: none;
    transition: 0.2s;
}

.btn-detalhes:hover {
    border-color: var(--primary-color, #ff4500);
    color: var(--primary-color, #ff4500);
}

/* ============================================ */
/* RESPONSIVO */
/* ============================================ */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .ranking-tabs {
        gap: 8px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.7rem;
    }
    
    .ranking-header-row, .rank-row {
        grid-template-columns: 50px 1fr 100px 80px 90px;
        gap: 5px;
    }
    
    .rank-pos, .rank-pontos, .rank-nivel {
        font-size: 0.8rem;
    }
    
    .competicao-card {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    
    .minha-posicao-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .ranking-header-row, .rank-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }
    
    .rank-pos {
        justify-content: center;
    }
    
    .rank-piloto {
        justify-content: center;
    }
    
    .competicao-card {
        flex-direction: column;
    }
}