@import url('https://fonts.cdnfonts.com/css/cascadia-code');

:root {
    --container-opacity: 0.93;
}


/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #131313;
}

::-webkit-scrollbar-thumb {
    background: #37373d;
    border-radius: 5px;
    border: 2px solid #131313;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b4b52;
}

/* Firefox compatibility */
* {
    scrollbar-width: thin;
    scrollbar-color: #37373d #131313;
}

body {
    font-family: 'Cascadia Code';
    font-weight: 600;
    background-color: #000000;
    background-image: url('MORPHLING.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    color: #d4d4d4;
    margin: 0;
    padding: 5px;
    padding-bottom: 60px;
    /* Space for buttons */
    /* Ensure no transform/filter on body breaks fixed positioning */
    transform: none;
    filter: none;
    perspective: none;
    -webkit-transform: none;
    position: relative;
    /* Containing block for absolute buttons */
    min-height: 100vh;
    /* Ensure body covers full viewport */
    box-sizing: border-box;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: rgba(0, 0, 0, 0.4);
}

h1 {
    text-align: center;
    margin-top: -5px;
    margin-bottom: 30px;
    backdrop-filter: blur(5px) brightness(120%);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
    position: relative;
    box-shadow: 0 10px 16px -6px rgba(0, 0, 0, 0.92);
}

h2 {
    color: #9cdcfe;
    margin-top: 0px;
    margin-bottom: 8px;
}

/* Nuovo contenitore per i due form principali */
.main-forms-container {
    display: flex;
    /* Abilita Flexbox */
    gap: 10px;
    /* Spazio tra i due form */
    justify-content: center;
    /* Centra i form orizzontalmente */
    align-items: flex-start;
    /* Allinea in alto */
    flex-wrap: wrap;
    /* Permette ai form di andare a capo su schermi piccoli */
    margin: 20px auto;
    /* Centra il contenitore nella pagina e aggiunge margine */
    max-width: fit-content;
    /* O una larghezza massima specifica per il contenitore */
    transition: transform 0.3s ease;
    /* Aggiunto per una transizione fluida dello spostamento */
    margin-bottom: -50px;
}

/* Stile per i form */
form,
.filters-form,
.empty-placeholder {
    background-color: rgba(5, 5, 5, 0.84);
    opacity: var(--container-opacity);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    transition: all 0.3s ease;
    height: fit-content;
}

/* Specific styles for the main recommendation form */
form {
    font-family: 'Cascadia Code';
    padding: 5px;
    height: auto;
    min-height: 150px;
    border-radius: 4px;
    border: 1px solid #2d2d30;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    max-width: 785px;
    margin: 0;
    flex-shrink: 1;
    margin-bottom: 89px;
    box-sizing: border-box;
}

/* Modifiche per il .filters-form e .empty-placeholder (using later definition) */
.filters-form,
.empty-placeholder {
    position: static;
    width: 315px;
    height: 335px;
    padding: 5px;
    border: 1px solid #2d2d30;
    border-radius: 4px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    visibility: visible;
    transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    flex-shrink: 0;
}

/* Stili specifici per il placeholder vuoto per corrispondere a filters-form */
.empty-placeholder {
    transform: none;
    visibility: visible;
}

/* Nuovo stile per il pannello di destra che contiene i filtri o la lista eroi (from first definition in original code) */
.right-panel-form-style {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    box-sizing: border-box;
    height: fit-content;
    /* This is the problem for the winrate list content */
}

/* Stile per la griglia degli input degli eroi */
.hero-grid {
    font-family: 'Cascadia Code';
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    height: 40px;
    /* Assicurati che sia 40px, non solo 40 */
}

/* Stile per gli input degli eroi */
.hero-input {
    font-family: 'Cascadia Code';
    width: 100%;
    margin: 0;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.4);
    color: #d4d4d4;
    border: 1px solid #404040;
    min-height: 32px;
    line-height: 1.2;
    padding: 6px;
    /* Aggiunto padding per coerenza */
    box-sizing: border-box;
    /* Include padding e border nella larghezza/altezza */
}

