:root {
    /* Fondos / Backgrouns */
    --bg-main: #1c223d;
    --bg-card: #2d3869;
    --bg-card-alt: #1e2847;
    --bg-header: #394c81;
    /* aproximado del linear-gradient */

    /* Colores Primarios / Secundarios / Acentos */
    --brand-primary: #4563E2;
    --brand-primary-hover: #4563E2;
    /* Mismo por consistencia original */
    --brand-secondary: #919cf1;
    --brand-purple: #5031a9;

    /* Scores / Highlights */
    --score-aor: #ff80df;
    --score-bgg: #ffb74d;
    --score-rank: #3af142;
    --score-warning: #e65100;
    --score-danger: #c2185b;
    --score-success: #2e7d32;

    /* Textos */
    --text-primary: #ffffff;
    --text-muted: #aeb9e1;
    --text-dark: #000000;
    --text-light-blue: #c4dbff;

    /* Utilidades */
    --font-primary: 'Open Sans', Arial, sans-serif;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.3);
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Utilities (Extracted from inline styles) */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.font-bold {
    font-weight: bold;
}

.font-italic {
    font-style: italic;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-10 {
    gap: 10px;
}

.gap-15 {
    gap: 15px;
}

.p-0 {
    padding: 0;
}

.m-0 {
    margin: 0;
}

.mt-5 {
    margin-top: 5px;
}

.mb-5 {
    margin-bottom: 5px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.text-danger {
    color: #d32f2f;
}

.text-muted-dark {
    color: #555555;
}

.text-white {
    color: #ffffff;
}

.text-black {
    color: #000000;
}

.text-sm {
    font-size: 0.85rem;
}

.text-xs {
    font-size: 0.75rem;
}

.bg-light {
    background-color: #f8f9fa;
}

.rounded-md {
    border-radius: 6px;
}

.rounded-full {
    border-radius: 50%;
}

/* --- GLOBAL COMPONENT STYLES PRESERVED --- */

.game-cover {
    height: 70px;
    width: 70px;
    border-radius: 6px;
    object-fit: cover;
    vertical-align: middle;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--brand-purple);
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    background-color: #34495e;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--brand-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(69, 99, 226, 0.3);
}

.pagination-btn:disabled {
    background-color: #2c3e50;
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-info-box {
    font-weight: 600;
    color: #ffffff;
    background: #1a2533;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 120px;
    text-align: center;
}

@media screen and (max-width: 600px) {
    .pagination-container {
        gap: 6px;
        padding: 8px 4px;
    }

    .pagination-btn {
        padding: 7px 10px;
        font-size: 0.78rem;
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
        min-width: 0;
    }

    .page-info-box {
        padding: 6px 10px;
        font-size: 0.82rem;
        min-width: unset;
        width: 100%;
        order: -1;
        margin-bottom: 4px;
        text-align: center;
    }
}

.bgg-score {
    color: var(--score-warning);
    font-weight: 800;
}

.bgg-weight {
    color: var(--score-danger);
    font-weight: 800;
}

.aor-score {
    color: var(--score-success);
    font-weight: 800;
}

.stat-label {
    color: #4a5568;
    font-weight: 700;
    font-size: 0.85em;
}

.stat-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
}

.stat-group span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-group span:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-value {
    font-weight: 700;
}

/* Compact Layout Styles moved to end of file under body.page-ranking */









.compact-row td {
    padding: 1px 4px !important;
    height: 30px !important;
    font-size: 0.85rem;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid #e0e0e0 !important;
    color: #000000 !important;
}

.game-cover-compact {
    height: 25px;
    width: 25px;
    border-radius: 4px;
    object-fit: cover;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
}

.trunc-name {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-btn {
    display: inline-block;
    background: transparent;
    color: var(--brand-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-decoration: none;
    margin-left: 8px;
    border: 1px solid rgba(69, 99, 226, 0.6);
    vertical-align: middle;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.view-btn:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(69, 99, 226, 0.4);
    border-color: var(--brand-primary);
}

.bgg-badge {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 6px;
    /* Smooth pill shape */
    color: #000000 !important;
    font-weight: 800;
    font-size: 0.85rem;
    min-width: 44px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: none;
}

.aor-score-text {
    color: #D92286;
    font-weight: 900;
    font-size: 0.85rem;
}

.vote-matrix-mobile-msg {
    display: none;
}

/* Orphan 800px media query removed — moved to end of file under body.page-ranking */

/* Hide spin buttons for Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Hide spin buttons for Firefox */
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ccf035;
    color: #222222;
    cursor: pointer;
    font-weight: 900;
    font-style: italic;
    font-size: 0.65rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.9;
    transition: opacity 0.2s, background-color 0.2s;
    vertical-align: middle;
    user-select: none;
    margin-left: 5px;
    line-height: 1;
}

.info-icon:hover {
    opacity: 1;
    background-color: #2e47c8;
}

.custom-tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.custom-tooltip-panel {
    visibility: hidden;
    background-color: rgba(210, 248, 188, 0.959);
    color: #000;
    text-align: left;
    padding: 5px 8px;
    border: 1px solid black;
    position: absolute;
    z-index: 9999;
    top: 100%;
    left: 0;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
    white-space: pre-wrap;
    font-weight: normal;
    font-size: 0.8rem;
    min-width: 250px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    line-height: 1.3;
}

.custom-tooltip-container:hover .custom-tooltip-panel {
    visibility: visible;
    opacity: 1;
}

.filter-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #8c98b9;
    padding: 2px 4px;
    margin-left: 5px;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--brand-primary);
}

.filter-popup {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 200px;
    text-align: left;
    cursor: default;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
}

.th-inner.left .filter-popup {
    left: 0;
    transform: none;
}

.filter-popup.show {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-popup select,
.filter-popup input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccd0d5;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    color: #000;
    background: #fff;
    box-sizing: border-box;
}

.filter-popup select:focus,
.filter-popup input:focus {
    border-color: var(--brand-primary);
}

.th-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.th-inner.left {
    justify-content: flex-start;
}


@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}


.container_game {
    width: 100%;
    background-color: #354269;
    max-width: 1000px;
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    color: #fff;
}

/* ── Title bar ── */
.game_title_bar {
    padding: 10px 14px;
    background: linear-gradient(145deg, rgba(57, 76, 129, 0.9), rgba(30, 40, 70, 0.95));
    border-bottom: 1px solid rgba(80, 49, 169, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.nav-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgb(194 230 79 / 40%);
    background: rgb(67 146 139);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background .2s, border-color .2s, transform .15s;
    line-height: 1;
}

.nav-arrow:hover {
    background: rgb(50 120 113);
    border-color: rgb(194 230 79 / 70%);
    transform: scale(1.1);
}

.nav-arrow.disabled {
    opacity: 0.25;
    pointer-events: none;
}

.nav-arrow svg {
    width: 16px;
    height: 16px;
}

.title-bar-center {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.game_rank_badge {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--score-rank);
    text-shadow: 0 0 14px rgba(58, 241, 66, 0.5);
    letter-spacing: -1px;
    flex-shrink: 0;
}

.game_title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-secondary);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    word-break: break-word;
}

.game_year {
    font-size: 1.1rem;
    color: #c4dbff;
    font-weight: 600;
    flex-shrink: 0;
}

/* ── Body row ── */
.game_header {
    display: flex;
    align-items: flex-start;
    padding: 18px 20px;
    background: linear-gradient(145deg, rgba(57, 76, 129, 0.9), rgba(30, 40, 70, 0.95));
    border-bottom: 2px solid var(--brand-purple);
    gap: 20px;
    flex-wrap: wrap;
}

.game_left_col {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex-shrink: 0;
}

.game_cover {
    width: 160px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    display: block;
}

.game_stat_col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat_box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.stat_box.aor_box {
    border-left: 4px solid var(--score-aor);
    background: rgba(255, 128, 223, 0.08);
}

.stat_box.bgg_box {
    border-left: 4px solid var(--score-bgg);
    background: rgba(255, 183, 77, 0.08);
}

.stat_label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aeb9e1;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
    width: 100%;
}

.stat_value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.stat_value span.aor_color {
    color: var(--score-aor);
}

.stat_value span.bgg_color {
    color: var(--score-bgg);
}

.rankings_list {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    justify-content: center;
}

.ranking_card {
    background-color: #45687b;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: #f0f4f8;
    border: 2px solid #5a7b8e;
    text-align: center;
    gap: 8px;
    height: 100%;
    box-sizing: border-box;
}

