* {
  box-sizing: border-box;
  }

body {
margin: 0;
padding: 0;
background: #262522;
color: #d9d9d9;
font-family: Arial, Helvetica, sans-serif;
}

.app-shell {
min-height: 100vh;
display: grid;
grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
position: sticky;
top: 0;
height: 100vh;
background: #211f1d;
border-right: 1px solid #44423f;
padding: 24px 14px;
display: flex;
flex-direction: column;
}

.sidebar-brand {
color: #ffffff;
font-size: 20px;
font-weight: 700;
padding: 4px 12px 24px;
border-bottom: 1px solid #3a3835;
margin-bottom: 14px;
}

.sidebar-brand span {
color: #81b64c;
}

.sidebar-menu {
display: flex;
flex-direction: column;
gap: 4px;
}

.menu-item {
display: block;
padding: 11px 12px;
border-radius: 5px;
color: #aaa8a5;
text-decoration: none;
font-size: 14px;
font-weight: 600;
}

.menu-item:hover {
background: #302e2b;
color: #ffffff;
}

.menu-item.active {
background: #3a3835;
color: #ffffff;
box-shadow: inset 3px 0 0 #81b64c;
}

.menu-item.future {
color: #77746f;
cursor: default;
}

.menu-item.future:hover {
background: transparent;
color: #77746f;
}

.main-content {
min-width: 0;
padding: 30px;
}

.container {
max-width: 1400px;
margin: 0 auto;
}

h1 {
margin-top: 0;
margin-bottom: 25px;
color: #ffffff;
font-size: 28px;
font-weight: 600;
}

.header-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 20px;
margin-bottom: 25px;
flex-wrap: wrap;
}

.header-row h1 {
margin: 0;
}

.sync-box {
display: flex;
align-items: center;
gap: 14px;
flex-wrap: wrap;
}

.sync-last {
font-size: 12px;
color: #999794;
}

.sync-btn {
background: #81b64c;
color: #ffffff;
border: none;
border-radius: 6px;
padding: 10px 18px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
font-family: inherit;
}

.sync-btn:hover:not(:disabled) {
background: #93c95a;
}

.sync-btn:disabled {
background: #55524e;
cursor: not-allowed;
}

.sync-link {
background: none;
border: none;
color: #aaa8a5;
font-size: 12px;
text-decoration: underline;
cursor: pointer;
font-family: inherit;
padding: 0;
}

.sync-link:disabled {
opacity: 0.4;
cursor: not-allowed;
}

.sync-panel {
display: none;
background: #302e2b;
border: 1px solid #44423f;
border-radius: 6px;
padding: 14px 18px;
margin-bottom: 25px;
font-size: 13px;
}

.sync-panel.visible {
display: block;
}

.sync-summary {
font-weight: 600;
margin-bottom: 8px;
color: #ffffff;
}

.sync-summary.error {
color: #e5534b;
}

.sync-row {
display: flex;
gap: 10px;
padding: 3px 0;
align-items: baseline;
}

.sync-row-label {
width: 210px;
color: #ffffff;
font-weight: 600;
flex-shrink: 0;
}

.sync-row-msg {
color: #aaa8a5;
word-break: break-word;
}

.sync-row-msg.error {
color: #e5534b;
}

.sync-icon {
width: 16px;
text-align: center;
flex-shrink: 0;
}

.spin {
display: inline-block;
animation: spin 1s linear infinite;
}

@keyframes spin {
to {
transform: rotate(360deg);
}
}

/* ============================================================
CARDS DE RATING
============================================================ */

.unified-grid {
display: grid;
grid-template-columns: repeat(var(--account-count, 1), 1fr);
gap: 25px;
margin-bottom: 25px;
}

.rating-card {
background: #302e2b;
border: 1px solid #44423f;
border-radius: 6px;
padding: 18px 20px;
display: flex;
flex-direction: column;
justify-content: center;
}

.rating-card-account {
font-size: 13px;
color: #aaa8a5;
margin-bottom: 6px;
font-weight: 600;
}

.rating-card-body {
display: flex;
align-items: baseline;
gap: 12px;
}