.hero-input.error {
    border-color: #ff4444;
    /* Rosso in caso di errore */
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

/* Stile per i bottoni */
button {
    font-family: 'Cascadia Code';
    /* Using the later definition */
    background-color: #074e7e;
    /* Using the later definition */
    color: #ffffff;
    /* Using the later definition */
    padding: 10px 20px;
    /* Using the later definition */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    /* Using the later definition */
    margin-top: 10px;
    /* Using the later definition */
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #37a4c3;
    /* Using the later definition */
}

/* Stile specifico per il bottone di cancellazione */
#clear-fields-button {
    width: 45px;
    /* Using the later definition */
    height: 40px;
    /* Using the later definition */
    border-radius: 4px;
    /* Using the later definition */
    background-color: #37373d;
    /* Using the later definition */
    color: #d4d4d4;
    /* Using the later definition */
    border: 1px solid #690101;
    /* Using the later definition */
    font-size: 24px;
    /* Using the later definition */
    font-weight: bold;
    /* Using the later definition */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

#swap-teams-button {
    width: 45px;
    height: 40px;
    border-radius: 4px;
    background-color: #37373d;
    color: #d4d4d4;
    border: 1px solid #444;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

#swap-teams-button:hover {
    background-color: #007acc;
    border-color: #007acc;
    color: white;
}

#clear-fields-button:hover {
    background-color: #910000;
    transform: scale(1.05);
}

#clear-fields-button:active {
    transform: scale(0.98);
    background-color: #2d2d30;
}

/* Stile per i tooltip */
.tooltip-container {
    position: relative;
    display: inline-block;
}

/* Nuova classe per il tooltip del Meta switch per mantenere il suo ordine */
.tooltip-meta-order {
    order: -1;
}

.tooltip-icon {
    display: inline-block;
    /* Using the later definition */
    width: 18px;
    /* Using the later definition */
    height: 18px;
    /* Using the later definition */
    position: relative;
    top: -2px;
    /* Using the later definition */
    line-height: 18px;
    /* Using the later definition */
    text-align: center;
    border-radius: 10%;
    /* Using the later definition */
    background-color: #569cd6;
    color: #000;
    /* Using the later definition */
    font-weight: bold;
    cursor: help;
    font-size: 12px;
}

.tooltip-content {
    display: block;
    /* Using the later definition */
    position: absolute;
    width: 300px;
    /* Using the later definition */
    background-color: #252526;
    /* Using the later definition */
    color: #d4d4d4;
    /* Using the later definition */
    border: 1px solid #569cd6;
    /* Using the later definition */
    border-radius: 4px;
    /* Using the later definition */
    padding: 12px;
    /* Using the later definition */
    font-size: 15px;
    /* Using the later definition */
    line-height: 1.4;
    /* Using the later definition */
    z-index: 1;
    bottom: 100%;
    left: 50%;
    transform: translate(-105%, 100%);
    /* Using the later definition */
    margin-bottom: 10px;
    /* Using the later definition */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    /* Using the later definition */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Regola per il tooltip generico (quello esistente) */
.tooltip-container:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Nuova regola per posizionare il tooltip a destra */
.tooltip-content.tooltip-right {
    bottom: auto;
    /* Resetta la proprietà bottom */
    top: 50%;
    /* Allinea verticalmente al centro */
    left: 100%;
    /* Posiziona a destra del contenitore */
    transform: translate(10px);
    margin-bottom: 0;
    /* Resetta il margin-bottom */
}

/* Stile per lo switch "Meta" */
.switch {
    position: relative;
    display: inline-block;
    width: 104px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #085488;
    /* Colore di sfondo della "traccia" dello switch (blu scuro) */
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 84px;
    /* 104px (width) - 16px (thumb width) - 4px (padding) = 84px */
    bottom: 4px;
    background-color: #690101;
    /* Rosso per quando Meta è OFF */
    transition: .4s;
}

.switch-text {
    font-size: 13px;
    /* Using the later definition */
    color: #000;
    /* Using the later definition */
    z-index: 1;
    pointer-events: none;
    font-weight: bold;
}

input:checked+.slider {
    background-color: #085488;
    /* Mantiene lo stesso colore di sfondo quando Meta è ON */
}

input:checked+.slider:before {
    transform: translateX(-80px);
    /* Sposta indietro di 80px rispetto alla posizione iniziale di 84px (84 - 80 = 4px da sinistra) */
    background-color: #4CAF50;
    /* Verde per quando Meta è ON */
}

input:checked+.slider .switch-text {
    color: #fff;
}

input:focus+.slider {
    box-shadow: 0 0 1px #085488;
}

.slider.round {
    border-radius: 5px;
    /* Using the later definition */
}

.slider.round:before {
    border-radius: 10%;
    /* Using the later definition */
}

.slider.round:hover {
    background-color: #37a4c3;
}

/* STILI SWITCH TERNARI CORRETTI */
.ternary-switches-container {
    padding: 10px 10px 0px 15px;
    /* Using the later definition */
}

.ternary-switch-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -3px;
    /* Using the later definition */
    margin-bottom: 7.4%;
    /* Using the later definition */
}