.ranking_card:hover {
    transform: translateY(-4px);
    background-color: #527588;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
    border-color: #fbf2ad;
}

.card_row_1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 5px;
}

.ranking_hex {
    width: 65px;
    height: 72px;
    overflow: visible;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
}

.hex-text {
    font-size: 26px;
    font-weight: 900;
    font-family: 'Open Sans', sans-serif;
    text-anchor: middle;
    dominant-baseline: central;
}

.hex-text-gold {
    fill: #fbf2ad;
    font-size: 20px;
}

.hex-text-silver {
    fill: #ffffff;
    font-size: 20px;
}

.hex-text-bronze {
    fill: #ffe0b2;
    font-size: 20px;
}

.hex-text-green {
    fill: #e8f5e9;
    font-size: 20px;
}

.hex-text-blue {
    fill: #e3f2fd;
    font-size: 20px;
}

.hex-text-standard {
    fill: #ffffff;
    font-size: 20px;
}

.reviewer_avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--brand-purple);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.reviewer_info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.reviewer_name {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 2px;
    color: #00ffdb;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.reviewer_channel {
    font-size: 0.9rem;
    color: #cff0d5;
    font-weight: 600;
    width: 100%;
    word-wrap: break-word;
}


/* ─── PAGE LAYOUT ─── */
body {
    background: var(--bg-main);
    color: #e8ecf8;
    font-family: 'Open Sans', sans-serif;
}

.versus-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 12px 60px;
}

/* ─── HERO BANNER ─── */
.versus-hero {
    background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-card) 50%, var(--bg-main) 100%);
    border: 1px solid rgba(145, 156, 241, 0.25);
    border-radius: 16px;
    padding: 20px 24px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.versus-hero h1 {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--brand-secondary);
    margin: 0;
    text-shadow: 0 2px 8px rgba(145, 156, 241, 0.4);
    flex: 1;
    min-width: 200px;
}

.versus-hero .hero-sub {
    font-size: 0.8rem;
    color: #7a8ab0;
    margin-top: 4px;
}

/* ─── ADD GAME PANEL ─── */
.add-game-panel {
    background: rgba(57, 76, 129, 0.25);
    border: 1px dashed rgba(145, 156, 241, 0.4);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.add-game-panel label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #aeb9e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.autocomplete-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.add-game-input {
    width: 100%;
    background: rgba(13, 23, 55, 0.7);
    border: 1px solid rgba(145, 156, 241, 0.4);
    border-radius: 8px;
    color: #e8ecf8;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    padding: 9px 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.add-game-input:focus {
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 3px rgba(145, 156, 241, 0.15);
}

.autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card-alt);
    border: 1px solid rgba(145, 156, 241, 0.5);
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: none;
}

.autocomplete-list.visible {
    display: block;
}

.autocomplete-item {
    padding: 9px 14px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #c4d4f8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: rgba(145, 156, 241, 0.2);
    color: #fff;
}

.autocomplete-item em {
    color: var(--brand-secondary);
    font-style: normal;
    font-weight: 700;
}

.btn-add {
    background: linear-gradient(135deg, var(--brand-purple), #7c5cbf);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
}

.btn-add:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-add:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.limit-note {
    font-size: 0.75rem;
    color: #6a7aa0;
    width: 100%;
}

/* ─── COMPARISON TABLE ─── */
.cmp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.cmp-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
    background: var(--bg-card-alt);
    table-layout: fixed;
}

/* Column widths: label col + up to 3 game cols */
.cmp-table .col-label {
    width: 110px;
}

.cmp-table .col-game {
    width: auto;
    min-width: 200px;
}

/* ── Section header rows ── */
.cmp-section-header td {
    background: linear-gradient(90deg, #2a3465 0%, #212d5a 100%);
    color: var(--brand-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 14px;
    border-top: 2px solid rgba(145, 156, 241, 0.3);
}

/* ── Game header row (covers + names) ── */
.cmp-game-header td {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-alt) 100%);
    vertical-align: top;
    padding: 16px 12px 12px;
    border-bottom: 2px solid rgba(145, 156, 241, 0.2);
    text-align: center;
}

.cmp-game-header td.col-label {
    vertical-align: middle;
    text-align: left;
    font-size: 0.7rem;
    color: #5a6b9c;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-col-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.game-col-cover {
    width: 90px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}

.game-col-cover:hover {
    transform: scale(1.05);
}

.game-col-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #c8d0ff;
    line-height: 1.25;
}

.game-col-year {
    font-size: 0.75rem;
    color: #7a8ab0;
    font-weight: 600;
}

.game-col-rank-badge {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--score-rank);
    text-shadow: 0 0 10px rgba(58, 241, 66, 0.4);
}

/* Remove button */
.btn-remove-game {
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid rgba(255, 80, 80, 0.35);
    border-radius: 6px;
    color: #ff8080;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-remove-game:hover {
    background: rgba(255, 80, 80, 0.25);
    color: #ffaaaa;
}

/* ── Data rows ── */
.cmp-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    font-size: 0.88rem;
}

.cmp-table tr:last-child td {
    border-bottom: none;
}

.cell-label {
    color: #7a90bb;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: left;
    background: rgba(13, 23, 55, 0.4);
    white-space: nowrap;
}

.cell-value {
    text-align: center;
    color: #e2e8ff;
    font-weight: 600;
    background: rgba(30, 40, 71, 0.6);
    transition: background 0.15s;
}

.cmp-table tr:hover .cell-value {
    background: rgba(57, 76, 129, 0.3);
}

/* Highlighted best cell */
.cell-best {
    background: rgba(58, 241, 66, 0.08) !important;
    color: var(--score-rank) !important;
    font-weight: 900 !important;
}

.cell-best-bgg {
    background: rgba(255, 183, 77, 0.08) !important;
    color: var(--score-bgg) !important;
    font-weight: 900 !important;
}

.cell-na {
    color: #4a5a7a;
    font-style: italic;
}

.cell-missing {
    color: #3d4d70;
    font-style: italic;
    font-size: 0.78rem;
}

/* Big stat values */
.big-val {
    font-size: 1.15rem;
    font-weight: 900;
}

/* AKA / related pills */
.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.pill {
    background: rgba(145, 156, 241, 0.12);
    border: 1px solid rgba(145, 156, 241, 0.25);
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 0.72rem;
    color: #a0acda;
}

/* ── Reviewer position hex ── */
.rev-pos-cell {
    text-align: center;
}

.rev-hex-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rev-hex-svg {
    width: 38px;
    height: 44px;
    overflow: visible;
}

.rev-hex-text {
    font-size: 15px;
    font-weight: 900;
    font-family: 'Open Sans', sans-serif;
    text-anchor: middle;
    dominant-baseline: central;
}

.rhex-gold {
    fill: #fbf2ad;
}

.rhex-silver {
    fill: #ffffff;
}

.rhex-bronze {
    fill: #ffe0b2;
}

.rhex-green {
    fill: #e8f5e9;
}

.rhex-blue {
    fill: #e3f2fd;
}

.rhex-std {
    fill: #d0d8f8;
}

/* ── Inline vote cards (inside distribution rows) ── */
.dist-votes-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 4px 0;
}

.dist-vote-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: rgba(13, 23, 55, 0.55);
    border: 1px solid rgba(145, 156, 241, 0.18);
    border-radius: 8px;
    padding: 5px 7px 4px;
    min-width: 58px;
    max-width: 72px;
    transition: background 0.15s;
}

.dist-vote-card:hover {
    background: rgba(57, 76, 129, 0.4);
}

.dist-vote-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-purple);
    flex-shrink: 0;
}

.dist-vote-name {
    font-size: 0.62rem;
    font-weight: 700;
    color: #c8d0ff;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
    max-width: 62px;
}

.dist-none {
    color: #4a5a7a;
    font-style: italic;
    font-size: 0.8rem;
}

/* ── Desktop scaling for vote cards ── */
@media (min-width: 641px) {
    .dist-vote-card {
        min-width: 72px;
        max-width: 92px;
        padding: 7px 8px 6px;
        gap: 5px;
    }

    .dist-votes-wrap {
        gap: 8px;
    }

    .dist-vote-avatar {
        width: 38px;
        height: 38px;
    }

    .dist-vote-name {
        font-size: 0.72rem;
        max-width: 80px;
    }
}

/* ── Chart containers ── */
.chart-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
}

