/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 31, 0.98) 100%);
    border: 2px solid rgba(14, 165, 233, 0.2);
    border-radius: 20px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
    position: relative;
    animation: slideUp 0.3s ease;
    background-attachment: fixed;
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px;
        margin: 16px;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Banner background */
.player-modal-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 220px;
    background-size: cover;
    background-position: center;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
}

.player-modal-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
}

/* Close button */
.player-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.player-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(14, 165, 233, 0.6);
}

/* Avatar section */
.player-modal-avatar-section {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 20px;
}

.player-modal-avatar {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    border: 5px solid #d4af37;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(212, 175, 55, 0.3);
    object-fit: cover;
    background: rgba(100, 116, 139, 0.3);
}

.player-modal-name {
    font-size: 28px;
    font-weight: 800;
    color: #0ea5e9;
    margin-top: 16px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.player-modal-rank-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #f5a623;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

/* Info section */
.player-modal-info {
    position: relative;
    z-index: 5;
    padding: 0 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(14, 165, 233, 0.1);
}

/* Position section */
.player-modal-section {
    padding: 28px 24px;
    border-bottom: 1px solid rgba(14, 165, 233, 0.1);
}

.player-modal-section:last-child {
    border-bottom: none;
}

.player-modal-section-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.player-modal-position {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(14, 165, 233, 0.08);
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.player-modal-position-region {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 8px 12px;
    background: rgba(14, 165, 233, 0.2);
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    color: #0ea5e9;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-modal-position-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    border-radius: 8px;
    font-weight: 800;
    font-size: 18px;
    color: #0f172a;
    flex-shrink: 0;
}

.player-modal-position-info {
    flex: 1;
}

.player-modal-position-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.player-modal-position-value {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}

.player-modal-position-tag {
    font-size: 11px;
    color: rgba(255, 193, 7, 0.9);
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tiers section */
.player-modal-tiers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.player-modal-tier-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 65px;
    max-width: 80px;
    background: transparent;
    border: none;
    transition: all 0.2s ease;
    position: relative;
}

.player-modal-tier-item:hover {
    opacity: 1.1;
}

.player-modal-tier-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: contain;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
    position: relative;
    z-index: 1;
}

.player-modal-tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 5px;
    border-radius: 999px;
    font-size: 10px;
    min-width: 32px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    margin: 0;
    font-weight: 600;
    position: absolute;
    bottom: -6px;
    z-index: 2;
}

.player-modal-tier-badge.tier-1 {
    background-color: #d97706;
    color: #fff;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.4);
}

.player-modal-tier-badge.tier-2 {
    background-color: #9ca3af;
    color: #fff;
    box-shadow: 0 2px 6px rgba(156, 163, 175, 0.4);
}

.player-modal-tier-badge.tier-3 {
    background-color: #92472f;
    color: #fff;
    box-shadow: 0 2px 6px rgba(146, 71, 47, 0.4);
}

.player-modal-tier-badge.tier-4 {
    background-color: #6b7280;
    color: #fff;
    box-shadow: 0 2px 6px rgba(107, 114, 128, 0.4);
}

.player-modal-tier-badge.tier-5 {
    background-color: #78654d;
    color: #fff;
    box-shadow: 0 2px 6px rgba(120, 101, 77, 0.4);
}

.player-modal-tier-badge.tier-unknown {
    background-color: #6b7280;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.player-modal-tier-badge.tier-retired {
    background: #000 !important;
    color: #fff !important;
    box-shadow: none;
    border: 1px solid #fff;
}

/* Scrollbar styling for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.3);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 165, 233, 0.5);
}
/* All Modes Modal - Categories section */
.player-modal-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.player-modal-category-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(14, 165, 233, 0.08);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    transition: all 0.2s ease;
}

.player-modal-category-box:hover {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.player-modal-category-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    border-radius: 6px;
    font-weight: 800;
    font-size: 16px;
    color: #0f172a;
    flex-shrink: 0;
}

.player-modal-category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-modal-category-label {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.player-modal-category-points {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.player-modal-category-tag {
    font-size: 11px;
    color: rgba(255, 193, 7, 0.85);
    font-weight: 600;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Popout button (top-left) */
.player-modal-popout {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    z-index: 11;
}

.player-modal-popout:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(14,165,233,0.5);
}

/* GLOBAL section buttons */
.player-modal-global-positions {
    display: flex;
    gap: 12px;
}

.player-modal-global-positions .player-modal-position {
    flex: 1;
}