/* =========================================
   VARIABILE GLOBALE
   ========================================= */
:root {
    --bg-main: #0f0f12;
    --bg-card: #1a1a1f;
    --bg-header: #24242b;
    --accent: #00d4c8;
    --accent-glow: rgba(0, 212, 200, 0.3);
    --text-main: #e0e0e0;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #22c55e;
    --xp-color: #a855f7;
    --coin-color: #eab308;
}

/* =========================================
   RESET & BASE
   ========================================= */

/*
 * IMPORTANT: folosim 'clip' în loc de 'hidden' pe html/body.
 * 'hidden' ar crea un nou scroll context și ar bloca scrollul copiilor (table-wrapper, sub-tabs).
 * 'clip' taie vizual overflow-ul fără acest efect secundar.
 */
html {
    overflow-x: clip;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
    overflow-x: clip;
}

/* =========================================
   LAYOUT
   ========================================= */

.container {
    max-width: 95%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    overflow: visible;
}

/* =========================================
   HEADER
   ========================================= */

.header-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px 10px 20px;
    text-align: center;
}

.header-section .tracker-logo {
    height: 250px;
    width: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px var(--accent-glow));
}

.header-section h1 {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 0;
}

/* =========================================
   NAVIGARE — HUB BUTTON
   ========================================= */

.nav-top {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.hub-btn {
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.hub-btn:hover {
    background: var(--accent);
    color: var(--bg-main);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.hub-btn i { font-size: 1.1rem; }

/* =========================================
   NAVIGARE — TABS (3 niveluri)
   ========================================= */

.tabs-container {
    overflow: visible;
    margin-bottom: 20px;
}

/* Nivel 1: Main Tabs */
.main-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 15px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    white-space: nowrap;
}

.tab-btn.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

/* =========================================
   FIX DEFINITIV SUB-TABS
   ========================================= */

/* Elimină orice context de clipping pe toți părinții posibili */
.container,
.tabs-container,
#sub-tabs-container,
.sub-tabs {
    overflow-x: visible !important;
}

/* Wrapper dedicat pentru scroll — un div nou pe care îl adaugi în HTML */
.sub-tabs-scroll-wrapper {
    width: 100vw;               /* ocupă toată lățimea viewport-ului */
    margin-left: calc(-1 * ((100vw - 100%) / 2)); /* iese din container */
    padding: 6px 20px 12px 20px;
    overflow-x: auto;
    overflow-y: visible;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-card);
}

.sub-tabs-scroll-wrapper::-webkit-scrollbar { height: 4px; }
.sub-tabs-scroll-wrapper::-webkit-scrollbar-track { background: var(--bg-card); }
.sub-tabs-scroll-wrapper::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* Conținutul intern al wrapper-ului */
.sub-tabs-scroll-wrapper > div,
.sub-tabs-scroll-wrapper #sub-tabs-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    width: max-content; /* se extinde cât e nevoie */
}

.sub-tabs-scroll-wrapper .sub-btn {
    flex-shrink: 0;
}

/* Nivel 3: Sub-sub-tabs */
.sub-sub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    background: var(--bg-header);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Butoane sub-tabs (Crops, Trees, etc.) */
.sub-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.sub-tab-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* Butoane sub-sub-tabs */
.ss-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
}

.ss-btn .res-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Stare activă — comună pentru sub-btn și ss-btn */
.sub-btn.active,
.ss-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 212, 200, 0.1);
}

/* =========================================
   TABEL — WRAPPER & TABLE
   ========================================= */

/*
 * table-wrapper este scroll container-ul principal.
 * Scrollbar-ul orizontal apare imediat sub ultimul rând vizibil,
 * nu la fundul întregii pagini, deoarece are max-height + overflow-y: auto.
 */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-card);
}

