/* =================================================================
   MIX STATS — Stiluri în temă cu panelul principal
   Tactical dark, accent amber, identic cu mix_panel.
   ================================================================= */

/* FIX #4: Google Fonts via https — fallback safe pe toate browserele */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=DM+Sans:wght@400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-0:        #0a0a0c;
    --bg-1:        #131317;
    --bg-2:        #1c1c22;
    --bg-3:        #25252e;
    --border:      #2e2e38;
    --border-hi:   #3a3a46;
    --text:        #f4f4f5;
    --text-dim:    #b8b8c2;
    --text-mute:   #74747e;
    --text-header: #ffffff;
    --accent:      #ff8c1a;
    --accent-2:    #ffaa3d;
    --accent-dim:  rgba(255,140,26,0.12);
    --green:       #22c55e;
    --green-soft:  #4ade80;
    --red:         #ef4444;
    --info:        #3b82f6;

    --font-display: 'Oswald', Arial, sans-serif;
    --font-body:    'DM Sans', Arial, system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', 'Courier New', ui-monospace, monospace;
}

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

html, body {
    background: var(--bg-0);
    color: var(--text);
    font: 14px/1.5 var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    background-image:
        radial-gradient(circle at 0% 0%, rgba(255,140,26,0.04) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(255,140,26,0.03) 0%, transparent 50%);
}

.bg-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(255,140,26,0.02) 0 1px, transparent 1px 3px);
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-2); }

/* =================================================================
   HEADER
   ================================================================= */
.site-head {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.site-head .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.site-head h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-header);
    text-transform: uppercase;
}
.site-head .logo-ct {
    color: var(--accent);
    font-size: 32px;
    text-shadow: 0 0 12px rgba(255,140,26,0.4);
}
.site-head h1::before {
    content: '▮ ';
    color: var(--accent);
    margin-right: 4px;
}

/* =================================================================
   TABS
   ================================================================= */
.tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid var(--border-hi);
    margin-bottom: 24px;
    padding-bottom: 0;
    flex-wrap: wrap;
}
.tab {
    color: var(--text-dim);
    text-decoration: none;
    padding: 10px 22px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    position: relative;
    top: 1px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}
.tab:hover {
    color: var(--accent);
    background: var(--bg-2);
}
.tab.active {
    color: var(--accent);
    background: var(--bg-1);
    border-color: var(--border-hi);
    border-bottom-color: var(--bg-1);
}
.tab .tab-ico {
    font-size: 16px;
    opacity: 0.85;
}

/* =================================================================
   CONTENT / DASHBOARD
   ================================================================= */
.content {
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
    color: var(--text-header);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::before {
    content: '▮';
    color: var(--accent);
}

.dash {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.top5, .last5 {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 18px 20px;
}

/* =================================================================
   TABELE
   ================================================================= */
table.mix {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.mix thead th {
    background: var(--bg-2);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--accent);
}
table.mix thead th.num,
table.mix thead th.center { text-align: center; }
table.mix tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
table.mix tbody td.num,
table.mix tbody td.center { text-align: center; }
table.mix tbody tr:hover { background: var(--bg-2); }
table.mix tbody tr:last-child td { border-bottom: 0; }

.notice {
    text-align: center;
    color: var(--text-mute);
    padding: 24px !important;
    font-style: italic;
}

/* Scores */
.score-win {
    color: var(--green-soft);
    font-weight: 700;
}
.score-lose {
    color: var(--red);
    font-weight: 700;
}
.team-draw { color: var(--text-mute); }
.score-sep { color: var(--text-mute); margin: 0 3px; }

.team-ct  { color: #60a5fa; font-weight: 600; }
.team-t   { color: #f97316; font-weight: 600; }

/* Name cell cu icon */
.name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.name-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* Avatar */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-hi);
    flex-shrink: 0;
}

/* Rank badge */
.rank-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* View link */
.view-link {
    display: inline-block;
    padding: 3px 10px;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: 3px;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}
.view-link:hover {
    background: var(--accent);
    color: var(--bg-0);
}

/* =================================================================
   PAGINATION
   ================================================================= */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 10px;
    flex-wrap: wrap;
}
.pager a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-hi);
    color: var(--text-dim);
    border-radius: 3px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}
.pager a:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}
.pager span {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-mute);
    padding: 6px 12px;
}

/* =================================================================
   ERROR / EMPTY
   ================================================================= */
.error-box {
    background: rgba(239,68,68,0.12);
    border-left: 3px solid var(--red);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 3px;
    margin-bottom: 18px;
    font-family: var(--font-mono);
    font-size: 13px;
}

/* =================================================================
   FOOTER
   ================================================================= */
.site-foot {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-mute);
    font-size: 13px;
}
.btn-ok {
    background: var(--accent);
    color: var(--bg-0);
    border: 0;
    padding: 9px 30px;
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-ok:hover { background: var(--accent-2); }

/* =================================================================
   PLAYER DETAIL PAGE — FIX #4: layout clar, carduri vizibile
   ================================================================= */
.player-header,
.profile-head {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.player-header .avatar-big {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
    flex-shrink: 0;
}
.profile-head .name-icon {
    width: 68px;
    height: 68px;
    font-size: 26px;
    border: 2px solid var(--accent);
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}
.player-header .player-meta h2,
.profile-head .p-name {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-header);
    line-height: 1.1;
}
.player-header .player-meta .steamid,
.profile-head .p-sub {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-mute);
    margin-bottom: 8px;
    word-break: break-all;
}
.profile-head .rank {
    display: inline-block;
    padding: 4px 14px;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: 3px;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =================================================================
   STATS GRID — FIX #4: explicit 5 coloane pe desktop,
   2 pe mobil, cu numere mari bine vizibile
   ================================================================= */
.profile-stats-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
.stat-card,
.stat-box {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s;
}
.stat-card:hover,
.stat-box:hover {
    border-color: var(--border-hi);
}
/* Bara colorata stanga */
.stat-card::before,
.stat-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--accent);
    border-radius: 6px 0 0 6px;
}
/* Label mic sus */
.stat-card .k,
.stat-box .label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-mute);
    display: block;
    white-space: nowrap;
}
/* Valoare mare jos */
.stat-card .v,
.stat-box .value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    display: block;
    letter-spacing: 1px;
}

/* Highlight carduri importante */
.stat-card:nth-child(1) .v,   /* Points */
.stat-card:nth-child(5) .v {  /* K/D */
    color: var(--accent);
}
.stat-card:nth-child(4) .v {  /* Winrate */
    color: var(--green-soft);
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 900px) {
    .profile-stats-grid,
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .container { padding: 12px; }
    .site-head h1 { font-size: 20px; }
    .tab { padding: 8px 12px; font-size: 12px; }
    .tab .tab-ico { display: none; }
    table.mix { font-size: 12px; }
    table.mix thead th, table.mix tbody td { padding: 7px 6px; }
    .profile-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .profile-head .p-name { font-size: 22px; }
    .profile-stats-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-card .v,
    .stat-box .value {
        font-size: 26px;
    }
    /* Ascunde coloane mai putin importante pe mobil */
    table.mix th:nth-child(9),
    table.mix td:nth-child(9) { display: none; }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }
