/*
  analytics.css — copied verbatim from
  supernova-desktop-application/css/dota-2/analytics.css so the marketing demo
  is pixel-identical to the app.

  Changes from the app version, each marked with a "Demo change" comment where
  it appears:
    1. Top-level offsets. The app's header is `position: fixed`, so content
       needed 56px/72px to clear it. The marketing topbar is sticky and already
       in flow, so those values left a large empty band — now 24px/40px.
    2. .widget-performance-history carries the widget surface, so the chart
       stops rendering as a darker box floating inside an unstyled cell.
    3. .widget-table-v1 / .table-v1-rows scroll instead of overflowing, so the
       Top Heroes list stays inside its fixed-height widget.
*/
/* Global CSS Variables */
html,
body {
    text-align: left;
    font-size: var(--font-size-sm);
    color: var(--color-white);
    font-family: var(--font-work-sans);
}

body {
    background: #1C1C24 url(https://files.supernova-analytics.com/sn-app-icons/Profile/Page-Background-dark.png);
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    background-attachment: fixed;
    /* Optional: locks background while content scrolls */
}


/* Make the container responsive with a grid instead of absolute positioning */
/* Container: columns only; rows are implicit */
.widget-container {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: 136px;
    /* each row is exactly 136px */
    grid-auto-flow: dense;
    /* fill holes if spans create gaps */
    position: relative;
    width: calc(100% - 112px);
    top: 40px;
    margin-bottom: 80px;
    left: 90px;
    min-height: 768px;
}


/* Button Content Layout */
.button-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Icon Sizing */
.icon-add {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

/* Text Styling */
.button-text {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-work-sans);
    color: white;
    text-align: center;
}

/* == Modes Tabs == */
.mode-tabs {
    display: inline-flex;
    position: relative;
    border: 1px solid #454857;
    border-radius: 4px;
}

.mode-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: calc(100% - 112px);
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    left: 90px;
    top: 24px;
}

/* Base button: no per-button border */
.mode-tab {
    appearance: none;
    border: 0;
    background: var(--Obsidian);
    color: #A8AAB0;
    padding: 10px 14px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
    font-family: var(--font-work-sans);
}

/* Single divider between segments, so seams stay consistent */
.mode-tab+.mode-tab {
    border-left: 1px solid #454857;
}

/* Rounded ends only */
.mode-tab:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.mode-tab:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Hover */
.mode-tab:hover {
    background: #272730;
}

/* Active: don’t change borders; draw a 1px highlight with inset shadow */
.mode-tab.is-active {
    color: #fff;
    background: var(--Obsidian);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
    z-index: 2;
}

/* Keyboard focus */
.mode-tab:focus-visible {
    outline: 1px solid #3CB4CC;
    outline-offset: 1px;
}


.pill[data-text="tag"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* the hero-pool tag icon; override per tag if more are ever added */
    --pill-icon: url("https://files.supernova-analytics.com/supernova-app-assets/Dota%202/Icons/Hero%20Pool%20Tags/Icon_Flexible.png");
}

.pill[data-text="tag"] .pill__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background: var(--pill-icon) center / contain no-repeat;
}



/* === Timeline Picklist === */

.timeline-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.timeline-icon {
    position: absolute;
    right: 12px;
    top: 16px;
    width: 12px;
    height: auto;
    pointer-events: none;
    filter: brightness(0) invert(1);
}

