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

body {
    font: 16px/1.4 Arial, sans-serif;
    background: var(--page-bg);
    color: var(--page-text);
}

/* TEMA AMARELO / PRETO */
.theme-yellow {
    --page-bg: #ece8dc;
    --page-text: #111;

    --panel-bg: #f4efe2;
    --panel-soft: #fffdf8;
    --panel-border: #111;

    --accent: #e0b400;
    --accent-soft: #f5d64a;
    --accent-contrast: #111;

    --muted-text: #4a4a4a;
    --input-bg: #fffefb;
    --shadow: rgba(0, 0, 0, 0.08);

    --table-thead-bg: #f4efe2;
    --table-odd-bg: #fffdf8;
    --table-even-bg: #f4efe2;
    --table-hover-bg: #f5d64a;
}

/* TEMA AZUL / BRANCO */
.theme-blue {
    --page-bg: #e8edf3;
    --page-text: #102033;

    --panel-bg: #f3f7fb;
    --panel-soft: #ffffff;
    --panel-border: #1b3f6b;

    --accent: #205db6;
    --accent-soft: #5d8fd8;
    --accent-contrast: #ffffff;

    --muted-text: #4a5f78;
    --input-bg: #ffffff;
    --shadow: rgba(16, 32, 51, 0.08);

    --table-thead-bg: #f3f7fb;
    --table-odd-bg: #ffffff;
    --table-even-bg: #f3f7fb;
    --table-hover-bg: #5d8fd8;
}

/* HEADER */
.topbar {
    width: min(1100px, calc(100% - 40px));
    margin: 64px auto 64px;
    position: relative;
    font-size: large;
    font-weight: bold;
}

.header-strip {
    min-height: 52px;
    border: 2px solid var(--panel-border);
    background: var(--panel-soft);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 12px;
    gap: 14px;
    box-shadow: 0 2px 10px var(--shadow);
}

.brand {
    position: absolute;
    left: 20px;
    top: -40px;
    transform: none;

    width: 90px;
    height: 180px; /* aumente para caber os 3 blocos */

    display: grid;

    /* 3 linhas: topo menor, meio maior, base menor */
    grid-template-rows: 1fr 2fr 1fr;

    border: 2px solid var(--panel-border);
    background: var(--panel-soft);
    overflow: hidden;
    z-index: 3;
}

/* caixas */
.brand-top,
.brand-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    background: var(--accent-soft);
    font-size: large;
    color: var(--accent-contrast);
    font-weight: bold;
    border-bottom: 1px solid var(--panel-border);
}

.brand-bottom {
    border-top: 1px solid var(--panel-border);
    border-bottom: 0;
}

/* imagem central (destaque) */
.brand-img {
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: bold;
}

.brand-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    margin-left: auto;
}

.menu a {
    text-decoration: none;
    color: var(--page-text);
    border-left: 2px solid var(--panel-border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    background: transparent;
    transition: background 0.2s, color 0.2s;
}

.menu a:last-of-type {
    border-right: 2px solid var(--panel-border);
}

.menu a:hover,
.menu a.active {
    background: var(--accent);
    color: var(--accent-contrast);
}

.search {
    position: relative;
    width: 170px;
    min-width: 170px;
}

.search input {
    width: 100%;
    height: 38px;
    border: 2px solid var(--panel-border);
    background: var(--input-bg);
    color: var(--page-text);
    padding: 0 42px 0 10px;
    outline: none;
}

.search input::placeholder {
    color: var(--muted-text);
}

.search button {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: 18px;
    cursor: pointer;
}

.container {
    width: min(75%, calc(75% - 40px));
    margin: 128px auto 128px;
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    grid-template-rows: auto 1fr auto;
    grid-template-areas: 
        "left header right"
        "left main right"
        "left footer right";
    gap: 32px;
    align-items: start;
}

.left,
.right {
    border: 2px solid var(--panel-border);
    background: var(--panel-bg);
    padding: 12px;
    box-shadow: 0 2px 10px var(--shadow);
    height: auto;
}

.left {
    grid-area: left;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.left section + section {
    border-top: 1px solid var(--panel-border);
    padding-top: 18px;
}

.left h3,
.right h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.left p {
    color: var(--muted-text);
}

#next,
#previous {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.score {
    font-size: 18px;
    font-weight: bold;
    color: var(--page-text);
}

.score > div {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0 5px;
}

.score > div > img {
    width: 32px;
    height: 32px;
}

.caption {
    font-size: 14px;
}

.data {
    color: var(--muted-text);
    font-size: 14px;
    font-weight: bold;
}

.local {
    color: var(--muted-text);
    font-size: 14px;
    font-weight: bold;

}

.right {
    grid-area: right;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 12px 8px;
    overflow: hidden;
}

.right > a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border: 2px solid var(--panel-border);
    background: var(--panel-bg);
    box-shadow: 0 2px 2px var(--shadow);
    margin: 0 auto;
}

