.tier-player-card:hover .player-avatar,
.tier-player-card:hover .player-info {
    transform: translateX(41px);
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #141824;
    --bg-tertiary: #1a1f2e;
    --bg-card: #1e2333;
    --bg-hover: #252b3d;

    --border-color: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.1);

    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --region-na: #dc2626;
    --region-eu: #eab308;
    --region-as: #16a34a;

    --tier-ht1: #fbbf24;
    --tier-lt1: #f59e0b;
    --tier-ht2: #a855f7;
    --tier-lt2: #9333ea;
    --tier-ht3: #f97316;
    --tier-lt3: #ea580c;
    --tier-ht4: #8b5cf6;
    --tier-lt4: #7c3aed;
    --tier-ht5: #06b6d4;
    --tier-lt5: #0891b2;

    --rank-1: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --rank-2: linear-gradient(135deg, #d4d4d8 0%, #a1a1aa 100%);
    --rank-3: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
        "Ubuntu", "Cantarell", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header */
.header {
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.25rem;
    white-space: nowrap;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.logo-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    opacity: 1;
}

.dropdown-arrow {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-left: 0.25rem;
}

/* Search */
.search-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-left: auto;
    min-width: 280px;
    transition: all 0.2s ease;
}

.search-container:focus-within {
    border-color: var(--border-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    width: 18px;
    height: 18px;
    opacity: 0.5;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Game Mode Tabs */
.game-modes {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-hover) transparent;
}

.game-modes::-webkit-scrollbar {
    height: 6px;
}

.game-modes::-webkit-scrollbar-track {
    background: transparent;
}

.game-modes::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 3px;
}

.mode-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mode-tab:hover {
    color: var(--text-secondary);
}

.mode-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.mode-icon {
    width: 32px;
    height: 32px;
}

/* Info Bar */
.info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.info-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.info-button:hover {
    background: var(--bg-hover);
}

.info-icon {
    font-size: 1rem;
}