.timeline-picklist {
    width: 125px;
    height: 36px;
    padding-left: 12px;
    padding-right: 28px;
    border-radius: 4px;
    background-color: var(--Obsidian);
    border: 1px solid var(--Charcoal);
    color: #fff;
    font-family: var(--font-work-sans);
    font-size: 14px;
    appearance: none;
    cursor: pointer;
    background-image: none;
    box-sizing: border-box;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mode-wrapper {
    display: none;
}

/* Optional: Add a custom caret if needed */
/*

.timeline-picklist::after {
  content: '';
  background-image: url('/public/icon-chevron-down.svg');
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  pointer-events: none;
}
*/

/* Interactions */

.timeline-picklist:hover {
    background-color: #272730;
}


.timeline-picklist:focus,
.timeline-picklist:active {
    border: 1px solid white;
    outline: none !important;
    box-shadow: none !important;
}

.timeline-picklist:focus-visible {
    border: 1px solid #3CB4CC;
    outline: none !important;
    box-shadow: none !important;
}



/* == Career Stats Widget - 1 == */
.career-stats-widget-1 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--Obsidian);
    border: 1px solid var(--Charcoal);
    border-radius: 9px;
    color: var(--Silver);
    padding: 16px;

    /* responsive sizing inside grid */
    grid-column: 1 / 5;
    height: 326px;

}

/* Top Section */
.top {
    display: flex;
    position: relative;
    gap: 24px;
    margin-top: 32px;
}

.career-stats-heading {
    position: absolute;
    top: -34px;
    left: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-align: left;
}

/* Change Canvas size for Charts */
.kda-kpi canvas {
    width: 120px !important;
    height: 120px !important;
}

