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

body {
    background: #0f1419;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.header {
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8b95a5;
    cursor: pointer;
    transition: color 0.3s;
    font-size: 15px;
}

.nav-item:hover {
    color: #fff;
}

.nav-item.active {
    color: #fff;
}

.search-box {
    background: rgba(255,255,255,0.05);
    padding: 8px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.search-box input {
    background: none;
    border: none;
    color: #fff;
    outline: none;
    width: 200px;
}

.search-box input::placeholder {
    color: #8b95a5;
}

.shortcut {
    color: #8b95a5;
    font-size: 12px;
}

.tabs {
    display: flex;
    gap: 20px;
    padding: 30px 40px 0;
    overflow-x: auto;
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    opacity: 0.6;
}

.tab:hover {
    opacity: 0.8;
}

.tab.active {
    border-bottom-color: #ffd700;
    opacity: 1;
}

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

.tab-label {
    font-size: 13px;
    font-weight: 500;
    color: #8b95a5;
}

.server-info {
    position: absolute;
    top: 120px;
    right: 40px;
    background: rgba(255,255,255,0.05);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.server-ip {
    background: #e74c3c;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
}

.copy-btn {
    background: #3b82f6;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: white;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #2563eb;
}

.rankings {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.ranking-header {
    display: grid;
    grid-template-columns: 80px 1fr 150px 500px;
    padding: 15px 20px;
    font-size: 12px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.ranking-item {
    display: grid;
    grid-template-columns: 80px 1fr 150px 500px;
    align-items: center;
    background: rgba(255,255,255,0.03);
    margin-bottom: 12px;
    border-radius: 10px;
    padding: 15px 20px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
    cursor: pointer;
}

.ranking-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.rank {
    font-size: 32px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 15px;
}

.rank-number {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 24px;
}

.rank-1 { background: linear-gradient(135deg, #ffd700, #ffed4e); color: #000; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #e8e8e8); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #e8a87c); color: #000; }
.rank-other { background: rgba(255,255,255,0.1); color: #fff; }

.player-avatar {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.player-name {
    font-size: 20px;
    font-weight: 600;
}

.player-rank {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #8b95a5;
}

.rank-badge {
    width: 14px;
    height: 14px;
    color: #ffd700;
}

.region {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 12px;
}

.region-na {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.region-eu {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.tiers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tier-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    padding: 6px;
}

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

.tier-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid rgba(255,255,255,0.2);
}

.tier-ht1 { background: #ffd700; color: #000; }
.tier-lt1 { background: #7ed321; color: #000; }
.tier-ht2 { background: #ff6b6b; color: #fff; }
.tier-lt2 { background: #4ecdc4; color: #000; }
.tier-ht3 { background: #ff8c42; color: #000; }
.tier-lt3 { background: #95e1d3; color: #000; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

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

.modal-content {
    background: #1a2332;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #8b95a5;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.modal-header {
    text-align: center;
    padding: 40px 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.player-avatar-large {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 4px solid #ffd700;
    overflow: hidden;
}

.player-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-player-name {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.modal-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,215,0,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    color: #ffd700;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
}

.modal-region {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.namemc-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #8b95a5;
    font-size: 14px;
}

.namemc-link a {
    color: #8b95a5;
    text-decoration: none;
    transition: color 0.3s;
}

.namemc-link a:hover {
    color: #fff;
}

.modal-body {
    padding: 30px;
}

.modal-section {
    margin-bottom: 30px;
}

.modal-section h3 {
    font-size: 14px;
    color: #8b95a5;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.position-card {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.position-rank {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
}

.position-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

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

.position-label {
    font-weight: bold;
    font-size: 16px;
    color: #fff;
}

.position-points {
    margin-left: auto;
    color: #8b95a5;
    font-size: 14px;
}

.modal-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.tier-item {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.tier-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    padding: 8px;
}

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

.tier-item-info {
    flex: 1;
}

.tier-item-badges {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.tier-item-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.tier-item-badge svg {
    width: 12px;
    height: 12px;
}

.tier-name {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.tier-level {
    font-size: 12px;
    color: #8b95a5;
    margin-top: 2px;
}
