:root{
    --bg:#f6f8fc;
    --panel:#ffffff;
    --panel2:#f3f6fd;
    --panel3:#e9eef8;

    --border:#dbe3f2;
    --border2:#c9d4ea;

    --text:#0f172a;
    --muted:#5b6b8c;

    --accent:#3b82f6;
    --accent2:#06b6d4;

    --good:#16a34a;
    --warn:#d97706;
    --bad:#dc2626;

    --radius:16px;

    --shadow: 0 10px 30px rgba(16,24,40,.08);
    --shadow2: 0 4px 14px rgba(16,24,40,.06);

    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}


*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
    margin:0;
    font-family: var(--sans);
    background:
            radial-gradient(900px 400px at 20% -10%, rgba(59,130,246,.10), transparent 60%),
            radial-gradient(700px 400px at 100% 0%, rgba(6,182,212,.08), transparent 55%),
            var(--bg);
    color:var(--text);
}

.container{ width:min(1150px, calc(100% - 32px)); margin:0 auto; }
.muted{ color:var(--muted); }
.small{ font-size:12px; }
code{
    font-family: var(--mono);
    background: rgba(255,255,255,.05);
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.08);
}

/* ---------- Topbar — red theme ---------- */
.topbar{
    position:sticky; top:0; z-index:10;

    background:
            linear-gradient(180deg, #b91c1c, #991b1b);

    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,.15);
    box-shadow: 0 8px 24px rgba(185,28,28,.25);
}
.topbar__inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding: 14px 0;
}
.brand{ display:flex; gap:10px; align-items:center; }
.brand__dot{
    width:10px;
    height:10px;
    border-radius:50%;
    background: #ffffff;
    box-shadow: 0 0 0 6px rgba(255,255,255,.25);
}
.brand__stack{ display:flex; flex-direction:column; line-height:1.1; }
.brand__name{ font-weight:950; letter-spacing:.2px; font-size: 16px; }
.brand__sub{ margin-top:2px; }

.topbar .brand__name{
    color: #ffffff;
}

.topbar .brand__sub{
    color: rgba(255,255,255,.85);
}


/* ---------- Layout ---------- */
.layout{
    display:grid;
    grid-template-columns: 340px 1fr;
    gap: 18px;
    padding: 18px 0 26px;
}
@media (max-width: 900px){
    .layout{ grid-template-columns: 1fr; }
}

/* ---------- Infobox ---------- */
.infobox{
    border:1px solid var(--border);
    background: linear-gradient(180deg, #ffffff, #f9fbff);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow2);
    position: sticky;
    top: 74px;
    align-self: start;
}
@media (max-width: 900px){ .infobox{ position: static; } }

.infobox__title{
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-bottom: 10px;
    font-weight: 950;
}
.infobox__sectionTitle{
    font-weight: 950;
    color: var(--muted);
    margin: 12px 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .7px;
}
.infobox__list{ margin:0; }
.infobox__row{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,.08);
}
.infobox__row dt{ color: var(--muted); }
.infobox__row dd{ margin:0; text-align:right; font-weight: 800; }

.infobox__links{ display:flex; flex-wrap:wrap; gap:8px; }
.pill{
    display:inline-flex;
    align-items:center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border:1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.03);
    color: var(--text);
    text-decoration:none;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.pill:hover{
    transform: translateY(-1px);
    border-color: rgba(110,168,255,.40);
    background: rgba(110,168,255,.08);
}