/* Left and Right KPIs */
.win-rate,
.kda-ratio {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.kda-kpi {
    position: relative;
}

.kda-ratio-icon {
    width: 124px;
    height: 124px;
    object-fit: contain;
}

.kda-group,
.win-rate-details {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.kda-label {
    font-size: 12px;
    color: var(--Silver);
}

.kda-number,
.win-rate-number {
    font-size: 22px;
    font-weight: 600;
    color: white;
    margin-top: 4px;
}

/* Breakdown Rows */
.kda-group-lines,
.win-loss-group {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 4px;
    text-align: center;
}

.kills,
.wins {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.kills-label {
    font-size: 14px;
    color: var(--Silver);
}

.kills-number,
.wins-number {
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.kills-line-icon {
    width: 48px;
    height: auto;
}

.kpi-stat-line {
    width: 50px;
    height: 4px;
    border-radius: 2px;
    background-color: var(--Charcoal);
    margin-bottom: 4px;
}

/* Divider */
.vertical-divider {
    width: 1px;
    background-color: var(--Charcoal);
    height: 240px;
    align-self: center;
}

/* Bottom Section */
.bottom {
    border-top: 1px solid var(--Charcoal);
    padding-top: 12px;
    margin-top: auto;
}

.bottom-kpi-group {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.current-rank {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.games-played {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.time-played,
.lp {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 14px;
    gap: 4px;
}

.current-rank-name,
.games-played-number,
.time-played-number,
.lp-number {
    font-size: 16px;
    font-weight: 500;
    color: white;
    margin-top: 4px;
}

.current-rank-name {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-rank {
    width: 22px;
    height: 22px;
    object-fit: cover;
}


/* == Individual Graph Style == */
/* ================================
   Individual Graph Widget
   ================================ */
.individual-graph {
    background: #15161a;
    border: 1px solid #2a2d34;
    border-radius: 12px;
    color: #f3f5f7;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.35);
    grid-column: 5 / 7;
    height: 288px !important;
    grid-row: 1;
}

.radar-widget {
    color: #e8ebf0;
    grid-column: 7 / 9 !important;
    height: unset !important;
    position: relative;
}

/* ---------- Header ---------- */
.individual-graph .card-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #22262c;
}

.individual-graph .card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.individual-graph .card-icon {
    width: 16px;
    height: 16px;
    background: url("/public/placeholders/icon.svg") no-repeat center / contain;
    opacity: 0.7;
}

/* ---------- Body ---------- */
.individual-graph .card-body {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}



/* Donut Chart */
.donut-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.donut {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-track {
    fill: none;
    stroke: #2a2d34;
    stroke-width: 6;
}

.donut-value {
    fill: none;
    stroke: #22c55e;
    /* default green */
    stroke-width: 6;
    stroke-linecap: round;
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.donut-sub {
    font-size: 12px;
    color: #aeb6c2;
}

.donut-num {
    font-size: 18px;
    font-weight: 600;
    color: #f3f5f7;
}






/* Side facts */
.facts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
}

.fact-label {
    color: #aeb6c2;
    font-size: 12px;
    margin-bottom: 2px;
}

.fact-value {
    font-weight: 600;
    color: #f3f5f7;
    font-size: 24px;
}

/* ---------- Footer ---------- */
.individual-graph .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0px 4px;
    border-top: 1px solid var(--Charcoal);
}

.footer-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* space between "Evenness" and row below */
}

.stat-inline {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.stat-num {
    font-size: 18px;
    font-weight: 500;
    color: #f3f5f7;
}

.stat-label {
    font-size: 12px;
    color: #aeb6c2;
}

/* Pill style */
.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.pill--soft {
    background: rgba(60, 180, 204, 0.15);
    /* teal at 15% opacity */
    color: white;
    /* text in full teal to match */
    border: 1px solid #3CB4CC;
    /* optional subtle border */
}

.pill.pill--soft{
    background: var(--pill-bg, rgba(60, 180, 204, 0.18)); /* fallback = your current blue */
    border: 1px solid var(--pill-border, rgba(60, 180, 204, 0.35));
    color: var(--pill-fg, #ffffff);
  }






/* Playstyle for the table-v1 component */




/* == Widget table-v1s - Top Champion== */
.widget-table-v1 {
    /* Demo change: flex column + clipped overflow so the scrollable rows
       region above stays within the widget's rounded border. */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--Obsidian);
    border: 1px solid var(--Charcoal);
    border-radius: 9px;
    color: var(--Silver);
    font-size: 13px;
    box-sizing: border-box;
    grid-column: 9 / 13;
    position: relative;
    height: 288px;
    /* adjust as needed */
    width: 100%;
}

/* Title */
.widget-table-v1 .widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    margin-bottom: 4px;
    padding-top: 16px;
    padding-left: 16px;
}

.widget-table-v1 .icon-table-v1 {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* ===== Header (edge-to-edge border, inner padding on cells) ===== */
.table-v1-header-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 6rem 6rem 6rem;
    /* Name | Games | KDA | WR */
    align-items: center;
    border-bottom: 1px solid var(--Charcoal);
    /* spans full width */
    color: var(--Silver);
    font-size: 12px;
}

.table-v1-header-row>div {
    padding: 6.5px 16px;
    text-align: right;
    /* inner padding */
}

.table-v1-header-row .table-v1-col {
    text-align: right;
}

.table-v1-header-row .table-v1-col--name {
    text-align: left;
}

/* ===== Rows (edge-to-edge border, inner padding on cells) ===== */
.table-v1-rows {
    display: block;
    /* Demo change: .widget-table-v1 is a fixed 288px tall, and in the app this
       container had no overflow handling — an 8-hero list simply spilled past
       the rounded border (the 5th row was visibly clipped). Making the widget a
       flex column and letting this region scroll keeps every row inside the
       widget. min-height:0 is required or the flex child refuses to shrink. */
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #454756 transparent;
}

.table-v1-rows::-webkit-scrollbar {
    width: 6px;
}

.table-v1-rows::-webkit-scrollbar-thumb {
    background: #454756;
    border-radius: 3px;
}

.table-v1-rows::-webkit-scrollbar-track {
    background: transparent;
}

.table-v1-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 6rem 6rem 6rem;
    align-items: center;
    border-bottom: 1px solid var(--Charcoal);
    /* spans full width */
    color: #fff;
}

.table-v1-row>div {
    padding: 6.5px 16px;
    /* inner padding */
}

.table-v1-row:last-child {
    border-bottom: 0;
}

.table-v1-row:hover {
    background: #272730;
}

/* Name cell (index + avatar + name) */
.table-v1-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    /* allow text truncation */
}

.table-v1-index {
    width: 16px;
    text-align: right;
    color: var(--Silver);
    flex: 0 0 auto;
}

.table-v1-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    border: #454857 1px solid;
}

.table-v1-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-v1-name {
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Numeric columns */
.table-v1-cell {
    text-align: right;
    font-weight: 500;
}

/* Demo change: win rate reads as plain data here, not a good/bad signal, so it
   matches the other numeric columns instead of being called out in green. */
.table-v1-winrate {
    color: var(--color-white);
}

/* Optional helpers for JS-driven coloring */
.table-v1-cell.is-positive {
    color: var(--Green);
}

.table-v1-cell.is-negative {
    color: #f42746;
}




/* ───────── Widget Base ───────── */
.widget {
    position: relative;
    width: auto;
    height: 136px;
    /* fixed height for minis */
    border-radius: 9px;
    background: #1C1C24;
    border: 1px solid var(--color-darkslategray-100);
    box-sizing: border-box;
    font-size: 14px;
    color: white;
    padding: 12px;
}

/* 1) Minis participate directly in the parent grid */
.mini-widgets {
    display: contents;
}

/* 2) Minis: 1 column each, all on the SAME row you choose */
.widget {
    position: relative;
    width: auto;
    height: 136px;
}

.widget-kill-participation {
    grid-column: 1 / 2;
    grid-row: 3;
    top: 70px;
}

.widget-gold {
    grid-column: 2 / 3;
    grid-row: 3;
    top: 70px;
}

.widget-creep-score {
    grid-column: 3 / 4;
    grid-row: 3;
    top: 70px;
}

.widget-damage {
    grid-column: 4 / 5;
    grid-row: 3;
    top: 70px;
}

/* 3) Map: same column band, starts on the row you choose, spans 4 rows tall */
.widget-map-control {
    grid-column: 1 / 5;
    grid-row: 4;
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 12px;
    background-image: url('https://files.supernova-analytics.com/supernova-app-assets/Dota%202/Images/Dota_Map_Control.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;
    top: 70px;
}

/* ───────── Heading with Icon ───────── */
.widget-heading {
    position: relative;
    display: block;
    /* no flex: lets ellipsis work on the text node */
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 22px;
    line-height: 1.2;

    /* Ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    /* Space for the icon (icon width + visual gap) */
    padding-left: 24px;
    /* adjust if your icon is wider/narrower */
}

/* Keep the icon where it was visually, without affecting text flow */
.widget-heading .icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    /* match your asset; 18–24px common */
    height: 16px;
    flex: none;
    /* harmless if any flex leaks in */
    pointer-events: none;
    user-select: none;
    object-fit: contain;
}

/* ───────── KPI Display ───────── */
.kpi-value {
    font-size: 24px;
    line-height: 30px;
    font-weight: 500;
    margin-bottom: 4px;
}

.kpi-meta {
    font-size: 12px;
    color: #A8AAAF;
    margin-bottom: 12px;

    /* Ellipsis */
    display: block;
    /* ensures width context */
    width: 100%;
    /* fill row */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.performance-bar-filled {
    height: 100%;
    border-radius: 3px 0 0 3px;
}

.performance-bar-remaining {
    flex: 1;
}


/* ───────── Map Control: Sub-KPI Layout ───────── */
.map-kpi-group {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.map-kpi {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    align-items: flex-start;
}

.map-kpi-label {
    font-size: 12px;
    color: white;
    margin-bottom: 4px;
}

.map-kpi-value {
    font-size: 18px;
    font-weight: 500;
    color: white;
    margin-bottom: 2px;
}

.map-kpi-meta {
    font-size: 12px;
    color: #A8AAAF;
    margin-bottom: 4px;
}

.map-kpi .performance-indicator.progress-bar {
    display: flex;
    height: 6px;
    width: 80%;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 2px;
}


/* keep bars simple */
/* put bars in normal flow so they sit under the KPI meta */
.performance-indicator {
    position: static !important;
}

.widget-performance-history {
    grid-column: 5 / 13;
    top: 0px;
    position: relative;
    grid-row: 3;
    /* Demo change: in the app this cell is unstyled and the nested .chart-tile
       painted its own darker box. Giving the cell the standard widget surface
       (and making .chart-tile transparent in charting-engine.css) makes the
       chart read as one widget, consistent with the rest of the grid. */
    background: #1C1C24;
    border: 1px solid var(--color-darkslategray-100);
    border-radius: 9px;
    box-sizing: border-box;
}

.radial-chart {
    position: relative;
}

.radial-chart .donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.radial-chart .donut-sub {
    font-size: 12px;
    line-height: 1.2;
    opacity: 0.75;
    margin-bottom: 6px;
}

.radial-chart .progress-number {
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
}

.radial-chart[data-barid="hero-pool-coverage"] {
    width: 110px;
    height: 110px;
    position: relative;
    /* for donut-center */
}

/* Canvas fills the container (override inline size) */
.radial-chart[data-barid="hero-pool-coverage"] canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}



/* ───────── Responsive tweaks ───────── */

@media screen and (max-width: 1680px) {
    .widget-container {
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(10, 1fr);
        min-height: 818px;
    }

    .widget-performance-history {
        grid-column: 4/11;
        top: 4px;
    }

    .career-stats-widget-1 {
        grid-column: 1 / 4;
        height: 296px;

    }

    .career-stats-heading {
        top: unset;
    }

    .kda-kpi canvas {
        width: 110px !important;
        height: 110px !important;
    }

    .kda-group,
    .win-rate-details {
        top: 38px;
        width: 80%;
    }

    .win-rate,
    .kda-ratio {
        margiN-top: 35px;
        gap: 14px;
        justify-content: flex-start;
    }

    .top {
        margin-top: 0px;
    }

    .kills-number,
    .wins-number {
        font-size: 16px;
    }

    .kda-group-lines,
    .win-loss-group {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 4px;
        text-align: center;
        flex-direction: row;
        width: 100%;
    }

    .kda-number,
    .win-rate-number {
        font-size: 18px;
    }


    .kpi-stat-line {
        width: 100%;
        height: 4px;
        border-radius: 2px;
        background-color: var(--Charcoal);
        margin-bottom: 4px;
    }

    .kills,
    .wins {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
        max-width: 60px;
    }

    .individual-graph {
        grid-column: 4 / 6;
    }

    .radar-widget {
        grid-column: 6 / 8 !important;
    }

    /* == Top table-v1 Row == */
    .table-v1-row,
    .table-v1-header-row,
    .lane-header-row,
    .lane-row {
        grid-template-columns: minmax(100px, 1fr) 5rem 4rem 5rem;
    }

    .table-v1-row>div {
        padding: 6.5px 8px;
    }

    /* == Mini Widgets == */

    .widget-kill-participation {
        grid-column: 1/2;
        grid-row: 3;
        top: 46px;
    }

    .widget-gold {
        grid-column: 2/4;
        grid-row: 3;
        top: 46px;
    }

    .widget-creep-score {
        grid-column: 1/3;
        grid-row: 4;
        top: 46px;
    }

    .widget-damage {
        grid-column: 3/4;
        grid-row: 4;
        top: 46px;
    }

    .widget-map-control {
        grid-column: 1/4;
        grid-row: 5;
        top: 46px;
    }



    .widget-table-v1 {
        grid-column: 8 / 11;
    }

}

@media screen and (max-width: 1460px) {

    .individual-graph {
        grid-column: 5 / 8;
        height: 288px !important;
    }

    .radar-widget {
        grid-column: 8 / 11 !important;
        height: 284px !important;
    }

    .widget-map-control {
        grid-column: 5 / 11;
        grid-row: 3;
        top: 0px;
    }

    .career-stats-widget-1 {
        grid-column: 1 / 5;
        height: 398px;
    }

    .widget-container {
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(10, minmax(0, 1fr));
        align-items: stretch;
    }

    .win-rate,
    .kda-ratio {
        margiN-top: 45px;
        gap: 24px;
    }

    .kda-kpi canvas {
        width: 130px !important;
        height: 130px !important;
    }

    .kda-group,
    .win-rate-details {
        top: 44px;
        width: 80%;
    }

    .kda-number,
    .win-rate-number {
        font-size: 22px;
    }

    .kda-group-lines,
    .win-loss-group {
        flex-direction: column;
    }

    .kills,
    .wins {
        max-width: unset;
        flex-direction: row;
    }

    .vertical-divider {
        height: 320px;
    }

    .widget-table-v1 {
        grid-column: 5 / 11;
        grid-row: 4;
        height: 284px;
    }

    .widget-table-v1 .widget-title {
        padding-top: 12px;
        padding-left: 12px;
    }

    .widget-gold {
        grid-column: 3 / 5;
        grid-row: 4;
        top: unset;
    }

    .widget-kill-participation {
        grid-column: 1 / 3;
        grid-row: 4;
        top: unset;
    }

    .widget-creep-score {
        grid-column: 1 / 3;
        grid-row: 5;
        top: unset;
    }

    .widget-damage {
        grid-column: 3 / 5;
        grid-row: 5;
        top: unset;
    }

    .widget-performance-history {
        grid-column: 1 / 11;
        top: unset;
        grid-row: 6;
    }

    .table-v1-row,
    .table-v1-header-row,
    .lane-header-row,
    .lane-row {
        grid-template-columns: minmax(100px, 1fr) 6rem 8rem 10rem;
    }

    .table-v1-row>div {
        padding: 6.5px 16px;
    }

    .widget-container {
        min-height: 1168px;
    }

    .kda-group-lines,
    .win-loss-group {
        gap: 12px;
    }

    .current-rank-name,
    .games-played-number,
    .time-played-number,
    .lp-number {
        font-size: 14px;
    }

    .current-rank-name {
        margin-top: 0px;
    }

    .bottom-kpi-group>div {
        flex: 1 1 0;
        /* allow equal growth/shrink */
        min-width: 0;
        /* critical for ellipsis inside flexbox */
    }

    .bottom-kpi-group {
        white-space: nowrap;
    }

    .bottom-kpi-group .current-rank-label,
    .bottom-kpi-group .games-played-label,
    .bottom-kpi-group .time-played-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
        max-width: 80%;
    }

    .radar-tooltip {
        max-width: 120px;
        left: 50% !important;
        transform: translateX(-50%);
    }

    .kills-label {
        font-size: 12px;
    }

}


@media screen and (max-width: 1000px) {

    .widget-container {
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        min-height: 1460px;
    }

    .kda-group-lines,
    .win-loss-group {
        flex-direction: row;
    }

    .win-rate,
    .kda-ratio {
        margiN-top: 28px;
        gap: 12px;
    }

    .kda-kpi canvas {
        width: 100px !important;
        height: 100px !important;
    }

    .kda-group,
    .win-rate-details {
        top: 36px;
        width: 80%;
    }

    .kda-number,
    .win-rate-number {
        font-size: 18px;
    }

    .vertical-divider {
        height: 200px;
    }

    .kills,
    .wins {
        flex-direction: column;
        max-width: 60px;
    }

    .career-stats-widget-1 {
        grid-column: 1 / 5;
        height: 258px;
    }

    .widget-gold {
        grid-column: 7 / 9;
        grid-row: 1;
        top: unset;
    }

    .widget-kill-participation {
        grid-column: 5 / 7;
        grid-row: 1;
        top: unset;
    }

    .widget-creep-score {
        grid-column: 5/7;
        grid-row: 2;
        top: unset;
    }

    .widget-damage {
        grid-column: 7/9;
        grid-row: 2;
        top: unset;
    }

    .widget-map-control {
        grid-column: 1 / 9;
        grid-row: 3;
        top: 0px;
    }

    .career-stats-widget-1 {
        padding: 12px;
    }

    .career-stats-heading {
        font-size: 14px;
    }

    .kda-number,
    .win-rate-number {
        margin-top: 0px;
    }

    .top {
        gap: 16px;
    }


    .individual-graph {
        grid-column: 1 / 5;
        height: 288px !important;
        grid-row: 4;
    }

    .radar-widget {
        grid-column: 5 / 9 !important;
        height: 288px !important;
        grid-row: 4;
    }

    .widget-table-v1 {
        grid-column: 1 / 9;
        grid-row: 6;
        height: 284px;
    }

    .widget-performance-history {
        grid-column: 1 / 9;
        top: unset;
        grid-row: 8;
    }
}




@media screen and (max-width: 900px) {


    .games-played {
        display: none;
    }

    .kills-number,
    .wins-number {
        font-size: 15px;
    }

    .widget-container {
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        min-height: 1460px;
    }





}

@media screen and (max-width: 768px) {
    .widget-container {
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        height: 130vh;
        width: unset;
        padding: 0 18px;
        left: 0;
        min-height: 1670px;
    }

    .career-stats-widget-1 {
        grid-column: 1 / 9;
        height: 258px;
        grid-row: 1;
    }

    .games-played {
        display: flex;
    }

    .kda-number,
    .win-rate-number {
        font-size: 18px;
    }



    /* == Mini Widgets == */
    .widget-kill-participation {
        grid-column: 1/3;
        top: unset;
        position: relative;
        grid-row: 3;
    }

    .widget-gold {
        grid-column: 3/5;
        top: unset;
        position: relative;
        grid-row: 3;
    }

    .widget-creep-score {
        grid-column: 5/7;
        top: unset;
        position: relative;
        grid-row: 3;
    }

    .widget-damage {
        grid-column: 7/9;
        top: unset;
        position: relative;
        grid-row: 3;
    }

    .widget-map-control {
        grid-column: 1/9;
        top: unset;
        position: relative;
        grid-row: 4;
    }

    .individual-graph {
        grid-row: 5;
    }

    .radar-widget {

        grid-row: 5 !important;
    }

    /* == Tables == */
    .widget-table-v1 {
        top: unset;
        grid-column: 1/9;
        grid-row: 7;
    }


    .widget-performance-history {
        grid-row: 9;
    }

    .mode-tabs-row {
        width: calc(100% - 36px);
        left: 18px;
    }


}

@media screen and (max-width: 580px) {
    .widget-container {
        height: 140vh;
        min-height: 1820px;
    }

    /* == Mini Widgets == */
    .widget-kill-participation {
        grid-column: 1/5;
    }

    .widget-gold {
        grid-column: 5/9;
    }

    .widget-creep-score {
        grid-column: 1/5;
        grid-row: 4;
    }

    .widget-damage {
        grid-column: 5/9;
        grid-row: 4;
    }

    .widget-map-control {
        grid-column: 1/9;
        grid-row: 5;

    }

    .individual-graph {
        grid-row: 6;
    }

    .radar-widget {
        grid-row: 6 !important;
    }

    /* == Tables == */

    .widget-table-v1 {
        grid-column: 1 / 9;
        grid-row: 8;
    }

    .table-v1-row,
    .table-v1-header-row,
    .lane-header-row,
    .lane-row {
        grid-template-columns: minmax(100px, 1fr) 5rem 7rem 7rem;
    }



    .widget-performance-history {
        grid-row: 10;
    }
}

@media screen and (max-width: 540px) {

    .individual-graph {
        grid-row: 6;
        grid-column: 1 / 9;
    }

    .radar-widget {
        grid-column: 1 / 9 !important;
        grid-row: 8;
    }

    .table-v1-row,
    .table-v1-header-row,
    .lane-header-row,
    .lane-row {
        grid-template-columns: minmax(100px, 1fr) 4rem 4rem 5rem;
    }

    .table-v1-row>div {
        padding: 6.5px 8px;
    }

    .table-v1-header-row>div {
        padding: 6.5px 8px;
        text-align: right;
    }

    .games-played {
        display: none;
    }

    .map-kpi {
        display: flex;
        flex-direction: column;
        /* assuming label, value, meta stack vertically */
        min-width: 0;
        /* critical so children can shrink */
    }

    .map-kpi-label,
    .map-kpi-meta {
        display: block;
        /* or inline-block */
        width: 100%;
        /* give the box a constraint */
        max-width: 100%;
        /* defensive */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
        color: #fff;
        margin-bottom: 4px;
    }

    /* if there's another flex parent above .map-kpi (e.g., .map-kpi-group), add: */
    .map-kpi-group {
        min-width: 0;
    }

    .mode-tabs {
        display: none;
    }

    .mode-wrapper {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .timeline-wrapper {
        position: relative;
        display: inline-flex;
        align-items: center;
        width: 100%;
    }

    .timeline-picklist {
        width: 100%;
    }

    .mode-icon {
        position: absolute;
        right: 12px;
        top: 16px;
        width: 12px;
        height: auto;
        pointer-events: none;
        filter: brightness(0) invert(1);
        display: block;
    }

    .mode-tabs-row {
        flex-direction: row-reverse;
    }

    .mode-picklist {
        height: 36px;
        padding: 0 12px;
        border-radius: 4px;
        background-color: var(--Obsidian);
        border: 1px solid var(--Charcoal);
        font-family: var(--font-work-sans);
        font-size: 14px;
        color: white;
        box-sizing: border-box;
        appearance: none;
        cursor: pointer;
        transition: border-color 0.2s ease, background-color 0.2s ease;
        width: 100%;
    }

    .mode-picklist:hover {
        background-color: #272730
    }

    .mode-picklist:active,
    .mode-picklist:focus {
        border: 1px solid white;
        outline: none !important;
        box-shadow: none !important;
    }

    .mode-picklist:focus-visible {
        border: 1px solid #3CB4CC;
        outline: none !important;
        box-shadow: none !important;
    }




    .mode-picklist {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        outline: none;
        box-shadow: none;
        /* if you added any */
    }

}

@media screen and (max-width: 400px) {

    .widget-container {
        min-height: 1980px;
    }


    .kda-group-lines,
    .win-loss-group {
        flex-direction: column;
    }

    .kills,
    .wins {
        flex-direction: row;
        max-width: unset
    }

    .career-stats-widget-1 {
        grid-column: 1 / 9;
        height: 320px;
        grid-row: 1;
    }

    .vertical-divider {
        height: 250px;
    }

    .widget-kill-participation {
        top: 62px;
    }

    .widget-gold {
        top: 62px;
    }

    .widget-creep-score {
        top: 62px;
    }

    .widget-damage {
        top: 62px;
    }

    .widget-map-control {
        top: 62px;
        height: 212px;
    }

    .map-kpi-group {
        min-width: 0;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .map-kpi .performance-indicator.progress-bar {
        width: 100%;
    }

    .map-kpi {
        display: flex;
        flex-direction: column;
        width: 46%;
        flex: unset;
    }

    .widget-table-v1 {
        top: 138px;
    }

    .widget-performance-history {
        top: 138px;
    }

    .individual-graph {
        top: 138px;
    }

    .radar-widget {
        top: 138px;
    }

    .table-v1-avatar {
        display: none;
    }

    .table-v1-row,
    .table-v1-header-row,
    .lane-header-row,
    .lane-row {
        min-height: 40px;
    }


}