.rating-card-value {
font-size: 34px;
font-weight: bold;
color: #ffffff;
font-family: Georgia, serif;
}

.rating-card-diff {
font-size: 14px;
font-weight: bold;
}

.rating-card-subtitle {
font-size: 12px;
color: #999794;
margin-top: 4px;
}

/* ============================================================
DESEMPENHO | EVOLUÇÃO DO RATING
============================================================ */

.row-double {
display: grid;
grid-template-columns: 1fr 2fr;
gap: 25px;
margin-bottom: 25px;
}

/* ============================================================
STOCKFISH | EVOLUÇÃO DE ERROS
============================================================ */

.row-stockfish-errors {
display: grid;
grid-template-columns: 1fr 2fr;
gap: 25px;
margin-bottom: 25px;
}

.error-evolution-wrapper {
padding: 15px;
height: 235px;
}

/* ============================================================
LINHA DE 3 PAINÉIS
============================================================ */

.row-three {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 25px;
margin-bottom: 25px;
}

/* ============================================================
LINHA DE 4 PAINÉIS
============================================================ */

.row-four {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 25px;
margin-bottom: 25px;
}

/* ============================================================
STOCKFISH
============================================================ */

.stockfish-summary {
display: grid;
grid-template-columns: 1.15fr 1fr 1fr 1fr;
min-height: 150px;
}

.stockfish-stat {
padding: 22px 24px;
display: flex;
flex-direction: column;
justify-content: center;
border-right: 1px solid #44423f;
}

.stockfish-stat:last-child {
border-right: none;
}

.stockfish-stat-label {
color: #999794;
font-size: 12px;
margin-bottom: 8px;
}

.stockfish-stat-value {
color: #ffffff;
font-size: 31px;
line-height: 1;
font-weight: bold;
font-family: Georgia, serif;
}

.stockfish-stat-note {
color: #77746f;
font-size: 10px;
margin-top: 7px;
}

.stockfish-inaccuracies {
color: #f6c23e;
}

.stockfish-mistakes {
color: #fd7e14;
}

.stockfish-blunders {
color: #e5534b;
}

/* ============================================================
ABERTURAS
============================================================ */

.row-openings {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 25px;
}

/* ============================================================
PAINÉIS
============================================================ */

.panel {
background: #302e2b;
border: 1px solid #44423f;
border-radius: 6px;
overflow: hidden;
display: flex;
flex-direction: column;
}

.panel-header {
padding: 15px 18px;
background: #3a3835;
border-bottom: 1px solid #44423f;
color: #ffffff;
font-size: 16px;
font-weight: 600;
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 12px;
}

.panel-note {
font-size: 11px;
font-weight: normal;
color: #999794;
}

/* ============================================================
GRÁFICOS
============================================================ */

.chart-wrapper-small {
padding: 15px;
height: 220px;
flex-grow: 1;
}

.chart-container {
position: relative;
width: 100%;
height: 100%;
}

.chart-height-350 {
height: 350px;
}

.chart-height-235 {
height: 235px;
}

/* ============================================================
CARDS DE ERROS
============================================================ */

.error-card-body {
padding: 20px 18px;
display: flex;
flex-direction: column;
justify-content: center;
flex-grow: 1;
}

.error-card-value {
font-size: 32px;
font-weight: bold;
color: #ffffff;
font-family: Georgia, serif;
margin-bottom: 4px;
}

.error-card-subtitle {
font-size: 12px;
color: #999794;
}

/* ============================================================
RESPONSIVIDADE — 1200px
============================================================ */

@media (max-width: 1200px) {

.app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
}

.main-content {
    padding: 24px;
}

.row-three {
    grid-template-columns: 1fr 1fr;
}

.row-four {
    grid-template-columns: 1fr 1fr;
}

}

/* ============================================================
RESPONSIVIDADE — 900px
============================================================ */

@media (max-width: 900px) {

.app-shell {
    grid-template-columns: 1fr;
}

.sidebar {
    position: relative;
    height: auto;
    padding: 14px;
    border-right: none;
    border-bottom: 1px solid #44423f;
}

.sidebar-brand {
    padding: 4px 8px 12px;
    margin-bottom: 10px;
}

.sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
}