/* AoR / BGG bars: JS sets exact canvas height via DPR, wrapper is auto */
.aor-bar-wrap {
    width: 100%;
    position: relative;
}

.aor-bar-wrap canvas {
    display: block;
    width: 100% !important;
}

/* Tier label below chart (BGG Score) */
.chart-tier-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

@media (min-width: 641px) {
    .chart-tier-label {
        font-size: 0.82rem;
    }
}

/* Presence badge — ABOVE the AoR Points chart */
.presence-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 10px 2px;
    border-radius: 5px;
    border: 1px solid;
    margin-bottom: 5px;
}

@media (min-width: 641px) {
    .presence-badge {
        font-size: 0.82rem;
        padding: 4px 12px 3px;
    }
}

/* BGG score: same setup as AoR bar */
.bgg-score-wrap {
    width: 100%;
    position: relative;
}

.bgg-score-wrap canvas {
    display: block;
    width: 100% !important;
}

/* AoR Rank text display */
.aor-rank-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.aor-rank-of {
    font-size: 0.62rem;
    color: #5a6b9c;
    font-weight: 600;
    white-space: nowrap;
}

@media (min-width: 641px) {
    .aor-rank-of {
        font-size: 0.72rem;
    }
}

.weight-gauge-wrap {
    position: relative;
    width: 90px;
    height: 52px;
}

.weight-gauge-wrap canvas {
    position: absolute;
    top: 0;
    left: 0;
}

.weight-val-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 900;
    color: #e2e8ff;
    pointer-events: none;
}

/* ── Game cell — mobile (vertical, centred) ── */
.game-info-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
}

.game-title-year {
    text-align: center;
}

.game-title-year .g-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: #c8d0ff;
    line-height: 1.25;
    display: block;
}

.game-title-year .g-year {
    font-size: 0.73rem;
    color: #7a8ab0;
    font-weight: 600;
}

.game-cover-img {
    width: 88px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}

.game-cover-img:hover {
    transform: scale(1.05);
}

.game-cell-btns {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

/* ── Game cell — desktop (title on top, image-left + buttons-right) ── */
@media (min-width: 641px) {
    .game-info-cell {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 14px 12px;
    }

    .game-title-year {
        width: 100%;
        text-align: center;
        margin-bottom: 2px;
    }

    .game-title-year .g-name {
        display: inline;
        font-size: 1.0rem;
    }

    .game-title-year .g-year {
        display: inline;
        font-size: 0.8rem;
        margin-left: 5px;
    }

    .game-cover-img {
        width: 92px;
        flex-shrink: 0;
    }

    .game-cell-btns {
        flex: 0 0 auto;
        align-items: flex-start;
        gap: 8px;
        justify-content: center;
    }
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #5a6b9c;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h2 {
    font-size: 1.2rem;
    color: #7a8ab0;
    margin: 0 0 8px;
}

.empty-state p {
    font-size: 0.88rem;
    margin: 0;
}

/* ── View game button ── */
.btn-view-game {
    display: inline-block;
    background: rgba(80, 49, 169, 0.25);
    border: 1px solid rgba(80, 49, 169, 0.5);
    border-radius: 6px;
    color: #c0a8ff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-view-game:hover {
    background: rgba(80, 49, 169, 0.45);
    color: #fff;
}

/* No sticky on section headers — keeps rows independent and visible */

/* ── dist label ── */
.dist-range-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.dist-range-label .drl-pos {
    font-size: 0.68rem;
    color: #7a8ab0;
    font-weight: 700;
    text-transform: uppercase;
}

.dist-range-label .drl-num {
    font-size: 0.88rem;
    color: #a0b0d0;
    font-weight: 800;
}

@media (min-width: 641px) {
    .dist-range-label .drl-pos {
        font-size: 0.78rem;
    }

    .dist-range-label .drl-num {
        font-size: 1.0rem;
    }
}

/* ── Vote card tooltip ── */
.vote-card-link {
    text-decoration: none;
    color: inherit;
    display: contents;
}

.dist-vote-card {
    position: relative;
    cursor: pointer;
}

.vote-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #0e1530;
    border: 1px solid rgba(145, 156, 241, 0.5);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 140px;
    max-width: 200px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    text-align: left;
    white-space: nowrap;
}

.vote-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(145, 156, 241, 0.5);
}

.dist-vote-card:hover .vote-tooltip {
    display: block;
}

.vtt-pos {
    font-size: 1rem;
    font-weight: 900;
    color: #ffcc44;
    margin-bottom: 4px;
}

.vtt-name {
    font-size: 0.78rem;
    font-weight: 800;
    color: #e2e8ff;
    margin-bottom: 1px;
}

.vtt-chan {
    font-size: 0.7rem;
    color: #9aabcd;
    margin-bottom: 3px;
}

.vtt-date {
    font-size: 0.65rem;
    color: #5a6b9c;
    font-style: italic;
}

/* ── Responsive breakpoints ── */
@media (max-width: 640px) {
    .cmp-table .col-label {
        width: 90px;
    }

    .cmp-table td {
        padding: 8px 8px;
    }

    .cell-label {
        font-size: 0.68rem;
    }

    .game-cover-img {
        width: 68px;
    }

    .versus-hero h1 {
        font-size: 1.1rem;
    }

    .big-val {
        font-size: 0.95rem;
    }

    .weight-gauge-wrap {
        width: 72px;
        height: 42px;
    }
}


.hex-grid-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0;
    padding: 8px 0;
    width: 100%;
}

.hex-svg {
    flex: 1 1 auto;
    min-width: 80px;
    max-width: 210px;
    height: auto;
    overflow: visible;
}

/* En pantallas grandes: solapamiento por margen negativo */
@media (min-width: 900px) {
    .hex-grid-wrap {
        justify-content: center;
    }

    .hex-svg:not(:last-child) {
        margin-right: clamp(-40px, -5vw, -15px);
    }
}

/* Badge mini-hex */
.hex-num-badge {
    fill: var(--bg-main);
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 0.5;
}

body.page-ranking .hex-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 5px;
    font-weight: 900;
    text-anchor: middle;
    dominant-baseline: central;
}

body.page-ranking .hex-text-gold {
    fill: #FFDF00;
}

body.page-ranking .hex-text-silver {
    fill: #E0EAF5;
}

body.page-ranking .hex-text-bronze {
    fill: #FF9A5A;
}

.hex-names-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    width: 100%;
    margin-top: 6px;
    flex-wrap: nowrap;
    gap: 4px;
}

.hex-person-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
}

