/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: #0a0a0a;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-top: 2px solid #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header Section */
.rank-header {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    overflow: hidden;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 130% 80%, rgba(255,255,255,0.7), transparent);
    background-size: 300px 200px;
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

.header-content {
    text-align: center;
    z-index: 2;
}

.rank-title {
    font-size: 3.2rem;
    font-weight: 300;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gradient-text {
    background: linear-gradient(120deg, #00ffff 0%, #0080ff 50%, #00ffff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-flow 3s ease-in-out infinite;
}

@keyframes gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.rank-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 1s forwards;
}

/* Search Section */
.search-section {
    padding: 80px 0;
    background: #0a0a0a;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 40px;
    position: relative;
    backdrop-filter: blur(10px);
}

.card-glow {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    border-radius: 12px;
    z-index: -1;
    animation: glow-rotate 8s linear infinite;
}

@keyframes glow-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.search-icon {
    font-size: 1.5rem;
}

.search-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
}

.search-input-group {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #00ffff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    padding: 16px 32px;
    background: #00ffff;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.search-btn:hover {
    background: #00e6e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.25);
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.filter-select {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #00ffff;
    background: rgba(255, 255, 255, 0.08);
}

.filter-select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* Statistics Overview */
.stats-overview {
    padding: 80px 0;
    background: linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: #00ffff;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* Podium Section */
.podium-section {
    padding: 80px 0;
    background: #0a0a0a;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.4rem;
    font-weight: 300;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.podium-player {
    position: relative;
    text-align: center;
    transition: transform 0.3s ease;
}

.podium-player:hover {
    transform: translateY(-8px);
}

.first-place {
    order: 2;
    z-index: 3;
}

.second-place {
    order: 1;
    z-index: 2;
}

.third-place {
    order: 3;
    z-index: 1;
}

.crown {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

.podium-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    padding: 32px 24px;
    width: 280px;
    backdrop-filter: blur(15px);
    position: relative;
}

.first-place .podium-card {
    border-color: rgba(255, 215, 0, 0.4);
    background: rgba(255, 215, 0, 0.05);
}

.second-place .podium-card {
    border-color: rgba(192, 192, 192, 0.4);
    background: rgba(192, 192, 192, 0.05);
}

.third-place .podium-card {
    border-color: rgba(205, 127, 50, 0.4);
    background: rgba(205, 127, 50, 0.05);
}

.player-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(0, 255, 255, 0.3);
    position: relative;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.player-rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 16px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 20px;
}

.rank-icon {
    width: 20px;
    height: 20px;
}

.rank-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #00ffff;
}

.player-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #00ffff;
}

.podium-rank {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #00ffff;
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.first-place .podium-rank {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000000;
}

.second-place .podium-rank {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000000;
}

.third-place .podium-rank {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: #000000;
}

/* Rankings Section */
.rankings-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #111111 0%, #0a0a0a 100%);
}

.rankings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.rankings-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.pagination-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.table-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.table-wrapper {
    overflow-x: auto;
}

.rankings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.rankings-table th {
    background: rgba(0, 255, 255, 0.05);
    padding: 20px 16px;
    text-align: left;
    font-weight: 600;
    color: #00ffff;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.rankings-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
}

.rankings-table th.sortable:hover {
    background: rgba(0, 255, 255, 0.1);
}

.rankings-table th.sortable.active {
    background: rgba(0, 255, 255, 0.15);
}

.sort-icon {
    margin-left: 8px;
    font-size: 0.8rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.sortable:hover .sort-icon,
.sortable.active .sort-icon {
    opacity: 1;
}

.rankings-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.rankings-table tbody tr {
    transition: all 0.3s ease;
}

.rankings-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.rank-cell {
    font-weight: 600;
    color: #00ffff;
    font-size: 1.1rem;
}

.rank-cell.top-rank {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0, 255, 255, 0.2);
    flex-shrink: 0;
}

.player-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-nickname {
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.player-nickname:hover {
    color: #00ffff;
}

.rank-tier-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-tier-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.rank-tier-name {
    font-weight: 500;
    color: #00ffff;
}

.exp-cell {
    font-weight: 600;
    color: #ffffff;
}

.winrate-cell {
    position: relative;
}

.winrate-bar {
    width: 100px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.winrate-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ffaa00, #00ff44);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.winrate-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.match-history-btn {
    padding: 8px 16px;
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.match-history-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Loading and Empty States */
.table-loading,
.table-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.table-loading p,
.table-empty p {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 16px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.table-empty h3 {
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Pagination */
.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.pagination-btn:hover:not(.disabled) {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
    color: #00ffff;
}

.pagination-btn.active {
    background: #00ffff;
    color: #000000;
    border-color: #00ffff;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-dots {
    padding: 10px 8px;
    color: rgba(255, 255, 255, 0.5);
}

/* Match History Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 32px;
    max-height: 60vh;
    overflow-y: auto;
}

.match-stats-summary {
    margin-bottom: 32px;
}

.summary-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #00ffff;
}

.summary-value.wins {
    color: #00ff44;
}

.summary-value.losses {
    color: #ff4444;
}

.match-history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.match-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.match-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 255, 255, 0.2);
}

.match-result {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.result-badge.win {
    background: rgba(0, 255, 68, 0.2);
    color: #00ff44;
    border: 1px solid rgba(0, 255, 68, 0.3);
}

.result-badge.loss {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.match-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.match-mode {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
}

.match-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.match-stats {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
}

.match-stat {
    color: rgba(255, 255, 255, 0.7);
}

.modal-actions {
    padding: 24px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

.btn-secondary {
    padding: 12px 24px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #00ffff;
    color: #00ffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .podium-container {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    
    .podium-player {
        order: unset !important;
    }
    
    .first-place {
        order: -1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .rank-title {
        font-size: 2.4rem;
    }
    
    .search-card {
        padding: 24px;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
        .search-filters {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px 16px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .podium-card {
        width: 100%;
        max-width: 300px;
    }
    
    .rankings-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .rankings-table {
        font-size: 0.85rem;
    }
    
    .rankings-table th,
    .rankings-table td {
        padding: 12px 8px;
    }
    
    .player-cell {
        gap: 8px;
    }
    
    .player-avatar-small {
        width: 32px;
        height: 32px;
    }
    
    .winrate-bar {
        width: 80px;
    }
    
    .match-history-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-actions {
        padding: 20px;
    }
    
    .summary-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 16px;
    }
    
    .match-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .match-stats {
        align-self: stretch;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .rank-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .search-section,
    .stats-overview,
    .podium-section,
    .rankings-section {
        padding: 60px 0;
    }
    
    .rankings-table th:nth-child(3),
    .rankings-table td:nth-child(3) {
        display: none;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 36px;
    }
    
    .summary-card {
        grid-template-columns: 1fr;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
*:focus {
    outline: 2px solid #00ffff;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
a:focus {
    outline: 2px solid #00ffff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .search-card,
    .stat-card,
    .podium-card,
    .table-card {
        border-color: #ffffff;
    }
    
    .gradient-text {
        -webkit-text-fill-color: #00ffff;
        background: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .stars,
    .card-glow,
    .crown {
        animation: none;
    }
}

/* Print styles */
@media print {
    .search-section,
    .modal-overlay,
    .pagination-container {
        display: none;
    }
    
    .rankings-table {
        border: 1px solid #000;
    }
    
    .rankings-table th,
    .rankings-table td {
        border: 1px solid #000;
        color: #000;
    }
    
    body {
        background: #fff;
        color: #000;
    }
}