.menu-item {
    padding: 9px 10px;
}

.main-content {
    padding: 20px;
}

.unified-grid,
.row-double,
.row-stockfish-errors,
.row-three,
.row-four {
    grid-template-columns: 1fr;
}

.stockfish-summary {
    grid-template-columns: 1fr 1fr;
}

.stockfish-stat:nth-child(2) {
    border-right: none;
}

.stockfish-stat:nth-child(-n+2) {
    border-bottom: 1px solid #44423f;
}

}

/* ============================================================
DOCUMENTAÇÃO
============================================================ */

.page-header {
margin-bottom: 28px;
}

.page-header h1 {
margin: 0 0 6px;
}

.page-header p {
margin: 0;
color: #aaa8a5;
}

.documentation-section {
background: #3A3835;
border: 1px solid #292c30;
border-radius: 10px;
padding: 22px 24px;
margin-bottom: 20px;
}

.documentation-section h2 {
margin: 0 0 16px;
font-size: 18px;
}

.documentation-section p {
color: #c8c8c8;
line-height: 1.6;
margin: 0 0 12px;
}

.documentation-section p:last-child {
margin-bottom: 0;
}

.documentation-section ul {
margin: 0;
padding-left: 22px;
color: #c8c8c8;
line-height: 1.8;
}

.documentation-section pre {
margin: 0;
padding: 18px;
background: #3A3835;
border: 1px solid #292c30;
border-radius: 6px;
overflow-x: auto;
}

.documentation-section code {
color: #d9d9d9;
font-family: monospace;
font-size: 13px;
line-height: 1.6;
}

.documentation-section dl {
margin: 0;
}

.documentation-section dt {
margin-top: 16px;
color: #e5e5e5;
}

.documentation-section dt:first-child {
margin-top: 0;
}

.documentation-section dd {
margin: 5px 0 0 0;
color: #aaa8a5;
line-height: 1.5;
}

/* ============================================================
PARTIDAS
============================================================ */

.games-section {
background: #3A3835;
border: 1px solid #292c30;
border-radius: 10px;
overflow: hidden;
}

.games-table-wrapper {
width: 100%;
overflow-x: auto;
}

.games-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}

.games-table thead {
background: #3A3835;
}

.games-table th {
padding: 14px 16px;
text-align: left;
color: #aaa8a5;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
white-space: nowrap;
border-bottom: 1px solid #292c30;
}

.games-table td {
padding: 13px 16px;
border-bottom: 1px solid #24272a;
color: #d9d9d9;
white-space: nowrap;
}

.games-table tbody tr:last-child td {
border-bottom: none;
}

.games-table tbody tr:hover {
background: #3A3835;
}

.game-date {
color: #aaa8a5;
font-variant-numeric: tabular-nums;
}

.game-players {
min-width: 260px;
}

.player-white {
color: #e5e5e5;
}

.player-black {
color: #aaa8a5;
}

.players-separator {
margin: 0 8px;
color: #666;
}

.game-result {
    white-space: nowrap;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.result-white {
color: #e5e5e5;
}

.result-black {
color: #aaa8a5;
}

.result-draw {
color: #f6c23e;
}

.game-moves {
text-align: center;
font-variant-numeric: tabular-nums;
}

/* ============================================================
PLATAFORMA
============================================================ */

.platform-badge {
display: inline-block;
padding: 4px 8px;
border-radius: 4px;
font-size: 11px;
font-weight: 600;
color: #ffffff;
}

.platform-chess-com {
background: #81B64C;
}

.platform-lichess {
background: #B97D1D;
}

/* ============================================================
LINKS DE PARTIDAS
============================================================ */

.game-link {
color: #8ab4f8;
text-decoration: none;
font-weight: 500;
}

.game-link:hover {
text-decoration: underline;
}

.empty-games {
padding: 40px !important;
text-align: center;
color: #777;
}

/* ============================================================
PAGINAÇÃO
============================================================ */

.games-pagination {
display: flex;
align-items: center;
justify-content: center;
gap: 18px;
padding: 18px;
border-top: 1px solid #292c30;
}

.pagination-button {
display: inline-block;
padding: 7px 12px;
border: 1px solid #34383d;
border-radius: 5px;
color: #d9d9d9;
text-decoration: none;
font-size: 12px;
}

.pagination-button:hover {
background: #25282c;
}

.pagination-button.disabled {
color: #555;
border-color: #25282c;
}

.pagination-info {
    color: #aaa8a5;
    font-size: 12px;
}

.pagination-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-form label {
    color: #aaa8a5;
    font-size: 12px;
}

.pagination-input {
    width: 52px;
    padding: 7px 6px;
    border: 1px solid #34383d;
    border-radius: 5px;
    background: #181a1d;
    color: #d9d9d9;
    font-size: 12px;
    text-align: center;
    box-sizing: border-box;
}

.pagination-input:focus {
    outline: none;
    border-color: #555;
}

/* =========================================================
   RESULTADO DA PARTIDA
   ========================================================= */

.result-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    min-width: 12px;
    margin-right: 7px;
    vertical-align: middle;
    border: 1px solid #777;
    border-radius: 2px;
    box-sizing: border-box;
}

