@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap');

body {
    background-color: #f5f7fa;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    color: #2c3e50;
    padding: 0;
}

.ranking-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
    padding: 30px;
    border: 1px solid #e1e8ed;
}

.ranking-header {
    background: transparent;
    color: #2c3e50;
    padding: 20px 0;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #3498db;
}

.ranking-header h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.ranking-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
    font-weight: 400;
}

.week-info {
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.countdown {
    color: #e74c3c;
    font-weight: 600;
    font-size: 1.2rem;
}

.search-box {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ranking-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    margin-bottom: 1rem;
}

.ranking-table .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 300px;
}

.ranking-table .table thead th {
    background: #95a5a6;
    color: white;
    border: none;
    font-weight: 600;
    padding: 18px 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-table .table thead th:first-child {
    border-top-left-radius: 12px;
}

.ranking-table .table thead th:last-child {
    border-top-right-radius: 12px;
}

.ranking-table .table tbody td {
    padding: 16px 15px;
    vertical-align: middle;
    border: none;
    background: #f8f9fa;
    font-size: 0.95rem;
    font-weight: 400;
    border-bottom: 1px solid #ecf0f1;
    text-align: left;
    white-space: nowrap;
}

.ranking-table .table tbody tr {
    background-color: #f8f9fa;
}

.ranking-table .table tbody tr:hover {
    background-color: #e9ecef;
    transition: background-color 0.2s ease;
}

.rank-position {
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center !important;
    min-width: 60px;
    vertical-align: middle;
}

.rank-position i {
    margin-right: 5px;
    font-size: 1rem;
}

/* Centrar todas las columnas numéricas */
.score-highlight,
.gp-diario-highlight,
.gp-semanal-highlight,
.ranking-table td:nth-child(3) {
    text-align: center !important;
}

.rank-1 { 
    color: #FFD700 !important;  /* Oro */
    font-size: 1.4rem;
    font-weight: bold;
}

.rank-2 { 
    color: #C0C0C0 !important;  /* Plata */
    font-size: 1.4rem;
    font-weight: bold;
}

.rank-3 { 
    color: #CD7F32 !important;  /* Bronce */
    font-size: 1.4rem;
    font-weight: bold;
}

.guild-badge {
    background: #3498db;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    /* text-transform: uppercase; Removed to show original clan name case */
    letter-spacing: 0.3px;
    display: inline-block;
}

.guild-badge:hover {
    background-color: #2980b9;
}

.gp-semanal-highlight {
    color: #27ae60 !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    min-width: 80px;
}

.gp-semanal-highlight::before {
    content: "+";
    color: #27ae60;
    font-weight: 700;
    margin-right: 2px;
}

.gp-semanal-highlight.has-value {
    background: transparent;
    color: #27ae60 !important;
    font-weight: 700;
}

.gp-semanal-highlight.has-value:hover {
    background-color: transparent;
}

/* Estilos específicos para GP Diario */
.gp-diario-highlight {
    color: #27ae60 !important;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    min-width: 80px;
}

.gp-diario-highlight::before {
    content: "+";
    color: #27ae60;
    font-weight: 700;
    margin-right: 2px;
}

/* Estilos para resaltar GP Mensual */
.gp-mensual-highlight {
    text-align: center !important;
    font-weight: bold;
    color: #27ae60;
}

.gp-mensual-highlight.has-value {
    background-color: transparent;
    border-radius: 4px;
}

.score-highlight {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
}

.player-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
}

.player-rank {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pagination {
    justify-content: center;
    margin-top: 25px;
}

.page-link {
    color: #3498db;
    border: 1px solid #bdc3c7;
    background: white;
    border-radius: 6px;
    margin: 0 2px;
    padding: 10px 15px;
    font-weight: 500;
}

.page-link:hover {
    color: white;
    background-color: #3498db;
    border-color: #3498db;
}

.page-item.active .page-link {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

.country-flag {
    width: 24px;
    height: 18px;
    margin-right: 6px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    vertical-align: middle;
}

.rank-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.btn-success {
    background-color: #27ae60;
    border-color: #27ae60;
    color: white;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
}

.btn-success:hover {
    background-color: #229954;
    border-color: #229954;
}

.btn-secondary {
    background-color: #95a5a6;
    border-color: #95a5a6;
    color: white;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    border-color: #7f8c8d;
}

.form-control {
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    padding: 10px 15px;
    font-weight: 400;
    background: white;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.25em;
}

.text-success {
    color: #27ae60 !important;
}

/* Efectos sutiles */
.table tbody tr {
    transition: background-color 0.2s ease;
}

@media (max-width: 768px) {
    .ranking-table {
        margin: 0;
        border-radius: 0;
        width: 100%;
        overflow-x: auto;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .player-info {
        min-width: 80px;
    }

    .table {
        min-width: 250px;
    }
    
    .ranking-container {
        margin: 10px 0;
        padding: 15px;
    }
    
    .ranking-header h1 {
        font-size: 1.8rem;
    }
}