.filter-label {
    color: #d4d4d4;
    font-size: 14px;
    width: 120px;
    /* Using the later definition */
    text-align: left;
    font-weight: bold;
}

.ternary-switch {
    position: relative;
    display: flex;
    width: 180px;
    /* Using the later definition */
    height: 24px;
    /* Using the later definition */
    background-color: #085488;
    border-radius: 5px;
    /* Using the later definition */
    overflow: hidden;
}

.ternary-option {
    position: relative;
    flex: 1;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: #000;
    /* Using the later definition */
    font-size: 13px;
    /* Using the later definition */
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    /* Using the later definition */
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease;
}

.ternary-switch-track {
    position: absolute;
    top: 0;
    left: 33.33%;
    width: 33.33%;
    height: 100%;
    background-color: #569cd6;
    border-radius: 3px;
    /* Using the later definition */
    transition: all 0.3s ease;
    z-index: 1;
}

.ternary-switch[data-state="off"] .ternary-switch-track {
    left: 0;
    background-color: #ff4444;
}

.ternary-switch[data-state="idc"] .ternary-switch-track {
    left: 33.33%;
    background-color: #569cd6;
}

.ternary-switch[data-state="on"] .ternary-switch-track {
    left: 66.66%;
    background-color: #4CAF50;
}

.ternary-switch[data-state="off"] .ternary-option.left,
.ternary-switch[data-state="idc"] .ternary-option.middle,
.ternary-switch[data-state="on"] .ternary-option.right {
    color: #fff;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
}

.ternary-switch[data-state="off"] .ternary-option.middle,
.ternary-switch[data-state="off"] .ternary-option.right,
.ternary-switch[data-state="idc"] .ternary-option.left,
.ternary-switch[data-state="idc"] .ternary-option.right,
.ternary-switch[data-state="on"] .ternary-option.left,
.ternary-switch[data-state="on"] .ternary-option.middle {
    color: rgba(0, 0, 0, 0.6);
}

.ternary-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Stile per la tabella dei consigli/eroi */
.centered-table {
    font-family: 'Cascadia Code';
    /* Using the later definition */
    display: flex;
    /* Using the later definition */
    justify-content: center;
    /* Using the later definition */
    margin: 20px auto;
    max-width: 100%;
    /* Using the later definition */
    overflow-x: auto;
    padding: 10px 0;
    /* Using the later definition */
    background-color: transparent;
}

.info-container {
    background-color: rgba(5, 5, 5, 0.75);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 15px 15px;
    position: relative;
    display: block flex;
    justify-content: center;
    box-shadow: 0 4px 32px 0 rgba(0, 0, 0, 0.6);
}

.info-container p {
    max-width: 900px;
    width: 90%;
    margin: 0;
    line-height: 1.6;
}

table {
    font-family: 'Cascadia Code';
    /* Using the later definition */
    border-collapse: collapse;
    font-size: 14px;
    /* Using the later definition */
    width: auto;
    /* Using the later definition */
    max-width: 100%;
    /* Using the later definition */
    color: #cbcbcb;
    /* Using the later definition */
    background-color: #131313;
    /* Using the later definition */
    border: 2px solid #131313;
    /* Using the later definition */
    margin: 0 auto;
    /* Using the later definition */
    display: block;
    /* Using the later definition */
}

