/* Reset & Base Variables */
:root {
    --bg-primary: #0a0512;
    --bg-card: rgba(18, 9, 30, 0.7);
    --bg-card-hover: rgba(28, 14, 46, 0.85);
    --primary-color: #C000FF;
    --primary-glow: rgba(192, 0, 255, 0.4);
    --primary-glow-strong: rgba(192, 0, 255, 0.75);
    --text-main: #f3f0f7;
    --text-muted: #a699b8;
    
    /* Tier Colors */
    --color-t1: #ff3e3e;
    --color-t2: #ff913e;
    --color-t3: #ffdd3e;
    --color-t4: #3eff54;
    --color-t5: #3ebaff;
    --color-unranked: #70687e;

    /* Glows por tier */
    --glow-t1: 0 0 10px rgba(255, 62, 62, 0.5);
    --glow-t2: 0 0 10px rgba(255, 145, 62, 0.5);
    --glow-t3: 0 0 10px rgba(255, 221, 62, 0.5);
    --glow-t4: 0 0 10px rgba(62, 255, 84, 0.5);
    --glow-t5: 0 0 10px rgba(62, 186, 255, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, .logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Background Aura/Glow */
.background-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--primary-glow-strong) 0%, rgba(10, 5, 18, 0) 70%);
    z-index: -1;
    filter: blur(120px);
    opacity: 0.65;
    pointer-events: none;
}

/* Header Styles */
.app-header {
    background: rgba(10, 5, 18, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(192, 0, 255, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.logo-text {
    font-size: 1.6rem;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-glow-strong);
}

/* Search Bar */
.search-area {
    flex-grow: 1;
    max-width: 500px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1.25rem 0.75rem 3rem;
    background: rgba(25, 15, 38, 0.6);
    border: 1px solid rgba(192, 0, 255, 0.25);
    border-radius: 50px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(35, 18, 55, 0.85);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Discord Button */
.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #5865F2;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.4);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Tabs */
.modality-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: var(--bg-card);
    border: 1px solid rgba(192, 0, 255, 0.15);
    color: var(--text-muted);
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(28, 14, 46, 0.5);
    border-color: rgba(192, 0, 255, 0.35);
}

.tab-btn.active {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Leaderboard Section */
.leaderboard-section {
    background: var(--bg-card);
    border: 1px solid rgba(192, 0, 255, 0.15);
    border-radius: 20px;
    padding: 2rem;
    min-height: 400px;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Loader */
.loader-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-muted);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(192, 0, 255, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
    box-shadow: 0 0 10px var(--primary-glow);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.5;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px var(--primary-glow-strong);
}

.empty-state h2 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

/* Overall Table */
.table-container {
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.leaderboard-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid rgba(192, 0, 255, 0.15);
}

.leaderboard-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(192, 0, 255, 0.08);
    font-size: 0.95rem;
    vertical-align: middle;
}

.leaderboard-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.leaderboard-table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* Rank column */
.col-rank {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-muted);
    width: 80px;
}

.leaderboard-table tbody tr:nth-child(1) .col-rank {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}
.leaderboard-table tbody tr:nth-child(2) .col-rank {
    color: #c0c0c0;
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.4);
}
.leaderboard-table tbody tr:nth-child(3) .col-rank {
    color: #cd7f32;
    text-shadow: 0 0 8px rgba(205, 127, 50, 0.4);
}

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

.player-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(192, 0, 255, 0.2);
    object-fit: cover;
}