.result-indicator-win {
    background-color: #74BE2A;
    border-color: #74BE2A;
}

.result-indicator-loss {
    background-color: #FF1F12;
    border-color: #FF1F12;
}

.result-indicator-draw {
    background-color: #3A3835;
    border-color: #777;
}


/* =========================================================
   PRECISÃO / IMPRECISÕES / ERROS / BLUNDERS
   ========================================================= */

.game-accuracy {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.accuracy-value {
    color: #74BE2A;
}

.accuracy-inaccuracies {
    color: #F6C23E;
}

.accuracy-mistakes {
    color: #FD7E14;
}

.accuracy-blunders {
    color: #E5534B;
}

.accuracy-separator {
    color: var(--muted);
    margin: 0 3px;
    font-weight: 400;
}


/* =========================================================
   PARTIDAS CLÁSSICAS
   ========================================================= */

.classicas-table-wrapper {
    width: 100%;
}

.classicas-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.classicas-table th {
    padding: 0 16px 8px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.classicas-table td {
    padding: 16px;
    text-align: left;
    vertical-align: top;
    background: #3A3835;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.classicas-table td:first-child {
    width: 22%;
    border-left: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
    font-weight: 600;
    color: var(--text);
}

.classicas-table td:nth-child(2) {
    width: 25%;
    color: var(--muted);
}

.classicas-table td:nth-child(3) {
    width: 53%;
    border-right: 1px solid var(--border);
    border-radius: 0 8px 8px 0;
}

.classicas-table pre {
    margin: 0;
    padding: 12px;
    overflow-x: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.classicas-warning {
    margin-top: 8px;
    color: #F6C23E;
    font-size: 12px;
    line-height: 1.4;
}

.game-review {
    width: 60px;
    text-align: center;
}

.review-flag {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.15rem;
    opacity: 0.35;
    padding: 4px 8px;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

.review-flag:hover {
    opacity: 0.75;
    transform: scale(1.1);
}

.review-flag.active {
    opacity: 1;
}

.review-flag:disabled {
    cursor: wait;
}

.game-review {
    width: 60px;
    text-align: center;
}

.review-flag {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    opacity: 0.35;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

.review-flag:hover {
    opacity: 0.75;
    transform: scale(1.1);
}

.review-flag.active {
    opacity: 1;
    transform: scale(1.1);
}

.review-flag:disabled {
    cursor: wait;
}

.review-flag.active {
    opacity: 1 !important;
    color: #e6b800 !important;
    font-size: 1.4rem !important;
}
.games-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.games-filter-button {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.games-filter-button:hover {
    border-color: #aaa;
}

.games-filter-button.active {
    font-weight: 600;
}

/* ============================================================
   PARTIDAS CLÁSSICAS — VISUALIZADOR
   ============================================================ */

.classicas-selector-card {
    width: 100%;
    margin-bottom: 20px;
    padding: 18px 20px;
    background: #302e2b;
    border: 1px solid #44423f;
    border-radius: 8px;
}

.classicas-selector-card label {
    display: block;
    margin-bottom: 8px;
    color: #aaa8a5;
    font-size: 12px;
    font-weight: 600;
}

.classicas-select {
    width: 100%;
    max-width: 760px;
    padding: 10px 12px;
    border: 1px solid #44423f;
    border-radius: 6px;
    background: #262522;
    color: #d9d9d9;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.classicas-select:focus {
    outline: none;
    border-color: #81b64c;
}

.classicas-viewer {
    width: 100%;
    padding: 22px;
    background: #302e2b;
    border: 1px solid #44423f;
    border-radius: 8px;
}

.classicas-game-header {
    margin-bottom: 22px;
}

.classicas-game-header h2 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 21px;
    font-weight: 600;
}

.classicas-description {
    margin: 0;
    color: #aaa8a5;
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================================
   TABULEIRO + INFORMAÇÕES
   ============================================================ */

.classicas-main {
    display: grid;
    grid-template-columns: minmax(0, 45%) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    width: 100%;
}

.classicas-board-section {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.classicas-info-section {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================================
   TABULEIRO
   ============================================================ */

.classicas-board {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    overflow: hidden;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
    user-select: none;
    container-type: inline-size;
}

.classicas-square {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
}

.classicas-square.light {
    background: #eaecd1;
}

.classicas-square.dark {
    background: #759554;
}

.classicas-piece {
    position: relative;
    z-index: 2;
    display: block;
    font-family:
        "Noto Sans Symbols 2",
        "Segoe UI Symbol",
        "DejaVu Sans",
        "Arial Unicode MS",
        sans-serif;
    font-size: 11cqw;
    line-height: 0.9;
    text-align: center;
    transform: translateY(-1%);
    text-shadow: none;
    -webkit-text-stroke: 0;
}

.classicas-piece.white {
    color: #ffffff;
    -webkit-text-stroke: 1px #202020;
    paint-order: stroke fill;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.classicas-piece.black {
    color: #202020;
}

/* ============================================================
   COORDENADAS
   ============================================================ */

.classicas-coordinate-file,
.classicas-coordinate-rank {
    position: absolute;
    z-index: 3;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(10px, 1.55cqw, 15px);
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
    opacity: 0.9;
}

.classicas-coordinate-file {
    right: 4px;
    bottom: 3px;
}

.classicas-coordinate-rank {
    left: 4px;
    top: 3px;
}

.classicas-square.light .classicas-coordinate-file,
.classicas-square.light .classicas-coordinate-rank {
    color: #759554;
}

.classicas-square.dark .classicas-coordinate-file,
.classicas-square.dark .classicas-coordinate-rank {
    color: #eaecd1;
}

.classicas-square.last-move {
    box-shadow: inset 0 0 0 4px rgba(246, 194, 62, 0.82);
}

/* ============================================================
   CONTROLES
   ============================================================ */

.classicas-move-indicator {
    min-height: 20px;
    margin-top: 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.classicas-controls {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
}

.classicas-control-button {
    width: 42px;
    height: 36px;
    padding: 0;
    border: 1px solid #44423f;
    border-radius: 5px;
    background: #3a3835;
    color: #d9d9d9;
    font-family: inherit;
    font-size: 17px;
    cursor: pointer;
}

.classicas-control-button:hover:not(:disabled) {
    background: #45423f;
    border-color: #5a5753;
}

.classicas-control-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ============================================================
   DADOS DA PARTIDA
   ============================================================ */

.classicas-info-card {
    width: 100%;
    padding: 18px;
    background: #262522;
    border: 1px solid #44423f;
    border-radius: 7px;
    box-sizing: border-box;
}

.classicas-info-card h3,
.classicas-pgn-section h3 {
    margin: 0 0 15px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
}

.classicas-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 18px;
}

.classicas-info-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.classicas-info-wide {
    grid-column: span 2;
}

.classicas-info-label {
    margin-bottom: 4px;
    color: #77746f;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.classicas-info-value {
    color: #d9d9d9;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.classicas-status {
    margin-top: 14px;
}

.classicas-warning {
    padding: 10px 12px;
    border-left: 3px solid #f6c23e;
    border-radius: 4px;
    background: #38321f;
    color: #f6c23e;
    font-size: 12px;
    line-height: 1.45;
}

/* ============================================================
   PGN
   ============================================================ */

.classicas-pgn-section {
    width: 100%;
    margin: 0;
}

.classicas-pgn {
    width: 100%;
    max-height: 330px;
    margin: 0;
    padding: 14px;
    box-sizing: border-box;
    overflow: auto;
    background: #262522;
    border: 1px solid #44423f;
    border-radius: 6px;
    color: #d9d9d9;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 900px) {

    .classicas-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .classicas-board-section {
        width: min(100%, 680px);
        max-width: 680px;
        margin: 0 auto;
    }

    .classicas-info-section {
        width: 100%;
    }
}

@media (max-width: 600px) {

    .classicas-viewer,
    .classicas-selector-card {
        padding: 15px;
    }

    .classicas-game-header h2 {
        font-size: 18px;
    }

    .classicas-info-grid {
        grid-template-columns: 1fr;
    }

    .classicas-info-wide {
        grid-column: span 1;
    }

    .classicas-control-button {
        width: 40px;
        height: 35px;
    }
}

/* ============================================================
   LOGIN — CHESS ANALYTICS
   Estilos exclusivos da página de autenticação
   ============================================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(129, 182, 76, 0.09),
            transparent 42%
        ),
        #262522;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 36px;
    background: #211f1d;
    border: 1px solid #44423f;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.30);
}

.login-card h1 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.5px;
}

.login-subtitle {
    margin: 0 0 30px;
    color: #aaa8a5;
    font-size: 14px;
    text-align: center;
}

.login-error {
    margin-bottom: 22px;
    padding: 12px 14px;
    color: #ffb4ab;
    background: rgba(186, 55, 55, 0.12);
    border: 1px solid rgba(255, 120, 110, 0.35);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.login-card .form-group {
    margin-bottom: 22px;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #d9d9d9;
    font-size: 13px;
    font-weight: 600;
}

.login-card .form-group input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    color: #ffffff;
    background: #302e2b;
    border: 1px solid #514e49;
    border-radius: 6px;
    outline: none;
    font: inherit;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.login-card .form-group input:hover {
    border-color: #706c65;
}

.login-card .form-group input:focus {
    border-color: #81b64c;
    box-shadow: 0 0 0 3px rgba(129, 182, 76, 0.16);
}

.login-card .form-group input:focus-visible {
    outline: 2px solid #81b64c;
    outline-offset: 2px;
}

.login-card button[type="submit"] {
    display: block;
    width: 100%;
    min-height: 46px;
    margin-top: 8px;
    padding: 12px 16px;
    color: #171914;
    background: #81b64c;
    border: 1px solid #81b64c;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.login-card button[type="submit"]:hover {
    background: #91c65a;
    border-color: #91c65a;
}

.login-card button[type="submit"]:active {
    transform: translateY(1px);
}

.login-card button[type="submit"]:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }

    .login-card {
        padding: 28px 22px;
        border-radius: 10px;
    }

    .login-card h1 {
        font-size: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-card .form-group input,
    .login-card button[type="submit"] {
        transition: none;
    }
}


/* ============================================================
   PADRONIZAÇÃO — PÁGINA PARTIDAS
   Regras específicas para filtros, tabela e paginação.
   Mantém os estilos das demais páginas inalterados.
   ============================================================ */

.games-section {
    background: #302e2b;
    border: 1px solid #44423f;
    border-radius: 10px;
    overflow: hidden;
}

.games-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.games-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid #514e49;
    border-radius: 6px;
    background: #302e2b;
    color: #d9d9d9;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.games-filter-button:hover {
    background: #3a3835;
    border-color: #77746f;
}

.games-filter-button.active {
    background: rgba(129, 182, 76, 0.14);
    border-color: #81b64c;
    color: #b9df91;
}

.games-search-filters {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 20px;
    padding: 16px;
    background: #302e2b;
    border: 1px solid #44423f;
    border-radius: 8px;
}

.games-search-filters > div {
    display: flex;
    flex: 1 1 160px;
    flex-direction: column;
    gap: 7px;
    min-width: 140px;
}

.games-search-filters label {
    color: #aaa8a5;
    font-size: 12px;
    font-weight: 600;
}

.games-search-filters select {
    width: 100%;
    min-height: 38px;
    padding: 8px 32px 8px 10px;
    border: 1px solid #514e49;
    border-radius: 6px;
    background: #262522;
    color: #d9d9d9;
    font: inherit;
    font-size: 13px;
}

.games-search-filters select:focus-visible {
    outline: 2px solid #81b64c;
    outline-offset: 2px;
}

.games-search-filters button,
.games-search-filters input[type="submit"] {
    min-height: 38px;
    padding: 8px 15px;
    border: 1px solid #81b64c;
    border-radius: 6px;
    background: #81b64c;
    color: #171914;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.games-search-filters button:hover,
.games-search-filters input[type="submit"]:hover {
    background: #91c65a;
    border-color: #91c65a;
}

.games-search-filters a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #514e49;
    border-radius: 6px;
    color: #d9d9d9;
    background: transparent;
    font-size: 13px;
    text-decoration: none;
}

.games-search-filters a:hover {
    background: #3a3835;
    border-color: #77746f;
}

.games-table {
    min-width: 900px;
}

.games-table th {
    background: #262522;
    color: #aaa8a5;
}

.games-table td {
    border-bottom-color: #44423f;
}

.games-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.018);
}

.games-table tbody tr:hover {
    background: #403d39;
}

.games-table tbody tr:last-child td {
    border-bottom: none;
}

.game-review {
    width: 60px;
    text-align: center;
}

.review-flag {
    border: 0;
    border-radius: 5px;
    padding: 5px 8px;
    background: transparent;
    color: #aaa8a5;
    font: inherit;
    font-size: 18px;
    line-height: 1.2;
    opacity: 0.55;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.review-flag:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.06);
}

.review-flag.active {
    color: #e6b800;
    opacity: 1;
}

.review-flag:disabled {
    opacity: 0.45;
    cursor: wait;
}

.review-flag:focus-visible,
.games-filter-button:focus-visible,
.pagination-button:focus-visible,
.game-link:focus-visible {
    outline: 2px solid #81b64c;
    outline-offset: 2px;
}

.games-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px;
    border-top: 1px solid #44423f;
}

.pagination-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #514e49;
    border-radius: 5px;
    background: #302e2b;
    color: #d9d9d9;
    font: inherit;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pagination-button:hover:not(.disabled) {
    background: #403d39;
    border-color: #77746f;
}

/* Cor solicitada: aplica-se somente ao botão "Ir". */
.pagination-form button.pagination-button {
    background: #81B64C;
    border-color: #81B64C;
    color: #171914;
    font-weight: 700;
}

.pagination-form button.pagination-button:hover {
    background: #91c65a;
    border-color: #91c65a;
}

.pagination-button.disabled {
    color: #77746f;
    border-color: #3a3835;
    background: #262522;
    cursor: not-allowed;
}

.pagination-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    padding: 4px 0;
}

.pagination-form label,
.pagination-info {
    color: #aaa8a5;
    font-size: 12px;
}

.pagination-input {
    width: 58px;
    min-height: 34px;
    padding: 6px;
    border: 1px solid #514e49;
    border-radius: 5px;
    background: #262522;
    color: #ffffff;
    font: inherit;
    font-size: 12px;
    text-align: center;
}

.pagination-input:focus-visible {
    outline: 2px solid #81b64c;
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .games-search-filters {
        align-items: stretch;
    }

    .games-search-filters > div {
        flex-basis: calc(50% - 14px);
    }

    .games-pagination {
        gap: 7px;
        padding: 14px 10px;
    }
}

@media (max-width: 600px) {
    .games-search-filters {
        gap: 12px;
        padding: 12px;
    }

    .games-search-filters > div {
        flex-basis: 100%;
        min-width: 0;
    }

    .games-search-filters button,
    .games-search-filters input[type="submit"],
    .games-search-filters a {
        flex: 1 1 auto;
    }

    .games-pagination {
        justify-content: flex-start;
    }

    .pagination-form {
        order: -1;
        width: 100%;
        padding-bottom: 8px;
    }
}