table th,
table td {
    font-family: 'Cascadia Code';
    /* Using the later definition */
    padding: 2px;
    /* Using the later definition */
    border: 2px solid #37373d;
    /* Using the later definition */
    text-align: left;
    height: 13px;
    /* Using the later definition */
    line-height: 1.2;
}

table th {
    font-family: 'Cascadia Code';
    /* Using the later definition */
    background-color: #2d2d30;
    font-weight: bold;
    padding: 8px;
    /* Using the earlier definition for padding in table th */
    text-align: left;
}

table tr:nth-child(even) {
    background-color: #131313;
    /* Using the later definition */
}

table tr:hover {
    background-color: #37373d;
}

#emptyPlaceholder table tbody tr {
    cursor: pointer;
}

#emptyPlaceholder table tbody tr td:first-child {
    width: 67% !important;
}

#emptyPlaceholder table tbody tr td:last-child {
    width: 33% !important;
}

#emptyPlaceholder table tbody tr.filtered {
    opacity: 0 !important;
}

#emptyPlaceholder table tbody tr:hover td:first-child {
    color: #569cd6;
    text-shadow: 0 0 8px rgba(86, 156, 214, 0.6);
    transition: all 0.2s ease;
}

.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #2d2d30;
    /* Using the later definition */
    border: 2px solid #37373d;
    /* Using the later definition */
    padding: 5px;
    /* Using the later definition */
    z-index: 1000;
}

.ui-menu-item {
    font-family: 'Cascadia Code';
    /* Using the later definition */
    padding: 5px;
    /* Using the later definition */
    cursor: pointer;
    font-size: 14px;
    /* Using the later definition */
    color: #cbcbcb;
    /* Using the later definition */
    background-color: #252526;
    /* Using the later definition */
}

.ui-menu-item:hover {
    background-color: #37373d;
    /* Using the later definition */
    color: #ffffff;
    /* Using the later definition */
}

input.error {
    border: 2px solid red !important;
    background-color: #4a0000 !important;
    /* Aggiunto !important per sovrascrivere */
}

table th:first-child,
table td:first-child {
    font-family: 'Cascadia Code';
    font-weight: bold;
    color: #cbcbcb;
}

table th:not(:first-child),
table td:not(:first-child) {
    color: #d4d4d4;
}

table td {
    font-family: 'Cascadia Code';
    font-size: 14px;
    padding: 10px;
    /* Using the later definition */
    border: 3px solid #37373d;
    /* Using the later definition */
}

#recommendation-form>div:last-child {
    display: flex;
    gap: 6px;
    margin-top: 0px;
    align-items: center;
}

h1 a {
    transition: all 0.3s ease;
    display: inline-block;
}

h1 a:hover {
    color: #37a4c3 !important;
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(55, 164, 195, 0.8));
    text-shadow:
        0 0 10px rgba(55, 164, 195, 0.9),
        0 0 20px rgba(55, 164, 195, 0.7),
        0 0 30px rgba(55, 164, 195, 0.5),
        0 0 40px rgba(55, 164, 195, 0.3);
    transform: scale(1.02);
}

.small-button {
    position: relative;
    margin-top: 0px;
    background-color: #085488;
    color: white;
    border: none;
    padding: 0px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    max-width: 90px;
    height: 24px;
    flex-shrink: 0;
    /*impedisce al bottone di rimpicciolirsi */
}

/* === UNIFIED STYLE FOR FIXED BUTTONS === */
/* [REMOVED DUPLICATE BUTTON STYLES] */

.contact-me-button:hover {
    background-color: #37a4c3;
    transform: translateY(-2px);
    /* Leggero effetto al passaggio del mouse */
}