.player-name-wrapper {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-weight: 600;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.player-namemc-mini {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.player-namemc-mini:hover {
    color: var(--primary-color);
}

/* High Tier Bars */
.ht-bars {
    display: inline-flex;
    gap: 2px;
    margin-left: 0.25rem;
    align-items: center;
    height: 12px;
}

.ht-bars .bar {
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-glow-strong);
    border-radius: 1px;
}

/* Region Badge */
.region-badge {
    background: rgba(192, 0, 255, 0.12);
    border: 1px solid rgba(192, 0, 255, 0.3);
    color: var(--text-main);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Tiers display cell */
.tiers-summary-cell {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Modality Tier Badge */
.tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    cursor: help;
    position: relative;
}

.tier-badge::before {
    content: "Modalidad: " attr(data-modality);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #12091e;
    border: 1px solid var(--primary-color);
    color: #fff;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 10;
}

.tier-badge::after {
    content: attr(data-points) " pts";
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #12091e;
    border: 1px solid var(--primary-color);
    color: #fff;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 10;
}

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

.tier-badge.badge-t1 {
    color: var(--color-t1);
    background: rgba(255, 62, 62, 0.1);
    border-color: rgba(255, 62, 62, 0.35);
    box-shadow: var(--glow-t1);
}
.tier-badge.badge-t2 {
    color: var(--color-t2);
    background: rgba(255, 145, 62, 0.1);
    border-color: rgba(255, 145, 62, 0.35);
    box-shadow: var(--glow-t2);
}
.tier-badge.badge-t3 {
    color: var(--color-t3);
    background: rgba(255, 221, 62, 0.1);
    border-color: rgba(255, 221, 62, 0.35);
    box-shadow: var(--glow-t3);
}
.tier-badge.badge-t4 {
    color: var(--color-t4);
    background: rgba(62, 255, 84, 0.1);
    border-color: rgba(62, 255, 84, 0.35);
    box-shadow: var(--glow-t4);
}
.tier-badge.badge-t5 {
    color: var(--color-t5);
    background: rgba(62, 186, 255, 0.1);
    border-color: rgba(62, 186, 255, 0.35);
    box-shadow: var(--glow-t5);
}
.tier-badge.badge-unranked {
    color: var(--color-unranked);
    background: rgba(112, 104, 126, 0.1);
    border-color: rgba(112, 104, 126, 0.25);
}

/* Points cell */
.points-cell {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--primary-glow);
}

/* Modality Groups Layout (Tiers 1 to 5 sections in 5 columns grid) */
.tier-groups-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    align-items: start;
    margin-top: 1rem;
}

.tier-group-section {
    background: rgba(18, 9, 30, 0.25);
    border: 1px solid rgba(192, 0, 255, 0.08);
    border-radius: 18px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 550px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tier-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tier-group-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
}

.tier-group-title.title-tier1 { color: var(--color-t1); }
.tier-group-title.title-tier2 { color: var(--color-t2); }
.tier-group-title.title-tier3 { color: var(--color-t3); }
.tier-group-title.title-tier4 { color: var(--color-t4); }
.tier-group-title.title-tier5 { color: var(--color-t5); }

.tier-group-count {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* Cards stacked vertically inside each column */
.players-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 100px;
}

/* Custom Modality Image Icons */
.tab-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
}

.modal-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 10px;
}

@media (max-width: 1250px) {
    .tier-groups-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 850px) {
    .tier-groups-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .tier-groups-container {
        grid-template-columns: 1fr;
    }
}

/* Player Card */
.player-card {
    background: rgba(18, 9, 30, 0.45);
    border: 1.5px solid rgba(192, 0, 255, 0.08);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.player-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(192, 0, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(192, 0, 255, 0.15);
}

/* Left vertical region bar */
.player-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

.player-card.region-eu::before {
    background: #2ECC71; /* Green for EU */
}

.player-card.region-na::before {
    background: #E74C3C; /* Red for NA */
}

.player-card-avatar {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 6px;
}

.player-card-name-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-grow: 1;
    margin-left: 0.75rem;
}

.player-card-name {
    font-weight: 650;
    font-size: 0.92rem;
    color: #F2F4F4;
}

.card-caret-icon {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.22);
}

.card-caret-icon.up {
    color: #F5B041; /* Gold caret for HT */
}

