/* ============================================
   Ranking, PvP e Clans Styles
   Compatible CSS for Public Pages
   ============================================ */

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Ranking Container */
.ranking-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 16px 32px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

.filter-btn.active {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Info Card */
.info-card {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.18) 0%, rgba(0, 153, 204, 0.12) 100%);
    border-radius: 20px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
    animation: fadeInUp 0.6s ease-out;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.5);
}

.info-card-icon {
    font-size: 3rem;
    color: var(--highlight-color);
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.5));
    animation: pulse 3s ease-in-out infinite;
}

.info-card-content {
    flex: 1;
}

.info-card-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-card-value {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 900;
}

/* Table Styles */
.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.ranking-table thead {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 153, 204, 0.15) 100%);
}

.ranking-table th {
    padding: 1.25rem;
    text-align: left;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.ranking-table th:first-child {
    border-top-left-radius: 16px;
}

.ranking-table th:last-child {
    border-top-right-radius: 16px;
}

.ranking-table tbody tr {
    transition: all 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ranking-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
}

.ranking-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 16px;
}

.ranking-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 16px;
}

.ranking-table td {
    padding: 1.25rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Position Badge */
.position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-weight: 900;
    font-size: 1rem;
    transition: all 0.3s;
}

.position-badge.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    box-shadow: 0 6px 20px rgba(255, 170, 0, 0.5);
}

.position-badge.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #000;
    box-shadow: 0 6px 20px rgba(192, 192, 192, 0.5);
}

.position-badge.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
    color: #000;
    box-shadow: 0 6px 20px rgba(205, 127, 50, 0.5);
}

.position-badge.normal {
    background: rgba(0, 212, 255, 0.2);
    color: white;
}

.position-badge:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Crown Icon */
.crown-icon {
    color: #ffd700;
    font-size: 1.4rem;
    filter: drop-shadow(0 0 10px rgba(255, 170, 0, 0.5));
    animation: pulse 2s ease-in-out infinite;
}

.crown-icon.silver {
    color: #c0c0c0;
}

.crown-icon.bronze {
    color: #cd7f32;
}

/* Class Badge */
.class-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid;
    transition: all 0.3s;
}

.class-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

/* Online Status */
.online-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    border: 2px solid;
    transition: all 0.3s;
}

.online-status.online {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success-color);
    border-color: rgba(0, 255, 136, 0.3);
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.online-status.offline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.1);
}

.online-status i {
    font-size: 0.7rem;
}

/* K/D Ratio Badge */
.kd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    color: var(--text-primary);
    font-weight: 900;
    font-size: 1.1rem;
    border: 2px solid;
    transition: all 0.3s;
}

.kd-badge.excellent {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--success-color);
}

.kd-badge.good {
    background: rgba(255, 170, 0, 0.15);
    border-color: rgba(255, 170, 0, 0.3);
    color: var(--warning-color);
}

.kd-badge.poor {
    background: rgba(255, 51, 102, 0.15);
    border-color: rgba(255, 51, 102, 0.3);
    color: var(--danger-color);
}

.kd-badge:hover {
    transform: scale(1.05);
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 2px solid rgba(0, 212, 255, 0.2);
    animation: fadeInUp 0.6s ease-out;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 14px 24px;
    transition: all 0.3s;
    border-radius: 10px;
}

.pagination-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

.pagination-number {
    padding: 14px 20px;
    min-width: 50px;
    transition: all 0.3s;
    border-radius: 10px;
}

.pagination-number:hover {
    transform: scale(1.1);
}

.pagination-number.active {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.pagination-info {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.search-input-group {
    flex: 1;
    min-width: 350px;
}

.search-input-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input-group input:focus {
    outline: none;
    border-color: var(--highlight-color);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.search-buttons {
    display: flex;
    gap: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem;
    animation: fadeInUp 0.6s ease-out;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state-title {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.8rem;
    font-weight: 800;
}

.empty-state-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 212, 255, 0.3);
    border-top-color: var(--highlight-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .info-card {
        flex-direction: column;
        text-align: center;
    }
    
    .ranking-table {
        font-size: 0.9rem;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 0.75rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-input-group {
        min-width: 100%;
    }
    
    .search-buttons {
        width: 100%;
    }
    
    .search-buttons .btn {
        flex: 1;
    }
}

/* Print Styles */
@media print {
    .filter-buttons,
    .pagination,
    .search-form {
        display: none;
    }
    
    .ranking-table {
        break-inside: avoid;
    }
}

