/* Ranking Container */
.ranking-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Ranking Header */
.ranking-header {
    text-align: center;
    padding: 60px 20px;
    background: var(--gradient);
    color: var(--text-light);
    margin-bottom: 2rem;
}

.ranking-header h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.ranking-header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.ranking-description {
    color: #666;
    font-size: 1.1rem;
}

/* Filters */
.ranking-filters {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.filter-button {
    padding: 0.8rem 2rem;
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-button:hover {
    background: #357abd;
    transform: translateY(-1px);
}

/* Rewards Section */
.ranking-rewards {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.ranking-rewards h2 {
    text-align: center;
    color: #333;
    margin-bottom: 0.5rem;
}

.rewards-description {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.reward-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.reward-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reward-header i {
    font-size: 1.5rem;
}

.first-place {
    border: 2px solid #ffd700;
}

.first-place i {
    color: #ffd700;
}

.second-place {
    border: 2px solid #c0c0c0;
}

.second-place i {
    color: #c0c0c0;
}

.third-place {
    border: 2px solid #cd7f32;
}

.third-place i {
    color: #cd7f32;
}

.reward-info p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.reward-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a90e2;
    text-align: center;
}

/* Ranking Table */
.ranking-table {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

td {
    color: #555;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Pagination */
.ranking-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.pagination-button {
    padding: 0.8rem 1.5rem;
    background: #fff;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-button:hover {
    border-color: #4a90e2;
    color: #4a90e2;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ranking-header h1 {
        font-size: 2rem;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .filter-button {
        width: 100%;
        justify-content: center;
    }

    .rewards-grid {
        grid-template-columns: 1fr;
    }

    .ranking-table {
        margin: 0 -1rem;
        border-radius: 0;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ranking-container > * {
    animation: fadeIn 0.3s ease-out;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    image-rendering: pixelated;
}

.player-name {
    font-weight: 600;
    color: #333;
}

/* Player Profile Modal */
.player-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-modal.active {
    display: flex;
    opacity: 1;
}

.player-modal-content {
    background: #fff;
    width: 90%;
    max-width: 1000px;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    position: relative;
}

.player-modal.active .player-modal-content {
    transform: translateY(0);
}

.player-skin-viewer {
    flex: 0 0 400px;
    background: var(--gradient);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.skin-container {
    width: 300px;
    height: 400px;
    margin-bottom: 1rem;
}

.player-details {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.player-header img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
}

.player-header h2 {
    font-size: 2rem;
    color: #333;
    margin: 0;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.stat-card p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

.player-achievements {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.player-achievements h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.achievement {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.achievement i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.achievement p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 768px) {
    .player-modal-content {
        flex-direction: column;
    }

    .player-skin-viewer {
        flex: none;
        height: 300px;
    }

    .skin-container {
        width: 200px;
        height: 300px;
    }
} 