.table-wrapper::-webkit-scrollbar { width: 6px; height: 6px; }
.table-wrapper::-webkit-scrollbar-track { background: var(--bg-card); border-radius: 3px; }
.table-wrapper::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
.table-wrapper::-webkit-scrollbar-thumb:hover { background: #00f5e9; }
.table-wrapper::-webkit-scrollbar-corner { background: var(--bg-card); }

.ft-table {
    width: 100%;
    min-width: 1200px; /* previne strivirea coloanelor pe ecrane mici */
    border-collapse: collapse;
}

/* Header sticky — funcționează corect în interiorul table-wrapper cu overflow */
.ft-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #1a1a1c;
    padding: 12px 15px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: capitalize;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ft-table td {
    padding: 10px 15px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ft-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* =========================================
   TABEL — CELULE SPECIALE
   ========================================= */

.item-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 260px;
    margin: 0 auto;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.item-icon {
    flex: 0 0 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    object-fit: contain;
}

.res-icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
}

/* Rând bifat/deblocat */
.unlocked-row {
    background-color: rgba(0, 212, 200, 0.04) !important;
    transition: background-color 0.3s ease;
}

.unlocked-row td {
    color: var(--text-muted) !important;
    opacity: 0.7;
    border-bottom: 1px solid rgba(0, 212, 200, 0.1) !important;
}

.unlocked-row td:first-child {
    position: relative;
    border-left: 3px solid var(--accent) !important;
    box-shadow: inset 10px 0 15px -10px rgba(0, 212, 200, 0.2);
}

.unlocked-row .item-icon,
.unlocked-row .res-icon {
    filter: grayscale(0.5) opacity(0.8);
    transition: 0.3s;
}

.unlocked-row:hover td { opacity: 1; }
.unlocked-row:hover .item-icon,
.unlocked-row:hover .res-icon { filter: grayscale(0) opacity(1); }

/* =========================================
   UTILITĂȚI
   ========================================= */

.text-center {
    text-align: center;
    white-space: nowrap;
}

.coin { color: var(--coin-color); font-weight: bold; }
.xp   { color: var(--xp-color);   font-weight: bold; }

.req-tag {
    background: #334155;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.req-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.req-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.req-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.counter-badge {
    font-size: 0.75rem;
    background: var(--border);
    color: var(--text-main);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.active .counter-badge {
    background: var(--accent);
    color: var(--bg-main);
}

/* =========================================
   SAVE BUTTON
   ========================================= */

.save-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 1000;
}

.save-progress-btn {
    background: var(--accent);
    color: var(--bg-main);
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: transform 0.2s, background 0.2s;
}

.save-progress-btn:hover {
    transform: translateY(-2px);
    background: #00f5e9;
}

.save-status-msg {
    background: rgba(34, 197, 94, 0.9);
    color: white;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.save-status-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   FORZA — LOGO & FLAG
   ========================================= */

.fh-logo-container {
    width: 50px;
    height: 50px;
    background-color: rgba(245, 245, 247, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fh-logo {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    display: block;
}

.fh-main-row:hover .fh-logo-container {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4),
                0 0 15px var(--accent-glow);
}

.fh-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* =========================================
   FORZA — TYPE IMAGE
   ========================================= */

.fh-type-container {
    width: 75px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background-color: #242424;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fh-type-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================
   FORZA — CAR MODEL CELL
   ========================================= */

.fh-model-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    font-weight: 600;
}

.fh-car-img {
    width: 85px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

/* =========================================
   FORZA — CLASS BADGE
   ========================================= */

.fh-class-badge {
    display: inline-flex;
    height: 28px;
    border: 2px solid var(--fh-class-color, #fff);
    background: white;
    border-radius: 2px;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.fh-class-letter {
    background: var(--fh-class-color, #fff);
    color: white;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.3);
}

.fh-class-score {
    background-color: #111111;
    color: #ffffff;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    min-width: 36px;
}

.class-d  { --fh-class-color: #3eb8e5; }
.class-c  { --fh-class-color: #F2A007; }
.class-b  { --fh-class-color: #ff6f00; }
.class-a  { --fh-class-color: #d12229; }
.class-s1 { --fh-class-color: #893ec1; }
.class-s2 { --fh-class-color: #0050d8; }
.class-x  { --fh-class-color: #55b031; }
.class-r  { --fh-class-color: #D6158B; }

/* =========================================
   FORZA — RARITY BADGE
   ========================================= */

.fh-rarity-badge {
    display: inline-block;
    padding: 4px 10px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.rarity-common        { background-color: #2d5512; }
.rarity-rare          { background-color: #3165b4; }
.rarity-epic          { background-color: #8139a6; }
.rarity-legendary     { background-color: #d79f22; }
.rarity-forza_edition {
    background: linear-gradient(90deg, #d332cf 0%, #4f63f6 100%);
    color: #ffffff;
    font-style: italic;
    border: none;
}
.rarity-treasure_car  { background-color: #ea820e; color: #ffffff; }
.rarity-barn_find     { background-color: #ea820e; color: #ffffff; }

/* =========================================
   FORZA — EXPANDABLE ROWS
   ========================================= */

.fh-main-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fh-main-row:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.fh-main-row.expanded {
    background-color: rgba(249, 115, 22, 0.04) !important;
}

.fh-main-row.expanded .expand-arrow {
    transform: rotate(180deg);
    color: var(--accent);
}

.expand-arrow {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 6px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.fh-details-row {
    background-color: #121217 !important;
}

.fh-details-row td {
    padding: 0 30px !important;
    border-top: none !important;
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.4);
}

.fh-details-inner {
    overflow: hidden;
    max-height: 0;
    padding: 0;
    opacity: 0;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
                padding    0.38s cubic-bezier(0.4, 0, 0.2, 1),
                opacity    0.28s ease;
}

.fh-details-inner.open {
    max-height: 600px;
    padding: 20px 0;
    opacity: 1;
}

.fh-details-container {
    display: flex;
    gap: 30px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* =========================================
   ANIMAȚII
   ========================================= */

@keyframes fadeInDetails {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   FORZA — HEAT BARS
   ========================================= */

.fh-heat-bar-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 52px;
}

.fh-heat-bar-value {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.fh-heat-bar-track {
    width: 44px;
    height: 5px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    overflow: hidden;
}

.fh-heat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   FORZA — DETAILS BLOCKS
   ========================================= */

.fh-details-block {
    flex: 1;
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 18px 22px;
    border-radius: 8px;
}

.fh-details-block h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 8px;
    text-align: left;
}

.fh-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.fh-stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.fh-stat-item span   { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.fh-stat-item strong { font-size: 1.05rem;  color: var(--text-main);  font-weight: 700; }

/* =========================================
   FORZA — SEARCH & COUNTER
   ========================================= */

.fh-search-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

#fh-search {
    width: 100%;
    max-width: 450px;
    min-width: 200px;
    padding: 12px 18px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#fh-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

#fh-search::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.fh-owned-counter {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 0.95rem;
    white-space: nowrap;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

.fh-owned-counter strong {
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 800;
    margin-left: 8px;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* =========================================
   FORZA — CHECKBOX TUNING
   ========================================= */

.fh-tuning-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
    vertical-align: middle;
}

/* =========================================
   FORZA — STATS DASHBOARD
   ========================================= */

.fh-stats-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    animation: fadeInDetails 0.3s ease-out;
}

.fh-stat-card {
    min-width: 200px;
    text-align: center;
    flex: 0 1 auto;
    padding: 25px 20px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.fh-stat-card--total {
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.fh-stat-card__title {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    font-size: 1rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: bold;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fh-stat-card__title--muted {
    color: var(--text-muted);
    border-bottom-color: rgba(255,255,255,0.06);
}

.fh-stat-card__number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.fh-stat-card__subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.fh-stat-card__subtitle--accent { color: var(--accent); }

/* =========================================
   FORZA — MANUFACTURER LABEL
   ========================================= */

.fh-logo-circle {
    width: 26px;
    height: 26px;
    background: rgba(245, 245, 247, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.fh-logo-circle img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.fh-manufacturer-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* =========================================
   FORZA — BUILD / MASTERY CELL
   ========================================= */

.fh-build-cell {
    font-size: 0.75rem;
    margin-bottom: 6px;
    padding: 6px;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
    border-left: 3px solid var(--accent);
    line-height: 1.2;
    text-align: left;
}

.fh-build-cell__make {
    color: var(--text-muted);
    font-size: 0.65rem;
    display: block;
    text-transform: uppercase;
}

/* =========================================
   FORZA — FINANCIAL DETAILS BLOCK
   ========================================= */

.fh-finance-block {
    max-width: 450px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.15);
    box-shadow: none;
}

.fh-finance-block__row {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.fh-finance-label   { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; margin-bottom: 4px; }
.fh-finance-value   { color: var(--text-main);  font-size: 1.1rem;  font-weight: bold; }
.fh-finance-value--accent { color: var(--accent); font-size: 1.2rem; text-shadow: 0 0 8px var(--accent-glow); }
.fh-finance-sep     { font-size: 1.2rem; color: rgba(255,255,255,0.2); }

/* =========================================
   FORZA — EVENT HISTORY BLOCK
   ========================================= */

.fh-history-block {
    min-width: 300px;
    flex: 1;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.15);
    box-shadow: none;
    padding: 15px 10px;
}

.fh-history-empty {
    color: rgba(255,255,255,0.25);
    font-style: italic;
    font-size: 0.85rem;
}

.fh-history-table { width: 100%; border-collapse: collapse; }

.fh-history-table th {
    text-align: left;
    padding: 4px 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: none;
}

.fh-history-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    border-top: none;
    border-left: none;
    border-right: none;
}

.fh-history-table tr  { cursor: pointer; }
.fh-history-event-name { font-weight: 600; color: var(--text-main); font-size: 0.85rem; }
.fh-history-event-cat  { font-style: italic; color: #888; font-size: 0.7rem; }
.fh-history-time       { color: var(--accent); font-family: monospace; font-weight: bold; font-size: 1rem; text-align: center; }

/* =========================================
   FORZA — BLOCK TITLE
   ========================================= */

.fh-block-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* =========================================
   FORZA — MODAL
   ========================================= */

.fh-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeInDetails 0.2s ease-out;
}

.fh-modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.fh-modal-content--narrow {
    max-width: 550px;
    max-height: 80vh;
}

.fh-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px 12px 0 0;
}

.fh-modal-header h2 {
    margin: 0;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
}

.fh-modal-category-pill {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 20px;
}

.fh-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.fh-modal-body {
    padding: 20px;
    overflow-y: auto;
}

/* =========================================
   FORZA — MANUFACTURER MODAL ITEMS
   ========================================= */

.fh-modal-car-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.fh-modal-car-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fh-modal-car-img {
    width: 70px;
    height: 38px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.fh-modal-car-name { font-weight: bold; color: var(--text-main); font-size: 1.05rem; }
.fh-modal-car-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.fh-modal-car-meta .build { color: var(--accent); }

/* =========================================
   FORZA — EVENT MODAL SECTIONS
   ========================================= */

.fh-event-section { margin-top: 25px; }

.fh-event-section__title {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.fh-event-section__title--empty {
    color: var(--text-main);
    margin-bottom: 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
}

.fh-event-section__empty {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-style: italic;
}

.fh-event-class-group {
    margin-bottom: 20px;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.fh-event-class-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.fh-event-records-table { width: 100%; border-collapse: collapse; }

.fh-event-records-table th {
    padding: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: none;
    border-top: none; border-left: none; border-right: none;
    font-weight: normal;
}

.fh-event-records-table td {
    padding: 10px 5px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    border-top: none; border-left: none; border-right: none;
}

.fh-event-car-cell { display: flex; align-items: center; gap: 12px; }

.fh-event-car-thumb {
    width: 50px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.fh-event-car-name  { font-weight: bold; color: var(--text-main); font-size: 0.95rem; }
.fh-event-car-meta  { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.fh-event-car-build { color: var(--accent); }

.fh-event-score {
    text-align: right;
    color: var(--accent);
    font-family: monospace;
    font-weight: bold;
    font-size: 1.15rem;
}

/* =========================================
   FORZA — EVENTS TABLE ROWS
   ========================================= */

.fh-clickable-card {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.fh-clickable-card:hover {
    background-color: rgba(255,255,255,0.03) !important;
}

.fh-events-logo { width: 18px; height: 18px; object-fit: contain; }

.fh-events-car-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.fh-events-type { width: 45px; height: 25px; margin: 0 auto; }
/* =========================================
   FIX SUB-TABS EVENTS
   ========================================= */