/* Media Queries per la Responsiveness */
@media (max-width: 768px) {
    .main-forms-container {
        flex-direction: column;
        /* Impila i form verticalmente */
        align-items: center;
        /* Centra i form quando impilati */
        gap: 20px;
        /* Aumenta lo spazio verticale tra i form */
        margin: 10px auto;
        /* Riduce il margine superiore/inferiore su mobile */
        width: 100%;
        /* Assicura che il contenitore occupi tutta la larghezza */
        transform: none;
        /* Rimuovi la traslazione su mobile per centrare il blocco impilato */
    }

    form,
    .right-panel-form-style {
        /* Applica le stesse regole di responsività anche al nuovo pannello */
        max-width: 95vw;
        /* Il form occuperà il 95% della larghezza della viewport */
        padding: 15px;
        /* Leggermente ridotto il padding per schermi più piccoli */
        height: auto;
        /* Lascia che l'altezza si adatti al contenuto quando impilato */
    }

    .hero-input {
        min-width: unset;
        /* Rimuovi min-width fisso per maggiore flessibilità su mobile */
    }

    /* Adattamento per i bottoni fissi su mobile - REMOVED */

    /* Swap dei team */
    .picks-header {
        display: flex;
        align-items: center;
        /* Allinea verticalmente gli elementi al centro */
        justify-content: space-between;
        /* Sposta H2 a sinistra e bottone a destra */
        margin-bottom: 5px;
        /* Spazio tra l'intestazione e la griglia degli eroi */
    }

    .picks-header h2 {
        margin-bottom: 0;
        /* Rimuovi il margine inferiore predefinito di h2 */
    }
}

#top-winrate-heroes-list {
    max-height: 297px;
    /* Adjust as needed, a reasonable height for a scrollable list */
    overflow-y: auto;
    padding-right: 10px;
    /* To prevent scrollbar from overlapping content */
}

/* This prevents the fixed buttons from covering the last rows of the table */
.main-content {
    padding-bottom: 80px;
}

.info-container {
    backdrop-filter: blur(5px) brightness(700%);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: -10px;
    width: 100vw;
}

.info-container p {
    max-width: 1423px;
    width: 78%;
    line-height: 1.5;
}

/* === NEW LAYOUT CLASSES === */

.top-bar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
    background: rgba(255, 255, 255, 0.03);
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.match-id-container {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
    max-width: 200px;
}

#match-id-input {
    width: 100%;
    padding: 5px;
    background: #2d2d30;
    border: 1px solid #444;
    color: #eee;
    border-radius: 4px;
    font-size: 0.8em;
    height: 26px;
    box-sizing: border-box;
}

#fetch-match-button {
    padding: 0 8px;
    background: #007acc;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75em;
    height: 26px;
    white-space: nowrap;
    width: auto;
    margin-top: 0;
}

#fetch-match-button:hover {
    background: #37a4c3;
}

.pick-header {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 33px;
}



.action-buttons-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
    min-height: 50px;
}

.action-button-main {
    flex-grow: 1;
    min-height: 30px;
    font-weight: bold;
    font-size: 1.2em;
    background: #007acc;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0;
}

.action-button-main:hover {
    background: #37a4c3;
}

.action-button-clear {
    min-height: 45px;
    padding: 0 20px;
    background: #37373d;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-family: monospace;
    width: auto;
    margin-top: 0;
}

.action-button-clear:hover {
    background: #910000;
}

/* Tooltip Refactor Classes - STANDALONE */
.tooltip-container-header {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.tooltip-container-header:hover .tooltip-content-header {
    visibility: visible;
    opacity: 1;
}

.tooltip-icon-header {
    display: inline-block;
    position: relative;
    top: -7px;
    right: -15px;
    text-align: center;
    border-radius: 10%;
    background-color: #569cd6;
    color: #000;
    font-weight: bold;

    /* Specifics */
    font-size: 0.5em;
    width: 20px;
    height: 20px;
    line-height: 20px;
    cursor: help;
}

.tooltip-content-header {
    display: block;
    position: absolute;
    background-color: #252526;
    color: #d4d4d4;
    border: 1px solid #569cd6;
    border-radius: 4px;
    padding: 12px;
    z-index: 10;
    /* Higher z-index just in case */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;

    /* Specifics */
    width: 450px;
    text-align: left;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.5;
    bottom: 125%;
    left: 0;
    transform: translateX(-10%);
}

.tooltip-formula-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
    text-align: center;
    color: #4db8ff;
}

.tooltip-legend-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.blue-text {
    color: #4db8ff;
}

/* RADIANT / DIRE TOGGLE & THEMES */

/* Wrapper for the perspective switch */
.perspective-switch-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0px;
    align-items: center;
    gap: 0px;
    width: 64%;
}