.server-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.server-badge {
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.server-ip {
    color: var(--text-secondary);
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
}

.copy-btn,
.discord-link {
    padding: 0.4rem 0.9rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-height: 36px;
}

.copy-btn:hover,
.discord-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

.discord-logo {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 10px;
    transition: opacity 0.2s ease;
    display: block;
}

.discord-link:hover .discord-logo {
    opacity: 0.85;
}

/* Rankings Table */
.rankings-table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.rankings-table {
    width: 100%;
    border-collapse: collapse;
}

.rankings-table thead {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.rankings-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.col-rank {
    width: 100px;
}

.col-player {
    width: auto;
}

.col-region {
    width: 120px;
    text-align: center;
}

th.col-region {
    padding-left: 2rem !important;
}

.col-tiers {
    width: 500px;
    text-align: right;
    padding-right: 1.5rem;
}

th.col-tiers {
    padding-left: 16rem !important;
}

.rankings-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.rankings-table tbody tr:hover {
    background: var(--bg-hover);
    transform: translateX(8px) scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rankings-table td {
    padding: 1rem 1.5rem;
}

/* Rank Cell */
.rank-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rank-number {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: 900;
    color: #000;
    overflow: hidden;
    border-radius: 6px;
}

.rank-number::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    transform: skewX(-15deg);
    transform-origin: top left;
}

.rank-number.rank-1::before {
    background: var(--rank-1);
}

.rank-number.rank-2::before {
    background: var(--rank-2);
}

.rank-number.rank-3::before {
    background: var(--rank-3);
}

.rank-number span {
    position: relative;
    z-index: 1;
}

/* Player Cell */
.player-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    object-fit: cover;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.player-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.player-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rank-badge-icon {
    width: 14px;
    height: 14px;
}

.rank-badge-text {
    font-weight: 500;
}

.rank-points {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Region Cell */
.region-badge {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.region-badge.na {
    background: rgba(220, 38, 38, 0.15);
    color: var(--region-na);
}

.region-badge.eu {
    background: rgba(234, 179, 8, 0.15);
    color: var(--region-eu);
}

.region-badge.as {
    background: rgba(22, 163, 74, 0.15);
    color: var(--region-as);
}

/* Tiers Cell */
.tiers-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding-right: 1rem;
}

.tier-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    position: relative;
}

/* Tooltip for tier badges */
.tier-tooltip {
    position: absolute;
    bottom: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #1a1f2e;
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1000;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}

.tier-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #1a1f2e;
}

.tier-tooltip-tier {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.tier-tooltip-info {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    text-align: center;
}

.tier-badge.has-tier:hover .tier-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tier-badge-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tier-badge-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tier-badge-label {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 40px;
    text-align: center;
    display: block;
    line-height: 1.2;
}

.tier-badge-label.ht1 {
    background: var(--tier-ht1);
    color: #000;
}

.tier-badge-label.lt1 {
    background: var(--tier-lt1);
    color: #000;
}

.tier-badge-label.ht2 {
    background: var(--tier-ht2);
    color: #fff;
}

.tier-badge-label.lt2 {
    background: var(--tier-lt2);
    color: #fff;
}

.tier-badge-label.ht3 {
    background: var(--tier-ht3);
    color: #fff;
}

.tier-badge-label.lt3 {
    background: var(--tier-lt3);
    color: #fff;
}

.tier-badge-label.ht4 {
    background: var(--tier-ht4);
    color: #fff;
}

.tier-badge-label.lt4 {
    background: var(--tier-lt4);
    color: #fff;
}

.tier-badge-label.ht5 {
    background: var(--tier-ht5);
    color: #fff;
}

.tier-badge-label.lt5 {
    background: var(--tier-lt5);
    color: #fff;
}

.tier-badge-label.empty {
    background: transparent;
    color: var(--text-muted);
    opacity: 0.5;
}

.tier-badge-label:not(.empty) {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* Profile Header */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 4px solid var(--bg-hover);
    margin-bottom: 1rem;
}

.profile-name {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.profile-rank {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.rank-icon {
    width: 20px;
    height: 20px;
}

.profile-region {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.profile-spacer {
    height: 2.5rem;
}

/* Profile Position */
.profile-position {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.position-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.position-value {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.position-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}

.position-trophy {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.position-overall {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.position-points {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Profile Tiers */
.profile-tiers {
    padding: 1.5rem;
}

.tiers-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.tiers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.tier-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    aspect-ratio: 1;
}

.tier-item.empty {
    opacity: 0.3;
}

.tier-item-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
}

.tier-item-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.tier-item-label.ht1,
.tier-item-label.lt1 {
    color: var(--tier-ht1);
}

.tier-item-label.ht2,
.tier-item-label.lt2 {
    color: var(--tier-ht2);
}

.tier-item-label.ht3,
.tier-item-label.lt3 {
    color: var(--tier-ht3);
}

.tier-item-label.ht4,
.tier-item-label.lt4 {
    color: var(--tier-ht4);
}

.tier-item-label.ht5,
.tier-item-label.lt5 {
    color: var(--tier-ht5);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Tier Cards View (for specific game modes) */
.tier-cards-container {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 0.85rem;
    align-items: start;
    width: 100%;
}

.tier-card-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    width: 100%;
    position: relative;
}

.tier-card-section::after {
    content: none;
}

.tier-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    min-height: 58px;
    margin: 0;
    border: none;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
}

.tier-card-header img {
    display: block;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Tier 1 - Gold */
.tier-card-section[data-tier="1"] .tier-card-header {
    background: linear-gradient(135deg, #8B7355 0%, #6B5D48 100%);
    color: #FFD700;
}
.tier-card-section[data-tier="1"]::after { background: transparent; }

/* Tier 2 - Silver */
.tier-card-section[data-tier="2"] .tier-card-header {
    background: linear-gradient(135deg, #4A5568 0%, #2D3748 100%);
    color: #E2E8F0;
}
.tier-card-section[data-tier="2"]::after { background: transparent; }

/* Tier 3 - Bronze */
.tier-card-section[data-tier="3"] .tier-card-header {
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    color: #F4A460;
}
.tier-card-section[data-tier="3"]::after { background: transparent; }

/* Tier 4 - Dark Blue/Purple */
.tier-card-section[data-tier="4"] .tier-card-header {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
    color: #9CA3AF;
}
.tier-card-section[data-tier="4"]::after { background: transparent; }

/* Tier 5 - Dark Blue/Purple */
.tier-card-section[data-tier="5"] .tier-card-header {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
    color: #9CA3AF;
}
.tier-card-section[data-tier="5"]::after { background: transparent; }

.tier-card-header-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.tier-card-header-text {
    font-weight: 700;
    font-size: 1.15rem;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.tier-players-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: #1b2030;
}

.tier-player-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    background: #1b2030;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tier-player-card::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    bottom: -1px;
    width: 5px;
    background: rgba(255,255,255,0.06);
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tier-player-card:first-child::before { border-top-left-radius: 12px; }
.tier-player-card:last-child::before { border-bottom-left-radius: 12px; }

/* Region-colored left rail */
.tier-player-card.region-na::before { background: var(--region-na); }
.tier-player-card.region-eu::before { background: var(--region-eu); }
.tier-player-card.region-as::before { background: var(--region-as); }

.tier-player-card:last-child {
    border-bottom: none;
}

.tier-player-card:hover {
    background: #22283a;
}
.tier-player-card:hover::before { opacity: 0.6; }

/* Hover region badge (appears like the screenshot) */
.tier-player-card .region-badge {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #ffffff;
    opacity: 0;
    transform: translateX(-3px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255,255,255,0.06);
    z-index: 2;
    pointer-events: none;
}

.tier-player-card:hover .region-badge { opacity: 1; transform: translateX(0); }

/* Region badge background shades (semi-transparent) */
.tier-player-card.region-na .region-badge { background: rgba(220, 38, 38, 0.28); }
.tier-player-card.region-eu .region-badge { background: rgba(234, 179, 8, 0.28); }
.tier-player-card.region-as .region-badge { background: rgba(22, 163, 74, 0.28); }
.tier-player-card:hover.region-na .region-badge { background: rgba(220, 38, 38, 0.4); }
.tier-player-card:hover.region-eu .region-badge { background: rgba(234, 179, 8, 0.4); }
.tier-player-card:hover.region-as .region-badge { background: rgba(22, 163, 74, 0.4); }

.tier-player-card .player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--bg-secondary);
    flex-shrink: 0;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tier-player-card .player-info {
    flex: 1;
    min-width: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tier-player-card .player-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* New circular tier indicator (right side) */
.tier-player-card .tier-indicator {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
    position: relative;
}

.tier-player-card .tier-indicator.ht {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.tier-player-card .tier-indicator.lt {
    background: linear-gradient(135deg, #d4d4d8 0%, #a1a1aa 100%);
}

/* Tooltip bubble for indicator */
.tier-player-card .tier-indicator::after {
    content: attr(data-label);
    position: absolute;
    right: 140%;
    top: 50%;
    transform: translateY(-50%) scale(0.98);
    background: rgba(17, 24, 39, 0.9);
    color: #e5e7eb;
    padding: 4px 8px;
    border-radius: 999px; /* curvy pill */
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.06);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.tier-player-card .tier-indicator::before {
    content: "";
    position: absolute;
    right: 120%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid rgba(17, 24, 39, 0.9);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.tier-player-card .tier-indicator:hover::after,
.tier-player-card .tier-indicator:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.tier-player-card .expand-icon {
    display: none;
}

/* Information Modal */
.info-modal-content {
    max-width: 600px;
    width: 90%;
}

.info-modal-header {
    display: flex;
    gap: 0.5rem;
    padding: 1.5rem 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-tab {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.info-tab:hover {
    color: var(--text-secondary);
}

.info-tab.active {
    color: var(--text-primary);
    border-bottom-color: #6366f1;
}

.info-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.info-tab-content {
    display: none;
}

.info-tab-content.active {
    display: block;
}

.info-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Title Items */
.title-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.title-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.title-info {
    flex: 1;
}

.title-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.title-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Points Section */
.points-tier {
    margin-bottom: 1.5rem;
}

.points-tier-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.tier-emoji {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.tier-name {
    color: var(--text-secondary);
}

.points-values {
    display: flex;
    gap: 0.75rem;
}

.point-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.point-badge.ht {
    color: #fbbf24;
}

.point-badge.lt {
    color: #f59e0b;
}

/* Tier circles for points */
.tier-circle {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.tier-circle.gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.tier-circle.silver {
    background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
    box-shadow: 0 0 8px rgba(156, 163, 175, 0.3);
}

/* Tooltip for tier circles */
.tier-circle::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1f2e;
    color: #ffffff;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tier-circle::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1a1f2e;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.tier-circle:hover::after,
.tier-circle:hover::before {
    opacity: 1;
}

.points-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-icon {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

/* Error Toast */
.error-toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 1px solid #991b1b;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.error-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.error-icon {
    font-size: 1.5rem;
}

.error-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.error-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.error-message {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        flex-wrap: wrap;
    }

    .search-container {
        order: 3;
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .game-modes {
        gap: 0.35rem;
        padding-bottom: 0.25rem;
    }

    .mode-tab {
        padding: 0.6rem 0.75rem;
        font-size: 0.75rem;
    }

    .mode-icon {
        width: 24px;
        height: 24px;
    }

    .info-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 0.6rem 0.85rem;
    }

    .server-info {
        justify-content: center;
        flex-wrap: wrap;
    }

    .rankings-table th,
    .rankings-table td {
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
    }

    .rank-cell {
        gap: 0.65rem;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .player-avatar {
        width: 36px;
        height: 36px;
    }

    .player-name {
        font-size: 0.9rem;
    }

    .player-rank-badge {
        font-size: 0.75rem;
    }

    .tiers-list {
        gap: 0.35rem;
    }

    .tier-badge-icon {
        width: 32px;
        height: 32px;
    }

    .tier-badge-label {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
        min-width: 32px;
    }

    .tiers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .tier-item {
        padding: 0.5rem;
    }

    .tier-item-icon {
        width: 28px;
        height: 28px;
    }

    .tier-players-grid {
        padding: 0;
    }

    .tier-player-card {
        padding: 0.5rem 0.75rem;
    }

    .tier-cards-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem;
    }

    .tier-card-header {
        padding: 0.85rem 1rem;
        font-size: 1rem;
        min-height: 52px;
    }

    .tier-card-header img {
        width: 24px;
        height: 24px;
    }

    .tier-card-section::after {
        top: 52px;
    }

    .modal-content {
        width: 95%;
    }

    .info-modal-content {
        width: 95%;
    }

    .profile-header {
        padding: 1.5rem 1rem 1rem;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .position-trophy {
        width: 28px;
        height: 28px;
    }

    .position-number {
        font-size: 2rem;
    }

    .position-overall {
        font-size: 1.1rem;
    }

    .tier-emoji {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0;
    }

    .header-container {
        padding: 0 0.85rem;
        gap: 1rem;
    }

    .logo-text {
        display: none;
    }

    .nav {
        gap: 0.25rem;
    }

    .nav-item {
        padding: 0.4rem 0.6rem;
    }

    .nav-item span:not(.dropdown-arrow) {
        display: none;
    }

    .nav-icon {
        width: 18px;
        height: 18px;
    }

    .search-container {
        min-width: 0;
        padding: 0.4rem 0.75rem;
    }

    .search-input {
        font-size: 0.85rem;
    }

    .main-content {
        padding: 1.5rem 0;
    }

    .container {
        padding: 0 0.85rem;
    }

    .game-modes {
        gap: 0.25rem;
    }

    .mode-tab {
        padding: 0.5rem 0.6rem;
        font-size: 0.7rem;
        gap: 0.35rem;
    }

    .mode-icon {
        width: 22px;
        height: 22px;
    }

    .info-bar {
        padding: 0.5rem 0.75rem;
    }

    .info-button {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }

    .discord-logo {
        height: 26px;
        max-width: 90px;
    }
    
    .discord-link {
        padding: 0.35rem 0.75rem;
        min-height: 32px;
    }

    .col-rank {
        width: 70px;
    }

    .col-region {
        display: none;
    }

    .col-tiers {
        width: auto;
    }

    .rankings-table th,
    .rankings-table td {
        padding: 0.5rem 0.65rem;
        font-size: 0.8rem;
    }

    .rank-cell {
        gap: 0.5rem;
    }

    .rank-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .player-avatar {
        width: 32px;
        height: 32px;
    }

    .player-name {
        font-size: 0.85rem;
    }

    .player-rank-badge {
        font-size: 0.7rem;
    }

    .rank-badge-icon {
        width: 12px;
        height: 12px;
    }

    .rank-points {
        font-size: 0.75rem;
    }

    .tiers-list {
        justify-content: flex-start;
        gap: 0.25rem;
        padding-right: 0;
    }

    .tier-badge-icon {
        width: 28px;
        height: 28px;
        padding: 5px;
    }

    .tier-badge-label {
        font-size: 0.65rem;
        padding: 0.12rem 0.35rem;
        min-width: 28px;
    }

    .tier-cards-container {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }

    .tier-card-section {
        min-height: 150px;
    }

    .tier-card-header {
        padding: 0.75rem 0.95rem;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .tier-card-header img {
        width: 22px;
        height: 22px;
    }

    .tier-card-section::after {
        top: 48px;
        width: 3px;
    }

    .tier-player-card {
        padding: 0.45rem 0.65rem;
        gap: 0.5rem;
    }

    .tier-player-card .player-avatar {
        width: 30px;
        height: 30px;
    }

    .tier-player-card .player-name {
        font-size: 0.85rem;
    }

    .tier-player-card .tier-indicator {
        width: 12px;
        height: 12px;
    }

    .tier-player-card::before {
        width: 4px;
    }

    .modal-content {
        width: 96%;
        max-width: none;
    }

    .info-modal-content {
        width: 96%;
    }

    .profile-header {
        padding: 1.25rem 0.85rem 0.85rem;
    }

    .profile-avatar {
        width: 72px;
        height: 72px;
        border-width: 3px;
    }

    .profile-name {
        font-size: 1.35rem;
    }

    .profile-rank {
        padding: 0.4rem 0.85rem;
        font-size: 0.85rem;
    }

    .rank-icon {
        width: 18px;
        height: 18px;
    }

    .profile-region {
        font-size: 0.85rem;
    }

    .profile-position,
    .profile-tiers {
        padding: 1.25rem 0.85rem;
    }

    .position-label,
    .tiers-label {
        font-size: 0.75rem;
    }

    .position-number {
        font-size: 1.85rem;
    }

    .position-trophy {
        width: 24px;
        height: 24px;
    }

    .position-overall {
        font-size: 1rem;
    }

    .position-points {
        font-size: 0.9rem;
    }

    .tiers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .tier-item {
        padding: 0.5rem;
    }

    .tier-item-icon {
        width: 24px;
        height: 24px;
        margin-bottom: 0.35rem;
    }

    .tier-item-label {
        font-size: 0.7rem;
    }

    .info-tab {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    .info-modal-body {
        padding: 1.25rem 0.85rem;
    }

    .info-section-title {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }

    .title-item {
        padding: 0.85rem;
        gap: 0.85rem;
    }

    .title-icon {
        width: 28px;
        height: 28px;
    }

    .title-name {
        font-size: 0.85rem;
    }

    .title-desc {
        font-size: 0.8rem;
    }

    .points-tier {
        margin-bottom: 1.25rem;
    }

    .points-tier-header {
        font-size: 0.9rem;
        margin-bottom: 0.65rem;
    }

    .tier-emoji {
        width: 22px;
        height: 22px;
    }

    .tier-name {
        font-size: 0.9rem;
    }

    .points-values {
        flex-direction: column;
        gap: 0.5rem;
    }

    .point-badge {
        padding: 0.4rem 0.85rem;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }

    .points-footer {
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding-top: 1.25rem;
    }

    .footer-icon {
        width: 28px;
        height: 28px;
    }

    .error-toast {
        width: 92%;
        max-width: none;
        padding: 0.85rem 1.25rem;
    }

    .error-title {
        font-size: 0.85rem;
    }

    .error-message {
        font-size: 0.8rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-tertiary);
}
