* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #0b1020;
    color: #e6eaf2;
    min-height: 100vh;
    padding: 40px;
    background-size: cover;
    background-position: center;
}

.container {
    max-width: 1250px;
    margin: auto;
    background: rgba(15, 20, 35, 0.96);
    border: 1px solid #1f2a44;
    border-radius: 18px;
    overflow: hidden;
}

.header {
    padding: 25px;
    text-align: center;
    background: #0f1629;
    border-bottom: 1px solid #22304f;
}

.header h1 {
    color: #4da3ff;
    font-size: 2rem;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: #0e1526;
}

.tab-btn {
    padding: 10px 18px;
    border: 1px solid #22304f;
    border-radius: 8px;
    background: #141c2f;
    color: #d7deea;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.tab-btn:hover {
    background: #1f2f52;
    color: #ffffff;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #4da3ff;
    color: #0b1020;
    border-color: #4da3ff;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
}

thead {
    background: #111a2e;
}

th, td {
    padding: 15px;
    text-align: center;
}

th {
    color: #7fb8ff;
    border-bottom: 1px solid #22304f;
}

tbody tr {
    border-bottom: 1px solid #1c2742;
    transition: 0.2s;
    cursor: pointer;
}

tbody tr:hover {
    background: rgba(77, 163, 255, 0.08);
}

.rank {
    color: #ffd36a;
    font-weight: bold;
}

.player-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    image-rendering: pixelated;
    border: 2px solid #2f4b7c;
}

.flag {
    width: 28px;
    border-radius: 4px;
    border: 1px solid #2a3a5e;
}

.positive {
    color: #4ee59a;
    font-weight: bold;
}

.negative {
    color: #ff6b6b;
    font-weight: bold;
}

/* Modal */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 850px;
    background: #0f1629;
    border: 1px solid #2a3a5e;
    border-radius: 16px;
    overflow: hidden;
    animation: popIn 0.2s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #111a2e;
    border-bottom: 1px solid #22304f;
}

.modal-header h2 {
    color: #4da3ff;
}

.close-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 1.6rem;
    cursor: pointer;
}

.profile {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding: 30px;
}

.skin-preview {
    text-align: center;
}

.skin-preview img {
    width: 200px;
    image-rendering: pixelated;
}

.player-name {
    margin-top: 15px;
    font-size: 1.4rem;
    color: #4da3ff;
    font-weight: bold;
}

.country-tag {
    margin-top: 8px;
    color: #aab4c5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-card {
    background: #141c2f;
    border: 1px solid #22304f;
    border-radius: 12px;
    padding: 18px;
}

.stat-card h4 {
    color: #8fa3c7;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.stat-card p {
    font-size: 1.4rem;
    font-weight: bold;
    color: #e6eaf2;
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .profile {
        grid-template-columns: 1fr;
    }

    .skin-preview img {
        width: 160px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}