/* Team logo in infobox */
.infobox__logoWrap{
    display:flex;
    justify-content:center;
    align-items:center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.infobox__logo{
    max-width: 160px;
    max-height: 90px;
    object-fit: contain;

    border-radius: 14px;
    background: #ffffff;
    padding: 10px;

    border: 1px solid var(--border);
    box-shadow: var(--shadow2);
}

/* ---------- Content cards ---------- */
.content{ min-width:0; display:grid; gap:14px; }
.card{
    border:1px solid var(--border);
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
}
.card__header{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.card__title{
    margin:0;
    font-size: 18px;
    font-weight: 950;
    letter-spacing:.2px;
}

/* ---------- Tabs (years) as a toggle bar ---------- */
.yearTabs{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    justify-content:flex-end;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f2f5fc;
}

.yearBtn{
    border:1px solid transparent;
    background: transparent;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 999px;
    cursor:pointer;
    font-weight: 900;
    transition: all .12s ease;
}

.yearBtn:hover{
    background: #e6edff;
    color: var(--text);
}

.yearBtn.is-active{
    color: #1e293b;
    background: linear-gradient(180deg, #dbe8ff, #eef4ff);
    border-color: #bfdbfe;
    box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}
/* ---------- Section headers ---------- */
.sectionHeader{
    margin: 18px 0 12px;
    padding: 12px 14px;

    display:flex;
    align-items:center;
    gap: 10px;

    border: 1px solid var(--border);
    border-left: 6px solid var(--accent);

    background:
            linear-gradient(90deg, rgba(59,130,246,.10), rgba(59,130,246,.02)),
            #ffffff;

    border-radius: 14px;

    color: var(--text);
    font-size: 13px;
    letter-spacing: .9px;
    font-weight: 1000;
    text-transform: uppercase;

    box-shadow: 0 4px 12px rgba(59,130,246,.08);
}

/* subtle underline glow */
.sectionHeader::after{
    content:"";
    flex:1;
    height:1px;
    background: linear-gradient(90deg, rgba(59,130,246,.35), transparent);
    margin-left: 8px;
}


/* ---------- Timeline ---------- */
.timelineBullets{
    margin: 12px 0 0;
    padding-left: 18px;
    display:grid;
    gap: 10px;
}
.timelineBullets li{
    line-height: 1.4;
    color: #0f172a; /* quase preto */
}
.timelineBullets .tline{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}
.timelineBullets .tdate{
    font-family: var(--mono);
    font-weight: 900;
    color: #334155;
    min-width: 110px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #eef2ff;
}
.timelineBullets .ttext{
    font-size: 13px;
    color: #020617; /* preto forte */
}

/* ---------- Tables ---------- */
.table{
    width:100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
}
.table thead th{
    background: linear-gradient(180deg, #eef3ff, #f8faff);
    color: #1e293b;
    font-weight: 1000;
    font-size: 12px;
    letter-spacing: .7px;
    text-transform: uppercase;

    padding: 12px 12px;
    border-bottom: 1px solid var(--border);
}
.table tbody td{
    padding: 12px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    vertical-align: middle;
}
.table tbody tr:last-child td{ border-bottom: none; }

.table tbody tr:nth-child(odd){
    background: #fafcff;
}
.table tbody tr:hover{
    background: #eef4ff;
}
.table tbody td:first-child{
    font-weight: 950;
    color: rgba(234,240,255,.98);
}
.table tbody td.muted{
    color: rgba(169,182,214,.95);
}

/* Nice alignment for smaller meta columns */
.table td[data-label="Joined"],
.table td[data-label="Left"],
.table td[data-label="Time"]{
    font-family: var(--mono);
    font-size: 12px;
}

/* ---------- Mobile tables (label mode) ---------- */
@media (max-width: 700px){
    .table thead{ display:none; }
    .table, .table tbody, .table tr, .table td{ display:block; width:100%; }
    .table tr{
        border-top: 1px solid rgba(255,255,255,.08);
        padding: 10px 10px;
    }
    .table tbody td{
        border: none;
        padding: 7px 2px;
        display:flex;
        justify-content:space-between;
        gap: 10px;
    }
    .table tbody td::before{
        content: attr(data-label);
        color: rgba(169,182,214,.90);
        font-size: 12px;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .6px;
    }
}

/* ---------- Empty ---------- */
.empty{
    margin-top: 10px;
    padding: 12px 12px;
    border: 1px dashed rgba(255,255,255,.18);
    border-radius: 14px;
    background: rgba(255,255,255,.02);
}

/* ---------- Accordion (Former) ---------- */
.accordion{ display:grid; gap: 10px; margin-top: 10px; }

.accItem{
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0,0,0,.08);
    box-shadow: var(--shadow2);
}

.accHeader{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(180deg, rgba(110,168,255,.16), rgba(255,255,255,.015));
    border-bottom: 1px solid rgba(255,255,255,.08);
    transition: background .12s ease;
}
.accHeader:hover{ background: rgba(110,168,255,.10); }

.accTitle{
    font-weight: 950;
    letter-spacing: .85px;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--text);
    display:flex;
    align-items:center;
    gap: 10px;
}
.accCount{
    font-weight: 950;
    font-size: 12px;
    color: rgba(169,182,214,.95);
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.03);
    padding: 2px 8px;
    border-radius: 999px;
}

.accChevron{
    width: 30px;
    height: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.03);
    display:grid;
    place-items:center;
    transition: transform .16s ease, background .12s ease;
    font-weight: 950;
}

