/* Global */
body {
    font-family: Arial, sans-serif;
    color: #fff;
    background: #121212;
    margin: 0;
    padding: 0;
}

#wrap {
    width: 90%;
    max-width: 1100px;
    margin: 20px auto;
}

h1, h2 {
    margin: 10px 0;
}

/* Leaderboard */
.contact {
    text-align: center;
    margin-bottom: 10px;
}

.main-table,
.sub-table {
    width: 100%;
    border-collapse: collapse;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
}

.main-table th,
.main-table td,
.sub-table th,
.sub-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #444;
}

.main-table th,
.sub-table th {
    background-color: #252525;
}

.main-table tr:nth-child(even),
.sub-table tr:nth-child(even) {
    background-color: #181818;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
}

.player-link {
    color: inherit;
    text-decoration: none;
}

.player-link:hover {
    text-decoration: underline;
}

/* Positions */
.pos-gold   { color: gold; }
.pos-silver { color: #C0C0C0; }
.pos-bronze { color: #CD7F32; }

/* Winrate + W/L colors */
.winrate-red    { color: #d50000; font-weight: bold; }
.winrate-yellow { color: #FFD600; font-weight: bold; }
.winrate-green  { color: #00c853; font-weight: bold; }

.wins-text   { color: #00c853; font-weight: bold; }
.losses-text { color: #d50000; font-weight: bold; }

.ptscolor {
    color: #42a5f5;
    font-weight: bold;
}

/* Profile page */
.container {
    width: 90%;
    max-width: 900px;
    margin: 20px auto;
}

.back-link {
    color: #42a5f5;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #1e1e1e;
    border-radius: 8px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
}

.profile-name {
    font-size: 28px;
    margin: 0 0 5px 0;
}

.profile-steamid {
    font-size: 14px;
    color: #aaa;
}

.stats-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.stat-box {
    background: #252525;
    padding: 10px 15px;
    border-radius: 6px;
    min-width: 120px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    margin-top: 3px;
}

/* Match history result colors */
.result-win  { color: #00c853; font-weight: bold; }
.result-loss { color: #d50000; font-weight: bold; }

/* Match page */
.match-header {
    background: #1e1e1e;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.match-title {
    margin: 0 0 5px 0;
    font-size: 24px;
}

.match-meta {
    font-size: 14px;
    color: #aaa;
}

.teams-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.team-box {
    flex: 1 1 45%;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
    min-width: 280px;
}

.team-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    text-align: center;
}

.team-title.win  { color: #00c853; }
.team-title.loss { color: #d50000; }

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #333;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-link {
    color: inherit;
    text-decoration: none;
}

.player-link:hover {
    text-decoration: underline;
}

.wins-text {
    color: #00c853;   /* green */
    font-weight: bold;
}

.losses-text {
    color: #d50000;   /* red */
    font-weight: bold;
}

.player-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.player-name a {
    color: #fff;
    text-decoration: none;
}

.player-name a:hover {
    text-decoration: underline;
}

.player-pts {
    font-size: 14px;
}

.pts-plus  { color: #00c853; }
.pts-minus { color: #d50000; }