.perspective-label {
    font-weight: bold;
    font-size: 16px;
    color: #d4d4d4;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Custom Toggle Switch for Radiant/Dire */
.team-switch {
    position: relative;
    display: inline-block;
    width: 160px;
    height: 28px;
    flex-shrink: 0;
    margin-right: 15px;
}

.team-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.team-slider {
    position: absolute;
    cursor: pointer;
    top: -2px;
    left: 0px;
    right: 0px;
    bottom: 0;
    background-color: #37373d;
    transition: .4s;
    border-radius: 4px;
    border: 1px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

/* Small Perspective Toggle Button for Tables */
.perspective-toggle-btn-small {
    background-color: transparent;
    border: 1px solid #555;
    color: #888;
    border-radius: 4px;
    cursor: pointer;
    /* User overrides */
    font-size: 19px;
    height: 26px;
    margin-left: 5%;
    margin-bottom: 0%;
    margin-top: 0%;
    margin-right: 10%;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    /* Keeping slight padding for clickability, adjusted if needed */
    width: auto;
    /* Allow width to fit content/icon */
    vertical-align: middle;
    transition: all 0.2s;
}

.perspective-toggle-btn-small:hover {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* If active/dire make it red on hover? Or just generic highlight */
.dire-theme .perspective-toggle-btn-small:hover {
    background-color: #ff4444;
    border-color: #ff4444;
}

.team-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 76px;
    left: 4px;
    bottom: 3px;
    background-color: #4CAF50;
    /* Radiant Green Default */
    transition: .4s;
    border-radius: 3px;
    z-index: 1;
}

/* Text labels inside the slider */
.team-label-radiant,
.team-label-dire {
    z-index: 2;
    font-size: 12px;
    font-weight: bold;
    color: #888;
    transition: color 0.3s;
    user-select: none;
    width: 43%;
    text-align: center;
}

.team-label-radiant {
    color: #fff;
}

/* Active by default */
.team-label-dire {
    color: #888;
}

/* CHECKED STATE (DIRE) */
input:checked+.team-slider {
    background-color: #37373d;
}

input:checked+.team-slider:before {
    transform: translateX(76px);
    background-color: #ff4444;
    /* Dire Red */
}

input:checked+.team-slider .team-label-radiant {
    color: #888;
}

input:checked+.team-slider .team-label-dire {
    color: #fff;
}

/* THEME STYLES */
/* Radiant Mode (Default) */
.radiant-theme .ally-section {
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.1);
}

.radiant-theme .enemy-section {
    border-color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.1);
}

.radiant-theme h2.ally-title {
    color: #4CAF50;
}

.radiant-theme h2.enemy-title {
    color: #ff4444;
}

/* Dire Mode */
.dire-theme .ally-section {
    border-color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.1);
}

.dire-theme .enemy-section {
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.1);
}

.dire-theme h2.ally-title {
    color: #ff4444;
}

.dire-theme h2.enemy-title {
    color: #4CAF50;
}

/* Add borders to hero grids to make the section clear */
.hero-grid-container {
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin-bottom: 6px;
}

/* Homepage Info Container Refactor */
.info-container {
    margin-top: 20px;
}

.info-container .split-layout {
    display: flex;
    gap: 20px;
    /* User requested 20px */
    align-items: flex-start;
    flex-wrap: wrap;
}

.info-container .download-section {
    flex: 1;
    min-width: 250px;
    border-right: 1px solid #333;
    padding-right: 25px;
    /* Kept my adjustment for alignment */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
}

.info-container .usage-section {
    flex: 2;
    min-width: 300px;
}

.info-container p {
    max-width: 920px;
    width: 100%;
    line-height: 1.6;
    color: #d4d4d4;
}

/* Enhanced Download CTA Button */
.btn-download-cta {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    font-family: 'Cascadia Code', monospace;
    font-weight: bold;
    font-size: 1.1em;
    padding: 15px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 80%;
    box-sizing: border-box;
}

.btn-download-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #5dbf61 0%, #4CAF50 100%);
    color: white;
    text-decoration: none;
}

.btn-download-cta:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

.btn-download-subtitle {
    display: block;
    font-size: 0.7em;
    font-weight: normal;
    opacity: 0.8;
}

/* === UNIFIED STYLE FOR FIXED BUTTONS - REMOVED === */