.accBody{
    max-height: 0;
    overflow: hidden;
    transition: max-height .22s ease;
}

/* Open state */
.accItem[data-open="true"] .accChevron{
    transform: rotate(180deg);
    background: rgba(110,168,255,.10);
}
.accItem[data-open="true"] .accBody{
    max-height: 1200px; /* suficiente para tabelas */
}

/* ---------- Role cell (sprite + badges) ---------- */
.roleCell{
    display:flex;
    align-items:center;
    gap: 10px;
}

.roleIconSprite{
    width: 32px;
    height: 32px;
    display: inline-block;
    position: relative;
    background-image: url("./assets/roles/RoleSprite.webp");
    background-repeat: no-repeat;
    background-size: 134px 134px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

.roleIconSprite::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius: 10px;
    border:1px solid rgba(255,255,255,.10);
    pointer-events:none;
}

/* Badges */
.roleIconSprite.is-sub::after,
.roleIconSprite.is-inactive::after{
    position:absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display:grid;
    place-items:center;
    font-size: 11px;
    font-weight: 950;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 6px 14px rgba(0,0,0,.35);
}
.roleIconSprite.is-sub::after{
    content:"S";
    background: rgba(110,168,255,.28);
    color: var(--text);
}
.roleIconSprite.is-inactive::after{
    content:"I";
    background: rgba(251,191,36,.20);
    color: var(--text);
}

/* Sprite positions */
.role-top     { background-position: -34px   0px; }
.role-jungle  { background-position: -68px   0px; }
.role-adc     { background-position: -102px  0px; }
.role-support { background-position: -34px  -34px; }
.role-mid     { background-position: -68px  -34px; }
.role-player  { background-position: -68px -102px; }

/* Footer */
.footer{
    border-top:1px solid rgba(255,255,255,.08);
    padding: 18px 0;
}

/* Flag column */
.col-flag{
    width: 44px;
}

.flagCell{
    width: 44px;
}

.flag{
    width: 22px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 6px 14px rgba(0,0,0,.25);
    vertical-align: middle;
}

/* keep flag centered */
.flagWrap{
    display:flex;
    align-items:center;
    justify-content:center;
}


/* =========================
   Compact icons inside tables — FIXED scaling
   ========================= */

.table .roleIconSprite{
    width: 20px;
    height: 20px;
    border-radius: 6px;

    /* scale whole sprite */
    background-size: 83.75px 83.75px;
}

/* scaled positions (original × 0.625) */
.table .role-top     { background-position: -21.25px   0px; }
.table .role-jungle  { background-position: -42.5px    0px; }
.table .role-adc     { background-position: -63.75px   0px; }
.table .role-support { background-position: -21.25px -21.25px; }
.table .role-mid     { background-position: -42.5px  -21.25px; }
.table .role-player  { background-position: -42.5px  -63.75px; }

/* smaller badge */
.table .roleIconSprite.is-sub::after,
.table .roleIconSprite.is-inactive::after{
    width: 14px;
    height: 14px;
    font-size: 9px;
    top: -5px;
    right: -5px;
}

/* tighter layout */
.table .roleCell{
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
}

/* Added because of opgg links */
.playerLink{
    color: var(--accent);
    text-decoration: none;
    font-weight: 950;
}

.playerLink:hover{
    text-decoration: underline;
    text-underline-offset: 2px;
}