body {
    font-family: Arial, sans-serif;
    margin: 40px;
    background: #070b23;
    color: white;
}

.container {
    max-width: 1100px;
    margin: auto;
    background: #1f2546;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0px 8px #ff5500;
}

h1 {
    text-align: center;
    color: #ff5500;
    margin-bottom: 10px;
}

label {
    font-weight: bold;
    margin-bottom: 6px;
    color: white;
}

input {
    height: 52px;
    padding: 0 12px;
    font-size: 16px;
    border: 1px solid #ff5500;
    border-radius: 6px;
    font-weight: 700;
    background: #070b23;
    color: white;
    box-sizing: border-box;
}

button {
    height: 52px;
    padding: 0 22px;
    background: #ff5500;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    box-sizing: border-box;
}

button:hover {
    background: #e04a00;
}

#loading {
    text-align: center;
    margin: 25px 0;
    font-weight: bold;
    color: #ff5500;
    font-size: 18px;
}

#error {
    color: #ff3333;
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
}

.input-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.players-container {
    display: none;
    gap: 20px;
    margin-bottom: 20px;
    margin-top: 10px;
}

/* PLAYER CARD WITH COVER BACKGROUND */
.player-card {
    flex: 1;
    position: relative;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #070b23;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.player-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(7, 11, 35, 0.78);
    z-index: 1;
}

.player-card > * {
    position: relative;
    z-index: 2;
}

/* HEADER (now relative for ban placement) */
.player-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;  /* top-align avatar, text and rank */
    padding-top: 5px;         /* ~5px from top of the card */
}

.player-header-left {
    display: flex;
    align-items: flex-start;
    gap: 20px;                  /* <-- EXACT space between avatar & name */
}


/* Avatar wrapper with background card (animated_profile/profile card) */
.player-avatar-wrapper {
    width: 120px;
    height: 200px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
position: relative;
    padding-top: 18px;  /* same-ish gap as left/right */
    padding-left: 8px;
    padding-right: 8px;

    box-shadow: 0 0 6px rgba(0,0,0,0.6);
}

.player-avatar-links {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}



.player-avatar-inner {
    position: relative;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Avatar image itself */
.player-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #000000;       /* default black border if no frame */
}

/* Default avatar (when no avatar URL provided) */
.player-avatar-default {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #111;
    border: 2px solid #000;
    color: #f5f5f5;
}

.default-avatar-svg {
    width: 48px;
    height: 48px;
}

/* Frame overlay image */
.player-avatar-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.player-name-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.player-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    min-width: 0;
}

.player-nickname {
    font-size: 20px;
    font-weight: 700;
    color: #ff5500;
    white-space: nowrap;
}

.player-flag {
    width: 24px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 4px rgba(0,0,0,0.6);
}

/* Faceit + Steam next to flag, on the right */
.player-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
}

.player-header-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 64px;
}

.player-level-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.player-level-elo {
    font-size: 14px;
    color: white;
    font-weight: 700;
}

.player-level-elo .label {
    color: #ff8a3c;
    font-weight: 600;
}

.player-meta {
    font-size: 14px;
    line-height: 1.4;
    color: #ddd;
}

.player-meta span.label {
    color: #ff8a3c;
    font-weight: 600;
}

.player-link-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: brightness(1);
    transition: 0.15s ease;
}

.player-link-icon:hover {
    filter: brightness(1.6);
    transform: scale(1.08);
}

.player-link-icon.steam {
    width: 20px;
    height: 20px;
}

/* Ban info now INSIDE header, bottom-right */
.player-ban-info-box {
    position: absolute;
    right: 0;
    bottom: -4px;            /* tweak if you want it closer/further */
    padding-right: 4px;
    display: flex;
    justify-content: flex-end;
}

.ban-info {
    font-size: 12px;
    color: #7c0101;          /* dark red for main ban text */
    white-space: nowrap;
    display: inline-block;
margin-bottom: 5px;
}

.ban-info-text {
    /* full ban string, single line */
}

.ban-date {
    color: #ff0000;          /* light color for dates */
    text-decoration: none;   /* no underline */
    cursor: help;            /* hover shows tooltip */
font-weight: 500;
}

/* (old) Ban row below – not used anymore, can keep or delete */
.player-links-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

@media (max-width: 800px) {
    .input-row {
        flex-direction: column;
        gap: 10px;
    }
    button {
        width: 100%;
    }
    .players-container {
        flex-direction: column;
    }
    .player-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .player-links-row {
        justify-content: flex-start;
    }
}

.matches-table {
    display: grid;
    grid-template-columns: 170px 70px 80px 90px 110px 70px 1fr;
    gap: 6px;
    margin-top: 20px;
    font-size: 15px;
    font-weight: 700;
}

.header-row,
.match-row {
    display: contents;
}

.header-cell {
    background: #ff5500;
    color: white;
    padding: 12px 8px;
    text-align: center;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-cell {
    background: #070b23;
    padding: 12px 8px;
    border-radius: 6px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-cell.date {
    justify-content: flex-start;
    padding-left: 16px;
}

.match-cell.map {
    font-weight: bold;
    color: #ffaa33;
}

.match-cell.team svg {
    width: 22px;
    height: 22px;
    stroke: #ff5500;
}

.match-cell.link a {
    color: #ff5500;
    text-decoration: none;
}

.match-cell.link a:hover {
    text-decoration: underline;
}

.win {
    color: #00ff88;
}

.loss {
    color: #ff3333;
}

.player-center-block {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;   /* <-- NOT vertically centered */
    gap: 4px;
    min-width: 0;
    margin-top: 8px;                 /* ensure top aligned */
}