.right > a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.right > a > img {
    width: 100%;
    height: auto;
    display: block;
}

.right > a > span {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 16px;
    font-weight: bold;
    color: var(--muted-text);
}

header {
    grid-area: header;
    font-size: 24px;
    font-weight: bold;
    color: var(--muted-text);
    background-color: var(--panel-soft);
    border: 2px solid var(--panel-border);
    padding: 12px;
}

main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

main.post,
main.torneio,
main.elenco,
main.jogador,
.video-desc {
    line-height: 1.5em;
    font-size: 16px;
    color: var(--muted-text);
    background-color: var(--panel-soft);
    border: 2px solid var(--panel-border);
    padding: 12px 18px;
}

.card {
    display: flex;
    border: 2px solid var(--panel-border);
    background: var(--panel-bg);
    min-height: 120px;
    box-shadow: 0 2px 10px var(--shadow);
}

.card > img {
    width: 128px;
    height: 128px;
    max-width: 128px;
    max-height: 128px;
}

.card > .content {
    padding: 16px 18px;
    flex: 1;
}

.card > .content > .title {
    display: block;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 24px;
    color: var(--page-text);
}

.card > .content > .title:hover {
    color: var(--accent);
}

.card > .content > .description {
    text-decoration: none;
    font-size: 16px;
    color: var(--muted-text);
}

