/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #0a0e13;
    color: #e5e7eb;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background-color: #141920;
    border-bottom: 1px solid #1f2937;
    padding: 16px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #fbbf24;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.main-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: #9ca3af;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
    font-size: 14px;
}

.nav-link:hover {
    color: #fbbf24;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
}

.search-box input {
    background-color: #1a1f28;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 8px 16px 8px 36px;
    color: #e5e7eb;
    font-size: 14px;
    width: 250px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: #fbbf24;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.5;
}

.server-info {
    text-align: right;
}

.server-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.server-ip {
    color: #fbbf24;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
}

/* Tabs */
.tabs-section {
    background-color: #141920;
    border-bottom: 1px solid #1f2937;
}

.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 16px 24px;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover {
    color: #e5e7eb;
}

.tab.active {
    color: #fbbf24;
    border-bottom-color: #fbbf24;
}

.tab-icon {
    font-size: 18px;
}

/* Main Content */
.main-content {
    padding: 32px 24px;
}

.content-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.info-btn {
    background-color: #141920;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 8px 16px;
    color: #e5e7eb;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s;
}

.info-btn:hover {
    border-color: #fbbf24;
}

.server-info-box {
    background-color: #141920;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 8px 16px;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Overall Leaderboard */
.table-header {
    display: grid;
    grid-template-columns: 60px 1fr 150px 400px;
    gap: 16px;
    padding: 12px 24px;
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.player-card {
    background-color: #141920;
    border: 1px solid #1f2937;
    border-radius: 8px;
    padding: 16px 24px;
    transition: border-color 0.2s;
    cursor: pointer;
}

.player-card:hover {
    border-color: #fbbf24;
}

.player-card-content {
    display: grid;
    grid-template-columns: 60px 1fr 150px 400px;
    gap: 16px;
    align-items: center;
}

.player-rank {
    font-size: 24px;
    font-weight: bold;
    color: #6b7280;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    background-color: #1a1f28;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.player-details {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.player-title {
    font-size: 13px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-points {
    color: #6b7280;
    font-size: 12px;
}

.player-region {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.player-region.na {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.player-region.eu {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.player-tiers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tier-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid;
}

.tier-badge.ht1, .tier-badge.lt1 {
    background-color: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
}

.tier-badge.ht2, .tier-badge.lt2 {
    background-color: rgba(156, 163, 175, 0.2);
    border-color: #9ca3af;
    color: #9ca3af;
}

.tier-badge.ht3, .tier-badge.lt3 {
    background-color: rgba(205, 127, 50, 0.2);
    border-color: #cd7f32;
    color: #cd7f32;
}

.tier-badge.ht4, .tier-badge.lt4 {
    background-color: rgba(96, 165, 250, 0.2);
    border-color: #60a5fa;
    color: #60a5fa;
}

.tier-badge.ht5, .tier-badge.lt5 {
    background-color: rgba(52, 211, 153, 0.2);
    border-color: #34d399;
    color: #34d399;
}

/* Tier View */
.tiers-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.tier-section {
    background-color: #141920;
    border: 1px solid #1f2937;
    border-radius: 8px;
    overflow: hidden;
}

.tier-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #1f2937;
}

.tier-1 .tier-header {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
}

.tier-2 .tier-header {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    color: #fff;
}

.tier-3 .tier-header {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
    color: #fff;
}

.tier-4 .tier-header {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: #fff;
}

.tier-5 .tier-header {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: #fff;
}

.tier-icon {
    font-size: 24px;
}

.tier-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.tier-column {
    border-right: 1px solid #1f2937;
}

.tier-column:last-child {
    border-right: none;
}

.tier-column-header {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #fbbf24;
    background-color: #0a0e13;
    border-bottom: 1px solid #1f2937;
    letter-spacing: 1px;
}

.tier-players {
    padding: 8px;
    min-height: 60px;
}

.tier-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.tier-player:hover {
    background-color: #1a1f28;
}

.tier-player-avatar {
    width: 32px;
    height: 32px;
    background-color: #1a1f28;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.tier-player-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    flex: 1;
}

.tier-player-badge {
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    background-color: #1a1f28;
    padding: 3px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 1200px) {
    .tiers-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .table-header {
        display: none;
    }

    .player-card-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tabs {
        flex-wrap: nowrap;
        overflow-x: scroll;
    }
}

/* Modal/Profile Popup */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #0a0e13;
    border: 2px solid #fbbf24;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background-color: #1a1f28;
    color: #fbbf24;
}

.profile-header {
    text-align: center;
    padding: 40px 24px 24px;
    border-bottom: 1px solid #1f2937;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    margin: 0 auto 16px;
    border: 4px solid #1a1f28;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

.profile-name {
    font-size: 28px;
    font-weight: bold;
    color: #60d5fa;
    margin-bottom: 8px;
}

.profile-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #1a1f28;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #fbbf24;
    font-weight: 600;
    margin-bottom: 12px;
}

.profile-region {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.profile-namemc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #60a5fa;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    background-color: #1a1f28;
    transition: background-color 0.2s;
}

.profile-namemc:hover {
    background-color: #374151;
}

.profile-position {
    padding: 24px;
    border-bottom: 1px solid #1f2937;
}

.profile-position-header {
    font-size: 16px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.profile-rank-card {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-rank-number {
    font-size: 48px;
    font-weight: bold;
    color: #000;
    line-height: 1;
}

.profile-rank-details {
    flex: 1;
}

.profile-rank-label {
    font-size: 18px;
    font-weight: bold;
    color: #000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-rank-points {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 600;
}

.profile-tiers {
    padding: 24px;
}

.profile-tiers-header {
    font-size: 16px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    font-weight: 600;
}

.profile-tier-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-tier-item {
    background-color: #141920;
    border: 1px solid #1f2937;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-tier-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1f28;
    border-radius: 8px;
}

.profile-tier-info {
    flex: 1;
}

.profile-tier-name {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.profile-tier-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid;
}