/* Game Image Link Hover effect */
.hex-game-link {
    outline: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hex-game-link:hover {
    transform: scale(1.08);
}

.hex-game-link .hex-image {
    transition: filter 0.3s ease;
}

.hex-game-link:hover .hex-image {
    filter: brightness(1.25);
}

.hex-glow {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hex-game-link:hover .hex-glow {
    opacity: 0.9;
}

/* Empty/unloaded state: dim but keep colors */
.hex-unloaded {
    opacity: 0.3;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.hex-loaded {
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: auto;
}


.game-cover {
    height: 70px;
    width: 70px;
    border-radius: 6px;
    object-fit: cover;
    vertical-align: middle;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--brand-purple);
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    background-color: #34495e;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--brand-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(69, 99, 226, 0.3);
}

.pagination-btn:disabled {
    background-color: #2c3e50;
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-info-box {
    font-weight: 600;
    color: #ffffff;
    background: #1a2533;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 120px;
    text-align: center;
}

@media screen and (max-width: 600px) {
    .pagination-container {
        gap: 8px;
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .page-info-box {
        padding: 6px 12px;
        font-size: 0.85rem;
        min-width: 100px;
        order: -1;
        width: 100%;
        margin-bottom: 5px;
    }
}

.bgg-score {
    color: var(--score-warning);
    font-weight: 800;
}

.bgg-weight {
    color: var(--score-danger);
    font-weight: 800;
}

.aor-score {
    color: var(--score-success);
    font-weight: 800;
}

.stat-label {
    color: #4a5568;
    font-weight: 700;
    font-size: 0.85em;
}

.stat-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
}

.stat-group span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-group span:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-value {
    font-weight: 700;
}

/* Compact Layout Styles moved to end of file under body.page-ranking */









.compact-row td {
    padding: 1px 4px !important;
    height: 30px !important;
    font-size: 0.85rem;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid #e0e0e0 !important;
    color: #000000 !important;
}

.game-cover-compact {
    height: 25px;
    width: 25px;
    border-radius: 4px;
    object-fit: cover;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
}

.trunc-name {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-btn {
    display: inline-block;
    background: transparent;
    color: var(--brand-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-decoration: none;
    margin-left: 8px;
    border: 1px solid rgba(69, 99, 226, 0.6);
    vertical-align: middle;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.view-btn:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(69, 99, 226, 0.4);
    border-color: var(--brand-primary);
}

.bgg-badge {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 6px;
    /* Smooth pill shape */
    color: #000000 !important;
    font-weight: 800;
    font-size: 0.85rem;
    min-width: 44px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: none;
}

.aor-score-text {
    color: #D92286;
    font-weight: 900;
    font-size: 0.85rem;
}

.vote-matrix-mobile-msg {
    display: none;
}

/* Orphan 800px media query removed — moved to end of file under body.page-ranking */

/* Hide spin buttons for Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Hide spin buttons for Firefox */
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ccf035;
    color: #222222;
    cursor: pointer;
    font-weight: 900;
    font-style: italic;
    font-size: 0.65rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.9;
    transition: opacity 0.2s, background-color 0.2s;
    vertical-align: middle;
    user-select: none;
    margin-left: 5px;
    line-height: 1;
}

.info-icon:hover {
    opacity: 1;
    background-color: #2e47c8;
}

.custom-tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.custom-tooltip-panel {
    visibility: hidden;
    background-color: rgba(210, 248, 188, 0.959);
    color: #000;
    text-align: left;
    padding: 5px 8px;
    border: 1px solid black;
    position: absolute;
    z-index: 9999;
    top: 100%;
    left: 0;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
    white-space: pre-wrap;
    font-weight: normal;
    font-size: 0.8rem;
    min-width: 250px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    line-height: 1.3;
}

.custom-tooltip-container:hover .custom-tooltip-panel {
    visibility: visible;
    opacity: 1;
}

.filter-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #8c98b9;
    padding: 2px 4px;
    margin-left: 5px;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--brand-primary);
}

.filter-popup {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 200px;
    text-align: left;
    cursor: default;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
}

.th-inner.left .filter-popup {
    left: 0;
    transform: none;
}

.filter-popup.show {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-popup select,
.filter-popup input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccd0d5;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    color: #000;
    background: #fff;
    box-sizing: border-box;
}

.filter-popup select:focus,
.filter-popup input:focus {
    border-color: var(--brand-primary);
}

.th-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.th-inner.left {
    justify-content: flex-start;
}


@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}


/* ===== Variables ===== */
:root {
    --bg: var(--bg-main);
    --container: #354269;
    --accent: #a0ffa0;
    --yellow: #ffeb3b;
    --light: #ffffff;
    --muted: #8292c9;
    --border: rgba(255, 255, 255, 0.10);
    --card-bg: rgba(57, 76, 129, 0.55);
    --card-border: rgba(160, 255, 160, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--bg);
    color: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ===== Header (CONSOLIDATED — single source of truth) ===== */
header {
    background-color: rgba(28, 34, 61, 0.97);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header ul {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 20px;
}

header li {
    display: inline-flex;
    align-items: center;
}

header a {
    text-decoration: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

header a:hover {
    color: #a0ffa0;
    transform: translateY(-2px);
}

header a img {
    vertical-align: middle;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

header a:hover img {
    transform: scale(1.05);
}

header::-webkit-scrollbar {
    height: 6px;
}

header::-webkit-scrollbar-thumb {
    background: #5a6b9c;
    border-radius: 10px;
}

header::-webkit-scrollbar-track {
    background: transparent;
}

/* ===== Hamburger Button ===== */
.hamburger-btn {
    display: none;
    /* hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1100;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-btn.is-active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger-btn.is-active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.is-active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ===== Mobile Nav (≤600px) ===== */
@media (max-width: 600px) {
    .hamburger-btn {
        display: flex;
    }

    /* Brand name shown on mobile next to hamburger */
    .mobile-brand {
        display: block;
        font-size: 0.85rem;
        font-weight: 700;
        color: #a0ffa0;
        letter-spacing: 0.3px;
        white-space: nowrap;
        flex: 1;
        text-align: center;
        pointer-events: none;
        user-select: none;
    }

    header ul {
        position: fixed;
        top: 0;
        right: 0;
        width: 70vw;
        max-width: 280px;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: flex-start;
        background: rgba(28, 34, 61, 0.98);
        backdrop-filter: blur(20px);
        padding: 80px 28px 40px;
        gap: 0;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
        /* Use transform instead of right offset — position:fixed ignores overflow:hidden */
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
            visibility 0s linear 0.35s;
        z-index: 1050;
        overflow-y: auto;
    }

    header ul.nav-open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
            visibility 0s linear 0s;
    }

    header li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    header li a {
        display: block;
        width: 100%;
        padding: 16px 4px;
        font-size: 1rem;
        line-height: 1.4;
        white-space: normal;
    }

    header li:first-child {
        margin-bottom: 12px;
        border-bottom: 2px solid rgba(160, 255, 160, 0.2);
        padding-bottom: 16px;
    }

    header li:first-child a img {
        height: 40px;
    }

    /* Overlay backdrop */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .nav-overlay.is-active {
        display: block;
    }
}

/* ===== Main Layout ===== */
main {
    flex: 1;
    max-width: 860px;
    width: 100%;
    margin: 48px auto;
    padding: 0 20px;
}

/* ===== Page Title ===== */
.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-tagline {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.page-title {
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    background: linear-gradient(135deg, #fff 30%, #a0ffa0 70%, #ffeb3b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ===== Divider ===== */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 255, 160, 0.28), transparent);
    margin: 0 auto 48px;
}

/* ===== Rules Grid ===== */
.rules-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rule-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 28px 28px;
    transition: border-color 0.25s, background 0.25s, transform 0.2s;
}

.rule-card:hover {
    border-color: rgba(160, 255, 160, 0.42);
    background: rgba(69, 99, 226, 0.22);
    transform: translateY(-3px);
}

/* Number badge */
.rule-number {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary), #7b5ea7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 14px rgba(69, 99, 226, 0.45);
}

.rule-body {
    flex: 1;
    min-width: 0;
}

.rule-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.rule-text {
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.rule-text strong {
    color: var(--yellow);
    font-weight: 700;
}

/* ===== Note box ===== */
.note-box {
    margin-top: 44px;
    background: rgba(69, 99, 226, 0.18);
    border: 1px solid rgba(69, 99, 226, 0.45);
    border-left: 4px solid var(--brand-primary);
    border-radius: 12px;
    padding: 22px 26px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.80);
    line-height: 1.7;
}

.note-box strong {
    color: var(--light);
}

/* ===== Footer ===== */
footer {
    background-color: var(--bg-main);
    color: #fff;
    text-align: center;
    padding: 4px;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

footer a {
    color: #82f7f0;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== Responsive ===== */

/* Tablets and large phones (≤ 700px) */
@media (max-width: 700px) {
    main {
        margin: 32px auto;
        padding: 0 16px;
    }

    .page-header {
        margin-bottom: 30px;
    }

    .divider {
        margin-bottom: 30px;
    }

    .note-box {
        padding: 16px 18px;
        margin-top: 32px;
    }
}

/* Phones (≤ 600px) */
@media (max-width: 600px) {
    main {
        margin: 22px auto;
        padding: 0 14px;
    }

    .page-header {
        margin-bottom: 24px;
    }

    .page-tagline {
        font-size: 0.72rem;
        letter-spacing: 2px;
    }

    .page-subtitle {
        font-size: 0.92rem;
    }

    .divider {
        margin-bottom: 24px;
    }

    .rules-grid {
        gap: 14px;
    }

    .rule-card {
        flex-direction: row;
        /* keep number side-by-side on medium phone */
        gap: 16px;
        padding: 18px 16px;
        align-items: flex-start;
    }

    .rule-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .rule-title {
        font-size: 0.98rem;
    }

    .rule-text {
        font-size: 0.88rem;
    }

    .note-box {
        padding: 14px 16px;
        font-size: 0.88rem;
        margin-top: 24px;
    }
}

/* Small phones (≤ 420px) — stack number above text */
@media (max-width: 420px) {
    main {
        margin: 16px auto;
        padding: 0 12px;
    }

    .rule-card {
        flex-direction: column;
        gap: 12px;
        padding: 16px 14px;
    }

    .rule-number {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .note-box {
        padding: 12px 14px;
    }
}

/* Header mobile — handled by hamburger menu above */


/* table_full body/main/footer rules removed — already scoped under body.page-table-full */

.ag-theme-alpine {
    --ag-font-family: 'Open Sans', 'Noto Sans', 'Nunito Sans', sans-serif;
    --ag-font-size: 11px;
    --ag-grid-size: 4px;
    --ag-background-color: #fcfafd;
    --ag-foreground-color: hsl(0, 0%, 22%);
    --ag-row-hover-color: #f5e7e1;
    --ag-selected-row-background-color: #d5d7e7;
    --ag-header-background-color: #f5f3ff;
    --ag-cell-horizontal-padding: calc(var(--ag-grid-size) * 2);
    --ag-cell-horizontal-border: solid rgb(238, 238, 238);
    --ag-header-column-separator-display: block;
    --ag-header-column-separator-height: 90%;
    --ag-header-column-separator-width: 1px
}

.ag-header-cell:not(.ag-header-cell-auto-height) .ag-header-cell-comp-wrapper {
    justify-content: center;
}

.ag-header-group-cell-label,
.ag-header-cell-label {
    display: flex;
    flex-grow: 0;
    /* Prevents extra space if content is small */
    flex-shrink: 1;
    /* Allows shrinking if necessary */
    align-items: center;
    overflow: hidden;
}

.ag-cell-label-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#myGrid {
    flex: 1 1 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0 auto;
}

.label {
    display: inline-block;
    padding: 3px 1px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 11px;
    color: black;
    vertical-align: middle;
}

.label-rank {
    background-color: #e8e9ff;
}

.centered-header {
    text-align: center;
}

.highlight-cell {
    position: relative;
    text-align: center;
    font-size: 11px;
    color: black;
    font-weight: bold;
}

.highlight-text {
    position: relative;
    z-index: 1;
}

.hexagon-highlight {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 18px;
    color: black;
}

.hexagon-highlight svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

body.page-table-full header {
    background-color: #18374d;
}

body.page-table-full ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

body.page-table-full li {
    flex: 1 1 auto;
    text-align: center;
}

@media (max-width: 768px) {
    body.page-table-full li {
        flex: 1 1 33%;
    }

    body.page-table-full li a {
        font-size: 11px !important;
        padding: 5px 6px !important;
    }

    body.page-table-full li a img {
        height: 30px !important;
    }
}

body.page-table-full li a {
    display: block;
    color: white;
    text-align: center;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 14px;
}

body.page-table-full li a:hover:not(.active) {
    background-color: var(--bg-main);
}

.active {
    background-color: #04AA6D;
}

#myGrid::-webkit-scrollbar-thumb {
    background-color: #77435e;
    border-radius: 6px;
}

#myGrid::-webkit-scrollbar-track {
    background-color: #e9d9e2;
}

/* For Firefox and other browsers supporting native CSS scrollbar properties */
#myGrid {
    scrollbar-color: #77435e #e9d9e2;
    scrollbar-width: thin;
}

/* Display scaling for smaller screens */
@media (max-width: 1024px) {
    .ag-theme-alpine {
        --ag-font-size: 13px;
    }

    .label {
        font-size: 11px;
        line-height: 12px;
    }

    .highlight-cell {
        font-size: 13px;
    }

    .hexagon-highlight {
        width: 24px;
        height: 24px;
        line-height: 22px;
    }
}

@media (max-width: 768px) {
    .ag-theme-alpine {
        --ag-font-size: 16px;
    }

    .label {
        font-size: 14px;
        line-height: 15px;
    }

    .highlight-cell {
        font-size: 14px;
    }

    .hexagon-highlight {
        width: 28px;
        height: 28px;
        line-height: 26px;
    }
}


/* Custom Tooltip Styles */
.custom-tooltip {
    background-color: rgba(210, 248, 188, 0.959);
    padding: 5px;
    border: 1px solid black;
    white-space: pre-line;
    /* Preserve line breaks */
}

/* Info Icon Style */
body.page-table-full .info-icon {
    color: blue;
    cursor: pointer;
    font-weight: bold;
    margin-left: 5px;
}

/* Reset zoom for mobile - scoped to table_full */
@media (max-width: 768px) {
    body.page-table-full {
        zoom: 1;
        height: 100vh;
        height: 100dvh;
    }
}



/* Global layout utilities missing from inline extractions */
.row-height-sm {
    height: 45px;
}

.text-aor-green {
    color: #a0ffa0 !important;
}

/* Scoped layout for table_full.php */
body.page-table-full {
    display: flex !important;
    flex-direction: column !important;
    height: 105.26vh !important;
    height: 105.26dvh !important;
    overflow: hidden !important;
    zoom: 0.95;
    margin: 0 !important;
    padding: 0 !important;
}

body.page-table-full header {
    background-color: #18374d !important;
    flex-shrink: 0 !important;
}

body.page-table-full header ul {
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
}

body.page-table-full header li {
    flex: 1 1 auto !important;
    text-align: center !important;
}

body.page-table-full header li a {
    display: block !important;
    color: white !important;
    text-align: center !important;
    padding: 10px 16px !important;
    text-decoration: none !important;
    font-size: 14px !important;
}

body.page-table-full header li a:hover:not(.active) {
    background-color: #1c223d !important;
}

body.page-table-full main {
    max-width: none !important;
    margin: 0 !important;
    flex: 1 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    padding: 2px !important;
}

body.page-table-full #myGrid {
    flex: 1 1 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
}

@media (max-width: 768px) {
    body.page-table-full {
        zoom: 1 !important;
        height: 100vh !important;
        height: 100dvh !important;
    }

    body.page-table-full header li {
        flex: 1 1 33% !important;
    }

    body.page-table-full header li a {
        font-size: 11px !important;
        padding: 5px 6px !important;
    }

    body.page-table-full header li a img {
        height: 30px !important;
    }
}

/* MERGED FROM channels.css */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

:root {
    --bg-color: #1c223d;
    --container-bg: #354269;
    --table-bg: #B7C1E6;
    --table-bg-hover: #c8d1ed;
    --text-light: #ffffff;
    --text-dark: #121629;
    --accent-color: #a0ffa0;
    --border-color: rgba(255, 255, 255, 0.1);
    --table-border: #a2add6;
    --link-color: #2b4c7e;
    --link-hover: #1a365d;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', 'Noto Sans', 'Nunito Sans', sans-serif;
    font-size: 16px;
    background-color: var(--bg-color);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* (header styles removed — consolidated into single block above) */

.container {
    max-width: 1200px;
    margin: 40px auto;
    background-color: var(--container-bg);
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

h1 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 2rem;
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.stats-text {
    display: block;
    font-size: 0.95rem;
    color: #ffeb3b;
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.table-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--table-bg);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: transparent;
    table-layout: auto;
}

th,
td {
    padding: 16px;
    border-bottom: 1px solid var(--table-border);
    font-size: 0.95rem;
    color: var(--text-dark);
    vertical-align: middle;
}

th {
    background-color: var(--container-bg);
    color: var(--text-light);
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    border-bottom: none;
}

@media screen and (min-width: 801px) {
    tr.reviewer-row {
        transition: background-color 0.2s ease;
        border-bottom: 2px solid var(--border-color);
    }

    tr.reviewer-row:last-child {
        border-bottom: none;
    }

    tr.reviewer-row td {
        transition: background-color 0.2s ease;
    }

    tr.reviewer-row:hover td {
        background-color: var(--table-bg-hover);
    }
}

.channel-avatar {
    height: 48px;
    width: 48px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 15px;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.flag {
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

a.person-link {
    display: inline-flex;
    align-items: center;
    background-color: var(--link-color);
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    gap: 6px;
}

a.person-link:hover {
    background-color: var(--link-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

a.person-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

a.person-link:hover svg {
    transform: translateX(3px);
}

td[data-label="Channel"] {
    text-align: left;
    font-weight: 600;
    font-size: 1.05rem;
}

.follower-count {
    display: block;
    font-size: 0.85rem;
    color: #3f4c6b;
    font-weight: 600;
    margin-top: 4px;
}

td[data-label="Reviewer Analysis"] {
    text-align: left;
}

td[data-label="Status"] {
    text-align: center;
    font-weight: 600;
    color: #334;
    white-space: nowrap;
}

@media screen and (max-width: 800px) {
    .container {
        margin: 20px;
        padding: 20px;
        border-radius: 12px;
        background-color: transparent;
        box-shadow: none;
    }

    h1 {
        border-bottom-color: rgba(255, 255, 255, 0.2);
        padding-left: 10px;
        color: var(--text-light);
    }

    table thead {
        display: none;
    }

    table,
    .table-wrapper,
    tbody {
        background-color: transparent;
        box-shadow: none;
        border-radius: 0;
        display: block;
    }

    tr.reviewer-row {
        display: flex;
        flex-direction: column;
        margin-bottom: 25px;
        background-color: var(--table-bg);
        border-radius: 14px;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
        overflow: hidden;
        border-bottom: none;
        padding: 0;
    }

    table tr:last-child {
        border-bottom: none;
    }

    table td {
        display: flex;
        flex-direction: column;
        text-align: left !important;
        padding: 10px 16px !important;
        border-bottom: none;
        position: relative;
        white-space: normal;
        min-height: auto;
        gap: 4px;
    }

    table td:last-child {
        border-bottom: none;
    }

    table td::before {
        content: attr(data-label);
        position: static;
        width: 100%;
        font-weight: 700;
        text-align: left;
        color: var(--container-bg);
        font-size: 0.85rem;
        text-transform: uppercase;
        margin-bottom: 4px;
        opacity: 0.8;
    }

    td[rowspan] {
        display: flex;
    }

    td[data-label="Channel"] {
        background-color: rgba(255, 255, 255, 0.4);
        padding-top: 16px !important;
        padding-bottom: 16px !important;
    }

    td[data-label="Reviewer Analysis"] {
        background-color: rgba(255, 255, 255, 0.15);
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    td[data-label="Reviewer Analysis"]::before {
        content: "REVIEWER\A ANALYSIS";
        white-space: pre-wrap;
        flex-shrink: 0;
        width: auto;
        margin-bottom: 0;
        margin-right: 10px;
    }

    td[data-label="Reviewer Analysis"]>div {
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    td[data-label="Status"] {
        white-space: normal !important;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    td[data-label="Status"]::before {
        flex-shrink: 0;
        width: auto;
        margin-bottom: 0;
        margin-right: 10px;
    }
}

@media screen and (max-width: 480px) {
    /* header styles handled by hamburger menu */

    .container {
        margin: 10px;
        padding: 10px;
    }

    h1 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    table td {
        padding: 8px 16px !important;
        text-align: left !important;
    }

    a.person-link {
        white-space: nowrap;
        height: auto;
        text-align: left;
        padding: 6px 10px;
        width: auto;
        display: inline-flex;
        justify-content: flex-start;
    }

    a.person-link svg {
        flex-shrink: 0;
    }
}

.search-container {
    margin-bottom: 25px;
}

#searchInput {
    width: 100%;
    max-width: 500px;
    padding: 14px 20px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #ffffff;
    color: var(--text-dark);
    border: 2px solid transparent;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#searchInput::placeholder {
    color: #8c98b9;
    font-style: italic;
}

#searchInput:focus {
    border-color: var(--accent-color);
    box-shadow: 0 4px 20px rgba(160, 255, 160, 0.15);
}

@media screen and (max-width: 800px) {
    #searchInput {
        max-width: 100%;
    }
}

/* MERGED FROM person.css */
/* Scoped layout for person pages (game_view.php, game_versus.php, person.php) */
body.page-person {
    font-size: 0.9rem;
}

/* Select2 dropdown fix: dark text on white background results */
.select2-container--default .select2-results__option {
    color: #333 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    color: #fff !important;
    background-color: #4563E2 !important;
}

@media (max-width: 767.98px) {
    body.page-person {
        font-size: 0.8rem;
    }
}

/* Container Layout */
.container_person {
    display: grid;
    width: 100%;
    background-color: #354269;
    max-width: 1200px;
    margin: 0 auto;
    gap: 5px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0.1fr, auto) 1fr;
    grid-template-areas:
        "person_details person_chart"
        "person_hexagons_names person_chart";
}

/* Person Details Section */
.person_details {
    background-color: #354269;
    grid-area: person_details;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.person_logo {
    padding: 5px;
    gap: 10px;
    background-color: #354269;
    min-height: 120px;
    grid-area: person_logo;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.logo_yt,
.yt_button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.person_info {
    padding: 5px;
    background-color: #354269;
    grid-area: person_info;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Channel Avatar Modern Effects */
.person_channel_avatar {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    box-shadow: 0 0 15px rgba(145, 156, 241, 0.5);
    border: 3px solid #919cf1;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.person_channel_avatar:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 10px 25px rgba(255, 133, 229, 0.8), 0 0 20px rgba(255, 133, 229, 0.5);
    border-color: #ff85e5;
}

/* Chart Classes */
.person_chart_compare {
    grid-area: person_chart;
    background: linear-gradient(225deg, rgba(57, 76, 129, 0.8), rgba(30, 40, 70, 0.9));
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.person_chart {
    background-color: #0d1737;
    padding: 5px;
    grid-area: person_chart;
    display: flex;
    gap: 8px;
    flex-direction: column;
    align-items: center;
    width: 100%;
    justify-content: center;
}

#chart {
    border-radius: 12px;
    overflow: visible;
    background: transparent;
    max-width: 450px;
    width: 100%;
}

/* Comparison Section */
.person_compare {
    background-color: #354269;
    grid-area: person_compare;
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Combined Hexagons & Names Section */
.person_hexagons_names {
    grid-area: person_hexagons_names;
    background: linear-gradient(145deg, rgba(57, 76, 129, 0.8), rgba(30, 40, 70, 0.9));
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* Hexagons Section (now inside combined container) */
.person_hexagons {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
}

/* Empty Section (now inside combined container) */
.person_empty {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.person_empty>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 150px;
    /* Maps to the 180px hexagon width - 30px overlap margins */
}

/* Video Section Responsive Grid */
.video-table {
    display: grid;
    width: 100%;
    max-width: 1200px;
    margin: 9px auto 30px auto;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 10px;
}

/* Container for each video row (Modern Card) */
.video-row-card {
    display: flex;
    flex-direction: column;
    background-color: #B7C1E6;
    border: 2px solid #8292c9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Modern Card Title (replaces Positions label) */
.video-card-title {
    background-color: #354269;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    padding: 12px 0;
    margin: 0;
    width: 100%;
    border-bottom: 2px solid #5031a9;
    letter-spacing: 1px;
}

.video-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    justify-content: center;
    text-align: center;
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.video-cell:last-child {
    border-bottom: none;
}

/* Card Label Header (Only for elements that need a data-label, e.g. Games in Range) */
.video-cell[data-label]::before {
    content: attr(data-label);
    display: block;
    width: calc(100% + 30px);
    /* offset the padding of .video-cell */
    font-weight: 800;
    color: #ffffff;
    background-color: #4a5a8a;
    /* Slightly lighter than the main title for hierarchy */
    text-transform: uppercase;
    font-size: 0.85rem;
    text-align: center;
    margin: -15px -15px 15px -15px;
    /* Pull into padding area */
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

/* YouTube Iframe Sizing */
.video-cell iframe.youtube-embed {
    width: 100%;
    max-width: 400px;
    height: 200px;
}

/* TikTok Embedding specific */
.video-cell blockquote.tiktok-embed {
    width: 100%;
    /* Let the TikTok embed script handle its own vertical height naturally */
}

/* Games List Container */
.video-cell ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: left;
}

/* Game List Items */
.video-cell li {
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 0.9rem;
    /* Sized down slightly for grid fit */
    background-color: rgba(255, 255, 255, 0.5);
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 5px solid #5031a9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: #2b2b2b;
}

.game-link {
    color: #173280;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.game-link:hover {
    color: #5031a9;
    text-decoration: underline;
}

/* Hexagon Styles */
.hex-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.hexagon-svg {
    width: 100%;
    /* Symmetrical margins to keep the group perfectly centered while maintaining the 30px overlap */
    margin-right: -15px;
    margin-left: -15px;
    height: auto;
    max-width: 180px;
    /* Trim desktop size slightly to free up space */
    flex-shrink: 1;
    /* Allow them to shrink if necessary */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
    cursor: default;
}

.hexagon-svg:hover {
    transform: translateY(-4px) scale(1.03);
    z-index: 10;
}

/* Base Shadow */
.hex-gold {
    filter: drop-shadow(0 4px 8px rgba(230, 161, 75, 0.4));
}

.hex-silver {
    filter: drop-shadow(0 4px 8px rgba(158, 162, 163, 0.4));
}

.hex-bronze {
    filter: drop-shadow(0 4px 8px rgba(193, 128, 100, 0.4));
}

/* Intensified Glow on Hover */
.hex-gold:hover {
    filter: drop-shadow(0 8px 16px rgba(251, 242, 173, 0.8));
}

.hex-silver:hover {
    filter: drop-shadow(0 8px 16px rgba(238, 238, 236, 0.8));
}

.hex-bronze:hover {
    filter: drop-shadow(0 8px 16px rgba(242, 223, 193, 0.8));
}

.hex-num-badge {
    fill: rgba(0, 0, 0, 0.6);
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 0.5px;
}

.container_person .hex-text {
    font-size: 8px;
    font-weight: 800;
    font-family: 'Open Sans', 'Noto Sans', 'Nunito Sans', sans-serif;
    text-anchor: middle;
}

.container_person .hex-text-gold {
    fill: #fbf2ad;
}

.container_person .hex-text-silver {
    fill: #eeeeec;
}

.container_person .hex-text-bronze {
    fill: #f2dfc1;
}

/* (header styles removed — consolidated into single block above) */

/* --- Inline block extraction from .person_info_card --- */
.person_info_card {
    background: linear-gradient(145deg, rgba(57, 76, 129, 0.8), rgba(30, 40, 70, 0.9));
    border-radius: 16px;
    padding: 16px;
    /* Reduced from 20px */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Reduced space between header and info row */
    width: 100%;
    box-sizing: border-box;
}

.person_info_header {
    display: flex;
    /* Flex layout to put avatar next to text */
    align-items: center;
    gap: 20px;
    text-align: left;
    /* Align text to left next to avatar */
}

.header_avatar_container {
    flex-shrink: 0;
}

.header_text_container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.person_name_display {
    font-weight: 800;
    color: #919cf1;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align left */
    gap: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.person_channel_display {
    color: #c4dbff;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.info_row {
    display: flex;
    flex-direction: column;
    /* Stack vertically for the narrow sidebar */
    gap: 4px;
    font-size: 0.95rem;
    line-height: 1.4;
    background-color: rgba(0, 0, 0, 0.15);
    padding: 10px 14px;
    border-radius: 10px;
    text-align: center;
    align-items: center;
    /* Center children */
}

.info_label {
    color: #82f7f0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.info_value {
    color: #ffffff;
    font-size: 1rem;
    word-break: break-all;
}

.info_value a {
    color: #ffeb3b;
    text-decoration: none;
    transition: color 0.2s;
}

.info_value a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.info_note {
    background-color: rgba(255, 125, 255, 0.1);
    border-top: 3px solid #ff7dff;
    border-left: none;
}

/* --- Inline block extraction from .compare_container --- */
.compare_container {
    background: none;
    border-radius: 12px;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 450px;
    /* Match chart width for cohesion */
    box-sizing: border-box;
}

.compare_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.compare_label {
    color: #ff85e5;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.compare_select_wrapper {
    width: 100%;
    max-width: 300px;
    /* keeps it from being too wide on desktop, but responsive on mobile */
}

/* Combined Responsive Styles (placed at end for precedence) */
@media (max-width: 767.98px) {
    body.page-person {
        font-size: 0.8rem;
    }

    .container_person {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "person_details"
            "person_chart"
            "person_hexagons_names";
    }

    .person_hexagons {
        gap: 5px;
        /* Tighter gap on mobile */
    }

    .hexagon-svg {
        max-width: 130px;
        /* Scale down more aggresively on mobile */
        /* Symmetrical margins to keep centered while maintaining the 20px overlap */
        margin-right: -10px;
        margin-left: -10px;
    }

    .person_empty>div {
        width: 110px;
        /* Maps to 130px hexagon width - 20px overlap margins */
    }
}

/* ══════════════════════════════════════════════════════════════
   COMPACT TABLE STYLES (index.html, ranks.php)
   Restored from original <style> blocks
   ══════════════════════════════════════════════════════════════ */

.game-cover {
    height: 70px;
    width: 70px;
    border-radius: 6px;
    object-fit: cover;
    vertical-align: middle;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #5031a9;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    background-color: #34495e;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn:hover:not(:disabled) {
    background-color: #4563E2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(69, 99, 226, 0.3);
}

.pagination-btn:disabled {
    background-color: #2c3e50;
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-info-box {
    font-weight: 600;
    color: #ffffff;
    background: #1a2533;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 120px;
    text-align: center;
}

@media screen and (max-width: 600px) {
    .pagination-container {
        gap: 8px;
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .page-info-box {
        padding: 6px 12px;
        font-size: 0.85rem;
        min-width: 100px;
        order: -1;
        width: 100%;
        margin-bottom: 5px;
    }
}

.bgg-score {
    color: #e65100;
    font-weight: 800;
}

.bgg-weight {
    color: #c2185b;
    font-weight: 800;
}

.aor-score {
    color: #2e7d32;
    font-weight: 800;
}

.stat-label {
    color: #4a5568;
    font-weight: 700;
    font-size: 0.85em;
}

.stat-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
}

.stat-group span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-group span:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-value {
    font-weight: 700;
}

/* ── Compact Table Layout (scoped to index.html, ranks.php) ── */
body.page-ranking .table-wrapper {
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    min-height: 500px;
    /* Increased to accommodate the Board Game search popup */
    position: relative;
    overflow: visible;
    /* Prevent clipping of popups on desktop */
}

/* Ensure the wrapper doesn't clip children vertically even if horizontal scroll is present */
@media screen and (min-width: 801px) {
    body.page-ranking .table-wrapper {
        overflow: visible !important;
    }
}


/* Visibility utility missing */
.d-none {
    display: none !important;
}

body.page-ranking table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

body.page-ranking th {
    background-color: #f8f9fa !important;
    color: #000000 !important;
    border-bottom: 2px solid #e0e0e0 !important;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.compact-row {
    background-color: #ffffff !important;
    color: #000000 !important;
    transition: all 0.2s ease;
}

.compact-row:nth-child(even) {
    background-color: #f4f6f9 !important;
}

.compact-row:hover {
    background-color: #eaf1fa !important;
}

.compact-row td {
    padding: 1px 4px !important;
    height: 30px !important;
    font-size: 0.85rem;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid #e0e0e0 !important;
    color: #000000 !important;
}

.game-cover-compact {
    height: 25px;
    width: 25px;
    border-radius: 4px;
    object-fit: cover;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
}

.trunc-name {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-btn {
    display: inline-block;
    background: transparent;
    color: #4563E2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-decoration: none;
    margin-left: 8px;
    border: 1px solid rgba(69, 99, 226, 0.6);
    vertical-align: middle;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.view-btn:hover {
    background: #4563E2;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(69, 99, 226, 0.4);
    border-color: #4563E2;
}

.bgg-badge {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 6px;
    color: #000000 !important;
    font-weight: 800;
    font-size: 0.85rem;
    min-width: 44px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: none;
}

.aor-score-text {
    color: #D92286;
    font-weight: 900;
    font-size: 0.85rem;
}

.vote-matrix-mobile-msg {
    display: none;
}

@media screen and (max-width: 800px) {
    body.page-ranking .table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        display: block !important;
    }

    body.page-ranking table {
        display: table !important;
        width: 100% !important;
        min-width: 850px;
        background: transparent !important;
        border-collapse: collapse;
    }

    body.page-ranking table thead {
        display: table-header-group !important;
    }

    body.page-ranking table tbody {
        display: table-row-group !important;
    }

    body.page-ranking tr.reviewer-row {
        display: table-row !important;
        background-color: transparent !important;
    }

    body.page-ranking table td,
    body.page-ranking table th {
        display: table-cell !important;
        padding: 6px 8px !important;
        vertical-align: middle !important;
    }

    body.page-ranking table td::before {
        display: none !important;
    }

    .vote-matrix-desktop {
        display: none !important;
    }

    .vote-matrix-mobile-msg {
        display: block !important;
        font-size: 0.75rem;
        color: #8c98b9;
        font-weight: 500;
        text-align: center;
        letter-spacing: 0.2px;
        line-height: 1.4;
        width: 100%;
        padding: 0;
    }
}

/* ── Mobile-specific stats & header area ── */
@media screen and (max-width: 600px) {
    .stats-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .stats-text {
        font-size: 0.95rem !important;
    }

    .vote-matrix-msg-wrap {
        align-items: flex-start !important;
        width: 100%;
    }

    /* Pagination: single row, no wrap, compact short labels */
    .pagination-container {
        flex-wrap: nowrap !important;
        gap: 4px !important;
        padding: 8px 2px !important;
    }

    .pagination-btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 7px 4px !important;
        font-size: 0.75rem !important;
        justify-content: center !important;
        gap: 2px !important;
    }

    /* Hide the SVG arrows on mobile to save space */
    .pagination-btn .icon-sm {
        display: none !important;
    }

    /* Show short labels on mobile */
    .btn-label-short {
        display: inline !important;
    }

    .btn-label-long {
        display: none !important;
    }

    /* Hide page-info box in top pagination (only keep it in bottom) */
    .paginationTop .page-info-box {
        display: none !important;
    }

    /* Bottom pagination: page-info is full width, above buttons */
    .paginationBottom {
        flex-wrap: wrap !important;
    }

    .paginationBottom .page-info-box {
        width: 100%;
        order: -1;
        margin-bottom: 4px;
        text-align: center;
    }
}

/* Hide spin buttons for Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Hide spin buttons for Firefox */
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ccf035;
    color: #222222;
    cursor: pointer;
    font-weight: 900;
    font-style: italic;
    font-size: 0.65rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.9;
    transition: opacity 0.2s, background-color 0.2s;
    vertical-align: middle;
    user-select: none;
    margin-left: 5px;
    line-height: 1;
}

.info-icon:hover {
    opacity: 1;
    background-color: #2e47c8;
}

.custom-tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.custom-tooltip-panel {
    visibility: hidden;
    background-color: rgba(210, 248, 188, 0.959);
    color: #000;
    text-align: left;
    padding: 5px 8px;
    border: 1px solid black;
    position: absolute;
    z-index: 9999;
    top: 100%;
    left: 0;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
    white-space: pre-wrap;
    font-weight: normal;
    font-size: 0.8rem;
    min-width: 250px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    line-height: 1.3;
}

.custom-tooltip-container:hover .custom-tooltip-panel {
    visibility: visible;
    opacity: 1;
}

.filter-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #8c98b9;
    padding: 2px 4px;
    margin-left: 5px;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.filter-btn:hover,
.filter-btn.active {
    color: #4563E2;
}

.filter-popup {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    /* Increased to stay above table content */
    min-width: 210px;
    text-align: left;
    cursor: default;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
}

.th-inner.left .filter-popup {
    left: 0;
    transform: none;
}

.filter-popup.show {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-popup select,
.filter-popup input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccd0d5;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    color: #000;
    background: #fff;
    box-sizing: border-box;
}

.filter-popup select:focus,
.filter-popup input:focus {
    border-color: #4563E2;
}

.th-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.th-inner.left {
    justify-content: flex-start;
}

/* ── Width utility classes for table columns ── */
.w-50 {
    width: 50px;
}

.w-60 {
    width: 60px;
}

.w-80 {
    width: 80px;
}

.w-100 {
    width: 100px;
}

.w-120 {
    width: 120px;
}

/* ── Text alignment utilities ── */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

/* ── Table cell text styles ── */
.game-rank-text {
    text-align: center;
    font-weight: bold;
    font-size: 0.85rem;
    color: #000000;
}

.game-year-text {
    text-align: center;
    font-size: 0.85rem;
    color: #555555;
    font-weight: 600;
}

.game-score-text {
    text-align: center;
    color: #000000;
    font-weight: 700;
}

.game-link-table {
    color: #000000;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.3px;
}

/* ── Loading & error states ── */
.loading-msg {
    text-align: center;
    padding: 40px;
    color: #4563E2;
    font-weight: bold;
    font-size: 1.2rem;
    background-color: #f8f9fa;
}

.spinner-icon {
    vertical-align: middle;
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.no-results-msg {
    text-align: center;
    padding: 30px;
    color: #c4dbff;
    font-style: italic;
}

.error-msg {
    text-align: center;
    padding: 30px;
    color: #ff6b6b;
    font-weight: bold;
}

/* ── SVG icon utilities ── */
.icon-sm {
    width: 16px;
    height: 16px;
}

.v-middle-mr-5 {
    vertical-align: text-bottom;
    margin-right: 5px;
}

/* ── Mobile brand name (hidden on desktop, shown in mobile nav bar) ── */
.mobile-brand {
    display: none;
}

/* ── Pagination label variants ── */
.btn-label-short {
    display: none;
    /* shown only on mobile via media query */
}

.btn-label-long {
    display: inline;
    /* hidden on mobile via media query */
}

/* ── Category quick-filter buttons ── */
.cat-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(69, 99, 226, 0.12);
    border: 1px solid rgba(69, 99, 226, 0.35);
    border-radius: 20px;
    color: #aeb9e1;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.3px;
    -webkit-tap-highlight-color: transparent;
}

.cat-filter-btn:hover {
    background: rgba(69, 99, 226, 0.28);
    border-color: rgba(69, 99, 226, 0.7);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(69, 99, 226, 0.3);
}

.cat-filter-btn.cat-active {
    background: rgba(217, 34, 134, 0.2);
    border-color: #D92286;
    color: #ff80df;
    box-shadow: 0 3px 12px rgba(217, 34, 134, 0.35);
}

/* ── Ranking type quick-filter buttons ── */
.rank-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 188, 180, 0.1);
    border: 1px solid rgba(0, 188, 180, 0.35);
    border-radius: 20px;
    color: #7dd6d3;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.3px;
    -webkit-tap-highlight-color: transparent;
}

.rank-filter-btn:hover {
    background: rgba(0, 188, 180, 0.26);
    border-color: rgba(0, 188, 180, 0.7);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 188, 180, 0.3);
}

.rank-filter-btn.rank-active {
    background: rgba(255, 193, 7, 0.18);
    border-color: #ffc107;
    color: #ffe57f;
    box-shadow: 0 3px 12px rgba(255, 193, 7, 0.35);
}

/* ── Mechanic quick-filter buttons ── */
.mech-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(156, 39, 176, 0.1);
    border: 1px solid rgba(156, 39, 176, 0.35);
    border-radius: 20px;
    color: #e1bee7;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.3px;
    -webkit-tap-highlight-color: transparent;
}

.mech-filter-btn:hover {
    background: rgba(156, 39, 176, 0.26);
    border-color: rgba(156, 39, 176, 0.7);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(156, 39, 176, 0.3);
}

.mech-filter-btn.mech-active {
    background: rgba(255, 0, 85, 0.18);
    border-color: #ff0055;
    color: #ff80ab;
    box-shadow: 0 3px 12px rgba(255, 0, 85, 0.35);
}

/* ── Filter groups layout ── */
.filter-group-wrap {
    display: flex;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 6px;
    margin-bottom: 10px;
    background: rgba(15, 20, 35, 0.3);
    max-width: 100%;
}

.filter-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-right: 8px;
    flex-shrink: 0;
    cursor: help;
    font-size: 0.9rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.filter-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    overflow: hidden;
    align-items: flex-start;
}

.filter-buttons-container:not(.expanded)>button:nth-child(n+6):not(.toggle-group-btn) {
    display: none;
}

.toggle-group-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #aeb9e1;
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 10px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    height: 26px;
    line-height: 1;
}

.toggle-group-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ── Channels & Reviewers Badge ── */
.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FFD700;
    box-shadow: 0 0 6px #FFD700;
    animation: pulseBadge 2s infinite;
    display: inline-block;
}

.stat-highlight {
    color: #FFD700;
    font-size: 1.15em;
    font-weight: 900;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

@keyframes pulseBadge {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.header-stats-desktop {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 12px;
    padding: 6px 14px;
    font-size: 0.82rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.4px;
    white-space: normal;
    line-height: 1.3;
}

.header-stats-mobile {
    display: none;
    align-items: flex-start;
    gap: 6px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.4px;
    white-space: normal;
    margin-right: 0;
    margin-left: 10px;
    line-height: 1.2;
}

@media (max-width: 601px) {
    .header-stats-desktop {
        display: none !important;
    }

    .header-stats-mobile {
        display: flex;
    }
}

@media (max-width: 480px) {
    .header-stats-mobile {
        font-size: 0.65rem;
        padding: 3px 8px;
        margin-right: 10px;
        gap: 4px;
    }
}

/* Resaltar borde del contenedor cuando tiene un filtro activo */
.filter-group-wrap:has(.rank-active),
.filter-group-wrap:has(.cat-active),
.filter-group-wrap:has(.mech-active) {
    border-color: #54c3a6 !important;
}