.card > .content > .description:hover {
    color: var(--accent);
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.pagination > a {
    text-decoration: none;
    color: var(--page-text);
    border: 2px solid var(--panel-border);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    background: transparent;
    transition: background 0.2s, color 0.2s;
}

.pagination > a:hover,
.pagination > a.active {
    background: var(--accent);
    color: var(--accent-contrast);
}

.tabset > input[type="radio"] {
    position: absolute;
    left: -200vw;
}

.tabset .tab-panel {
    display: none;
}

.tabset > .tab-panels > .tab-panel {
    display: none;
}

.tabset:has(> input:nth-of-type(1):checked) > .tab-panels > .tab-panel:nth-of-type(1) {
    display: block;
}

.tabset:has(> input:nth-of-type(2):checked) > .tab-panels > .tab-panel:nth-of-type(2) {
    display: block;
}

.tabset > label {
    position: relative;
    display: inline-block;
    padding: 15px 15px 25px;
    border: 1px solid transparent;
    border-bottom: 0;
    cursor: pointer;
    font-weight: 600;
}

.tabset > label::after {
    content: "";
    position: absolute;
    left: 15px;
    bottom: 10px;
    width: 22px;
    height: 4px;
    background: #8d8d8d;
}

input:focus-visible + label {
    outline: 2px solid rgba(0,102,204,1);
    border-radius: 3px;
}

.tabset > label:hover,
.tabset > input:focus + label,
.tabset > input:checked + label {
    color: #06c;
}

.tabset > label:hover::after,
.tabset > input:focus + label::after,
.tabset > input:checked + label::after {
    background: #06c;
}

.tabset > input:checked + label {
    border-color: #ccc;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

.tab-panel {
    padding: 30px 0;
    border-top: 1px solid #ccc;
}

/* reset só dentro do componente */
.timeline ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---------- 1º nível: século ---------- */

.timeline > ul > li {
    margin-bottom: 30px;
}

.timeline > ul::before {
    content: attr(aria-label);
    display: inline-block;
    margin-bottom: 10px;
    border: 2px solid #000;
    border-radius: 5px 10px;
    padding: 10px;
    font-weight: bold;
}

/* ---------- 2º nível: décadas ---------- */

.timeline > ul > li > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.timeline > ul > li > ul > li {
    display: block;
    border: 2px solid #000;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
}

.timeline > ul > li > ul > li.active {
    background-color: #333;
    color: #fff;
    cursor: pointer;
}

.timeline > ul > li > ul > li.active:hover {
    background-color: #ccc;
}

.plantel > ul[aria-label] {
    list-style: none;
    margin: 30px 0 0 40px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    align-items: flex-start;
}

/* caixa do título */
.plantel > ul[aria-label]::before {
    content: attr(aria-label);
    display: block;
    flex-basis: 100%;
    width: 190px;
    padding: 22px 28px;
    border: 1.5px solid #4a79b8;
    border-radius: 14px;
    background: #f7f7f7;
    color: #111;
    font-size: 18px;
    box-sizing: border-box;
    margin-bottom: 18px;
}

/* cada item */
.plantel > ul[aria-label] > li {
    width: 150px;
    text-align: center;
    font-size: 18px;
    color: #111;
}

/* imagem */
.plantel > ul[aria-label] > li >  a > img {
    display: block;
    width: 150px;
    height: 180px;
    object-fit: cover;
    background: #7fa7d6;
    margin: 0 auto 14px auto;
    box-sizing: border-box;
}

.plantel > ul[aria-label] > li::after {
    content: attr(data-label);
    display: block;
    margin-top: 14px;
}

.media > video {
    width: 100%;
    max-width: 960px;
    height: auto;
    display: block;
    margin: 0 auto;
    background: #000;
}

.media > div {
    margin-top: 12px;
    color: var(--muted-text);
    font-size: 14px;
}

dt {
    display: inline;
    border-bottom: 3px dotted currentColor;
}

dd {
    position: absolute;
    top: 1.5em;
    left: 0;
    visibility: hidden;
    width: fit-content;
    background: var(--panel-border);
    color: var(--panel-bg);
    padding: 8px;
    border-radius: 6px;
    white-space: nowrap;
}

dl {
    display: inline;
    position: relative;
}

dl:hover dd {
    visibility: visible;
}

blockquote {
    border-left: 4px solid var(--panel-border);
    padding-left: 16px;
    margin-left: 0;
    margin-right: 0;
    color: var(--panel-border);
}

code {
    font-family: Consolas, monospace;
    background-color: var(--panel-bg);
    padding: 2px 4px;
    border-radius: 3px;
}

ul.task-list {
    list-style-type: none;
    padding-left: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table > thead {
    background-color: var(--table-thead-bg);
}

table > tbody > tr:nth-child(odd) {
    background-color: var(--table-odd-bg);
}

table > tbody > tr:nth-child(even) {
    background-color: var(--table-even-bg);
}

table > tbody > tr:hover {
    background-color: var(--table-hover-bg);
}

table > thead > tr {
    text-align: left;
}

table > thead > tr > th {
    padding: 12px;
    border: 1px solid var(--table-thead-bg);
}

table > tbody > tr > td {
    padding: 12px;
    border: 1px solid var(--table-thead-bg);
}

table > tfoot > tr {
    background-color: var(--table-thead-bg);
}