.card-caret-icon.down {
    color: #BDC3C7; /* Grey caret for LT */
}

.player-card-region {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.player-card-subtier {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Modality Icon Color Helpers */
.color-neth { color: #8a7a93; }
.color-sword { color: #55d6ff; }
.color-crystal { color: #ff68ff; }

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 2, 8, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

.modal-card {
    background: #11071d;
    border: 1px solid rgba(192, 0, 255, 0.3);
    box-shadow: 0 20px 60px rgba(192, 0, 255, 0.2);
    width: 100%;
    max-width: 750px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    color: #fff;
    background: rgba(192, 0, 255, 0.3);
}

.modal-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 420px;
}

/* Modal Skin Section */
.modal-skin-section {
    background: radial-gradient(circle at center, #1b0c2e 0%, #0c0515 100%);
    border-right: 1px solid rgba(192, 0, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.skin-wrapper {
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skin-wrapper img {
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
    animation: hoverAnim 4s ease-in-out infinite;
}

@keyframes hoverAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Modal Info Section */
.modal-info-section {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    max-height: 550px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(192, 0, 255, 0.15);
    padding-bottom: 1rem;
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-title-wrapper h2 {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.modal-region-badge {
    font-size: 0.85rem;
    background: rgba(192, 0, 255, 0.15);
    border: 1px solid rgba(192, 0, 255, 0.35);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
}

.modal-namemc-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    font-weight: 500;
}

.modal-namemc-link:hover {
    color: #fff;
    border-color: var(--primary-color);
    background: rgba(192, 0, 255, 0.1);
}

/* Modal Stats Grid */
.modal-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(192, 0, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 500;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* Modal Tiers Section */
.modal-tiers-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-tiers-section h3, .modal-history-section h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.modal-tier-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 0.75rem 1rem;
    border-radius: 12px;
}

.modality-label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.tier-value-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Historial de nicks */
.modal-history-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-item {
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: rgba(5, 2, 8, 0.9);
    border-top: 1px solid rgba(192, 0, 255, 0.08);
    margin-top: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem 1.5rem;
    }
    
    .search-area {
        max-width: 100%;
    }
    
    .nav-actions {
        display: flex;
        justify-content: center;
    }
    
    .main-content {
        padding: 0 1rem;
    }
    
    .leaderboard-section {
        padding: 1rem;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-skin-section {
        border-right: none;
        border-bottom: 1px solid rgba(192, 0, 255, 0.15);
        height: 240px;
        padding: 1rem;
    }
    
    .skin-wrapper {
        height: 200px;
    }
    
    .modal-info-section {
        padding: 1.5rem;
    }
}

/* Custom premium modality 8-tier badges list layout */
.tiers-badges-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.tier-badge-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 38px;
}

.tier-badge-slot .icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.tier-badge-slot .icon-circle img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.tier-badge-slot.empty .icon-circle {
    border: 1.5px dashed rgba(255, 255, 255, 0.15);
    background: transparent;
    box-shadow: none;
}

.tier-badge-slot.empty .icon-circle img {
    opacity: 0.12;
    filter: grayscale(100%);
}

.tier-badge-slot .subtier-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
}

.tier-badge-slot.active .subtier-label {
    text-shadow: 0 0 5px currentColor;
}

.tier-badge-slot.active .subtier-label.badge-t1 { color: #FFD700; }
.tier-badge-slot.active .subtier-label.badge-t2 { color: #C0C0C0; }
.tier-badge-slot.active .subtier-label.badge-t3 { color: #E59866; }
.tier-badge-slot.active .subtier-label.badge-t4 { color: #5DADE2; }
.tier-badge-slot.active .subtier-label.badge-t5 { color: #A6ACAF; }

.tier-badge-slot.active .icon-circle.border-sword { border-color: #E59866; }
.tier-badge-slot.active .icon-circle.border-netherite { border-color: #C0C0C0; }
.tier-badge-slot.active .icon-circle.border-crystal { border-color: #D7BDE2; }

/* Combat Rank Mini Subtext in rows */
.player-combat-subtext {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.15rem;
}

.combat-mini-icon {
    font-size: 0.75rem;
    color: #FFC300;
}

/* PREMIUM COSMIC MODAL CARD STYLING */
.modal-body-cosmic {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem 1rem 1rem;
    text-align: center;
    gap: 0.85rem;
}

.profile-avatar-wrapper {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(192, 0, 255, 0.3);
    box-shadow: 0 0 20px rgba(192, 0, 255, 0.2);
    overflow: hidden;
}

.profile-avatar-large {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-title-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

.combat-badge-wrapper {
    margin-top: -0.25rem;
}

.combat-badge {
    background: rgba(155, 89, 182, 0.2);
    border: 1px solid rgba(155, 89, 182, 0.4);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #D2B4DE;
    letter-spacing: 0.5px;
    display: inline-block;
    text-transform: capitalize;
}

.profile-region-text {
    font-size: 0.9rem;
    color: #85929E;
    font-weight: 500;
}

.namemc-button-wrapper {
    margin-top: 0.15rem;
}

.btn-namemc {
    background: #1C2833;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #AEB6BF;
    padding: 0.4rem 1.15rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-namemc:hover {
    background: #2C3E50;
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.2);
}

.modal-section-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.4rem;
}

.modal-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #5DADE2;
    letter-spacing: 1.5px;
    margin: 0;
    align-self: flex-start;
    text-align: left;
    text-transform: uppercase;
}

.cosmic-position-card {
    width: 100%;
    background: rgba(18, 9, 30, 0.6);
    border: 1.5px solid rgba(192, 0, 255, 0.18);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cosmic-pos-number {
    font-size: 1.7rem;
    font-weight: 900;
    font-style: italic;
    color: #FFFFFF;
    font-family: 'Outfit', sans-serif;
}

.cosmic-overall-badge {
    font-size: 0.95rem;
    font-weight: 750;
    color: #FFC300;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.cosmic-tiers-box {
    width: 100%;
    background: rgba(18, 9, 30, 0.6);
    border: 1.5px dashed rgba(192, 0, 255, 0.18);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tier Column Header Background Colors (Matching screenshot) */
.tier-group-header.title-tier1 {
    background: #D4AC0D !important;
    color: #111111 !important;
    border-color: #D4AC0D !important;
}
.tier-group-header.title-tier1 .tier-group-title {
    color: #111111 !important;
}
.tier-group-header.title-tier1 .tier-group-count {
    background: rgba(0, 0, 0, 0.15) !important;
    color: #111111 !important;
}

.tier-group-header.title-tier2 {
    background: #7F8C8D !important;
    color: #FFFFFF !important;
    border-color: #7F8C8D !important;
}
.tier-group-header.title-tier2 .tier-group-title {
    color: #FFFFFF !important;
}
.tier-group-header.title-tier2 .tier-group-count {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
}

.tier-group-header.title-tier3 {
    background: #A04000 !important;
    color: #FFFFFF !important;
    border-color: #A04000 !important;
}
.tier-group-header.title-tier3 .tier-group-title {
    color: #FFFFFF !important;
}
.tier-group-header.title-tier3 .tier-group-count {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
}

.tier-group-header.title-tier4 {
    background: #2E4053 !important;
    color: #FFFFFF !important;
    border-color: #2E4053 !important;
}
.tier-group-header.title-tier4 .tier-group-title {
    color: #FFFFFF !important;
}
.tier-group-header.title-tier4 .tier-group-count {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
}

.tier-group-header.title-tier5 {
    background: #1C2833 !important;
    color: #FFFFFF !important;
    border-color: #1C2833 !important;
}
.tier-group-header.title-tier5 .tier-group-title {
    color: #FFFFFF !important;
}
.tier-group-header.title-tier5 .tier-group-count {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
}
