body {
    background-color: #000000;
    background-image: url(http://transparenttextures.com/patterns/brick-wall-dark.png);
    /* This is mostly intended for prototyping; please download the pattern and re-host for production environments. Thank you! */    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    padding: 20px;
}

h1 {
    font-family: 'Teko', sans-serif;
    font-size: 4.2rem;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 30px;
    line-height: 0.9;
    background: -webkit-linear-gradient(45deg, #eeeeee, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.1);
}

#app {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.event-card {
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.6), rgba(20, 20, 20, 0.8));
    border: 1px solid #444;
    border-radius: 12px;
    margin-bottom: 30px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.event-header {
    border-bottom: 1px solid #D20A0A;
    padding-bottom: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    position: relative;
    user-select: none; /* Prevents text selection on click */
}

.event-header::after {
    content: '−'; /* Minus sign for expanded state */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    font-weight: bold;
    color: #888;
}

.event-card.collapsed .event-header::after {
    content: '+'; /* Plus sign for collapsed state */
}

.event-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
}

.event-header p {
    margin: 5px 0 0;
    color: #ccc;
    font-size: 16px;
}

.fight-card {
    padding: 15px;
    border-bottom: 1px solid #444;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin: 0 -15px 10px -15px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.fight-card:hover {
    background-color: rgba(55, 55, 55, 0.5);
}

.fight-card.betting-opportunity {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(255, 215, 0, 0.1));
    border: 2px solid #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), inset 0 0 20px rgba(0, 255, 136, 0.1);
    animation: betting-pulse 2s ease-in-out infinite alternate;
}

@keyframes betting-pulse {
    from {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), inset 0 0 20px rgba(0, 255, 136, 0.1);
    }
    to {
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.5), inset 0 0 30px rgba(0, 255, 136, 0.2);
    }
}

/* --- Betting Display Styles --- */
.betting-stats {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
}

.betting-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 60px;
}

.betting-stat-label {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 2px;
}

.betting-stat-value {
    font-weight: bold;
    font-size: 1.1rem;
}

.betting-profit-positive {
    color: #00ff88;
}

.betting-profit-positive::before {
    content: '+$';
}

.betting-profit-negative {
    color: #ff4444;
}

.betting-profit-negative::before {
    content: '-$';
}

.betting-profit-neutral {
    color: #aaa;
}

.betting-profit-neutral::before {
    content: '$';
}

.fight-odds {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-family: 'Teko', sans-serif;
    font-size: 1.1rem;
}

.fight-odds-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.odds-label {
    color: #aaa;
    font-size: 0.9rem;
}

.odds-value {
    color: #00ff88;
    font-weight: bold;
}

.model-betting-result {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
    font-size: 0.9rem;
    padding: 2px 6px;
    border-radius: 5px;
    vertical-align: middle;
}

.model-betting-result.betting-profit-positive {
    background-color: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.model-betting-result.betting-profit-negative {
    background-color: rgba(255, 68, 68, 0.15);
    color: #ff4444;
}

.bet-icon {
    font-size: 1.1em;
    line-height: 1;
}

.betting-profit-display {
    font-weight: bold;
}

.event-summaries {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.betting-summary .betting-profit-positive {
    color: #00ff88;
    font-weight: bold;
}

.betting-summary .betting-profit-negative {
    color: #ff4444;
    font-weight: bold;
}

.fight-betting-summary .betting-stats {
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.fight-betting-summary .betting-stat {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.05);
    min-width: 80px;
    flex: 0 0 auto;
}

.fight-odds {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.fight-odds-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.odds-label {
    font-size: 0.9em;
    color: #aaa;
}

.odds-value {
    font-size: 1.1em;
    font-weight: bold;
}

.event-betting-summary {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(255, 215, 0, 0.1));
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.event-betting-summary h4 {
    margin: 0 0 10px 0;
    color: #00ff88;
    font-family: 'Teko', sans-serif;
    font-size: 1.3rem;
}

.event-betting-summary .betting-stats {
    margin-top: 0;
}

.betting-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(45deg, #00ff88, #FFD700);
    color: #000;
    padding: 4px 8px;
    border-radius: 12px;
    font-family: 'Teko', sans-serif;
    font-size: 12px;
    font-weight: bold;
    animation: indicator-bounce 1.5s ease-in-out infinite;
}

@keyframes indicator-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.fight-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.consensus-prediction {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px 0;
}

.fighter-display {
    flex-basis: 150px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.winner-crown {
    height: 25px;
    width: 45px;
    visibility: hidden; /* Hide the crown by default */
}

.fighter-name {
    font-size: 18px;
    font-weight: bold;
    font-family: 'Teko', sans-serif;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.fighter-name.winner {
    color: #FFD700; /* Cool gold/yellow color */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.fighter-name.loser-f1 {
    color: #D20A0A;
}

.fighter-name.loser-f2 {
    color: #1E90FF;
}

.fighter-odds {
    font-family: 'Teko', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #00ff88;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
    margin-top: 2px;
}

.prediction-bar {
    flex-grow: 1;
    height: 35px;
    background-color: #1E90FF;
    border: 1px solid #555;
    border-radius: 5px;
    display: flex;
    position: relative;
    overflow: hidden; /* Ensures the inner bar respects the border radius */
}

.bar-fighter1 {
    height: 100%;
    background-color: #D20A0A;
    transition: width 0.5s ease-in-out;
}

.prob-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.mobile-arrow {
    display: none;
}

.f1-prob {
    left: 10px;
}

.f2-prob {
    right: 10px;
}

.details-breakdown {
    margin-top: 15px;
}

.details-breakdown {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.details-breakdown table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.details-breakdown th, .details-breakdown td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.details-breakdown th {
    background-color: #2c2c2c;
}

.details-breakdown td.winner-f1 {
    color: #D20A0A;
    font-weight: bold;
}

.details-breakdown td.winner-f2 {
    color: #1E90FF;
    font-weight: bold;
}

.error {
    text-align: center;
    color: #ffcdd2;
    background-color: #b71c1c;
    padding: 15px;
    border-radius: 8px;
}

.fights-container {
    max-height: 10000px; /* A large value to allow content to show */
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.event-card.collapsed .fights-container {
    max-height: 0;
}

/* --- Responsive Mobile Styles --- */
@media (max-width: 768px) {
    .event-summaries {
        align-items: flex-start;
    }

    .fight-odds {
        flex-direction: column;
        align-items: stretch;
    }

    .fight-odds-item {
        flex-direction: row;
        justify-content: space-between;
    }
    h1 {
        font-size: 3rem;
        letter-spacing: 1px;
    }

    .consensus-prediction {
        flex-wrap: wrap;
        gap: 10px;
    }

    .fighter-display {
        flex-basis: 45%;
        order: 1; /* Move names to the top row */
    }

    .prediction-bar {
        flex-basis: 100%;
        order: 2; /* Move bar to the bottom row */
    }

    /* Hide desktop percentages */
    .prob-text {
        display: none;
    }

    /* Cool mobile percentages using pseudo-elements */
    .prediction-bar::before,
    .prediction-bar::after {
        content: '';
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        font-weight: bold;
        color: white;
        text-shadow: 1px 1px 2px black;
        font-size: 18px;
    }

    .prediction-bar::before {
        content: attr(data-prob-f1);
        left: 10px;
    }

    .prediction-bar::after {
        content: attr(data-prob-f2);
        right: 10px;
    }

    .table-wrapper {
        overflow-x: auto;
        max-height: 5000px;
        transition: max-height 0.4s ease-in-out;
    }
} 

.breakdown-table th, .breakdown-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #444;
}

/* --- Past Results Page --- */

.nav-link {
    display: block;
    text-align: center;
    margin: -10px 0 20px 0;
    font-family: 'Roboto', sans-serif;
    color: #00aaff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
}

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

#insights-container,
#results-container {
    background-color: rgba(20, 20, 20, 0.7);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#results-container h2,
#insights-container h2 {
    text-align: center;
    font-family: 'Teko', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    margin-top: 0;
    border-bottom: 2px solid #d13a3a;
    padding-bottom: 10px;
    margin-bottom: 0;
}

#past-events {
    margin: 20px auto 0;
    max-width: 900px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* --- Enhanced Podium Styles --- */
.scoreboard-list {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.scoreboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    gap: 15px;
}

.scoreboard-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 12px;
    z-index: 1;
}

.scoreboard-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* First place - Gold */
.scoreboard-item:nth-child(1) {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    border: 3px solid #FFED4E;
    animation: goldGlow 2s ease-in-out infinite alternate;
}

/* Second place - Silver */
.scoreboard-item:nth-child(2) {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 50%, #808080 100%);
    border: 3px solid #E5E5E5;
    animation: silverGlow 2s ease-in-out infinite alternate;
}

/* Third place - Bronze */
.scoreboard-item:nth-child(3) {
    background: linear-gradient(135deg, #CD7F32 0%, #B8860B 50%, #A0522D 100%);
    border: 3px solid #DEB887;
    animation: bronzeGlow 2s ease-in-out infinite alternate;
}

@keyframes goldGlow {
    0% { box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.2); }
    100% { box-shadow: 0 15px 35px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.4); }
}

@keyframes silverGlow {
    0% { box-shadow: 0 8px 25px rgba(192, 192, 192, 0.4), 0 0 15px rgba(192, 192, 192, 0.2); }
    100% { box-shadow: 0 15px 35px rgba(192, 192, 192, 0.6), 0 0 25px rgba(192, 192, 192, 0.4); }
}

@keyframes bronzeGlow {
    0% { box-shadow: 0 8px 25px rgba(205, 127, 50, 0.4), 0 0 15px rgba(205, 127, 50, 0.2); }
    100% { box-shadow: 0 15px 35px rgba(205, 127, 50, 0.6), 0 0 25px rgba(205, 127, 50, 0.4); }
}

.scoreboard-rank {
    position: relative;
    z-index: 2;
    margin-right: 15px;
    flex-shrink: 0;
}

.scoreboard-medal {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.scoreboard-item:hover .scoreboard-medal {
    transform: scale(1.1) rotate(5deg);
}

.scoreboard-model-name {
    flex-grow: 1;
    font-family: 'Teko', sans-serif;
    font-size: 1.8rem;
    color: #000;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: 700;
    text-align: left;
    line-height: 1.1;
    position: relative;
    z-index: 2;
}

.scoreboard-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.scoreboard-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.7);
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 900;
    color: #000;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.6);
}

.stat-value.betting-profit-positive {
    color: #004d00;
}

.stat-value.betting-profit-negative {
    color: #8b0000;
}

/* --- New Event Header Collapsible Style (+/-) --- */
.past-event-card > h3.collapsible-header {
    position: relative;
    cursor: pointer;
    user-select: none;
    padding-right: 40px; /* Space for the icon */
}

.past-event-card > h3.collapsible-header::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    line-height: 1;
    color: #aaa;
    font-family: 'Roboto', sans-serif;
    font-weight: 900;
    transition: transform 0.3s ease;
}

.past-event-card > h3.collapsible-header.active::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}
/* ------------------------------------------------ */

.past-event-card {
    background-color: rgba(40, 40, 40, 0.40);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.past-event-card h3 {
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
    margin: 0 0 5px 0;
    color: #fff;
}

.past-event-card .event-date {
    font-size: 0.9em;
    color: #a0a0a0;
    margin: 0;
    font-family: 'Teko', sans-serif;
}

.event-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.9em;
    color: #a0a0a0;
    margin: 5px 0 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.best-model,
.betting-summary {
    font-weight: 500;
    margin: 0;
    text-align: right;
    font-family: 'Teko', sans-serif;
    font-size: 1.1em;
    letter-spacing: 0.5px;
}

.best-model .accuracy {
    color: #4CAF50; /* A green color to indicate success */
    font-weight: bold;
}

.past-fights-container {
    border-top: 1px solid #444;
    padding-top: 15px;
}

.past-fight {
    border-top: 1px solid #555;
    padding: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.past-fight:first-child {
    border-top: none;
}

.past-fight-info {
    flex: 1;
    min-width: 250px;
}

.past-fight-info h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.actual-winner {
    font-weight: 900;
    color: #ffc107; /* Gold */
}

.model-accuracy-summary {
    background-color: rgba(0, 0, 0, 0.2);
    border-left: 4px solid #00aaff;
    padding: 8px 12px;
    margin-top: 10px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: #ddd;
    cursor: default;
    position: relative;
    user-select: none;
}


.model-accuracy-summary .correct-count {
    font-weight: 900;
    font-size: 1.1rem;
    color: #28a745; /* Green */
}

.model-accuracy-summary .total-count {
    font-weight: 900;
    font-size: 1.1rem;
    color: #fff;
}

.past-fight-predictions {
    flex: 2;
    min-width: 300px;
}

/* Styling for the list of model predictions */
.past-fight-predictions ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
}

.past-fight-predictions li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.past-fight-predictions .model-info {
    display: flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
    flex-grow: 1; /* Allow this to take up space */
}

.past-fight-predictions .betting-info {
    margin-left: auto; /* Pushes the betting info to the right */
    white-space: nowrap; /* Prevents the bet amount from wrapping */
}

/* --- Mobile Specific Adjustments for Predictions --- */
@media (max-width: 480px) {
    .past-fight-predictions li {
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start; /* Align to the start */
        gap: 5px;
        border-bottom: 1px solid #444;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .past-fight-predictions li:last-child {
        border-bottom: none;
    }

    .past-fight-predictions .betting-info {
        margin-left: 0; /* Reset margin */
        width: 100%;
        text-align: center; /* Center align bet info */
    }
}

.past-fight-predictions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
}

.past-fight-predictions li {
    padding: 4px 0;
    display: flex;
    align-items: center;
}

.probability {
    color: #aaa;
    font-size: 0.8rem;
}

.collapsible-header {
    /* Generic styles removed as they are now specific */
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.correct-pick {
    color: #28a745; /* Green */
    font-weight: bold;
    margin-right: 8px;
}

.incorrect-pick {
    color: #d13a3a; /* Red */
    font-weight: bold;
    margin-right: 8px;
}

.error {
    color: #ffc107;
    text-align: center;
    font-weight: bold;
} 

/* Profit Chart - Clean Design */
#profit-chart-container {
    position: relative;
    margin: 20px auto 40px;
    padding: 0 20px;
    max-width: 1000px;
}

#profit-chart {
    width: 100% !important;
    height: 400px !important;
    max-height: 400px;
    background: rgba(20, 20, 20, 0.5);
    border-radius: 12px;
    padding: 20px;
    border: none;
    flex-shrink: 0;
}

/* Summary Cards */
.summary-cards {
    margin-bottom: 30px;
}

.summary-cards > div {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.summary-cards > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    #profit-chart-container {
        padding: 0 10px;
    }
    
    #profit-chart {
        height: 300px !important;
        padding: 15px;
    }
    
    .summary-cards > div {
        min-width: 150px !important;
        padding: 15px !important;
    }
    
    .summary-cards h3 {
        font-size: 16px !important;
    }
    
    .summary-cards div[style*="font-size: 24px"] {
        font-size: 20px !important;
    }
}

/* Insights Table */
#insights-table-container {
    margin: 20px auto 40px;
    padding: 0 15px;
    max-width: 1200px;
}

.insights-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.insights-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #282c34;
    color: #e6e6e6;
    font-size: 1rem;
    min-width: 800px; /* Ensures table has a minimum width for scrolling */
}

.insights-table th, .insights-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid #3a3f4b;
    text-align: center;
    white-space: nowrap;
}

.insights-table thead th {
    background-color: #d13a3a;
    color: #ffffff;
    font-weight: 600;
    font-family: 'Teko', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.insights-table tbody tr {
    transition: background-color 0.2s ease-in-out;
}

.insights-table tbody tr:nth-child(even) {
    background-color: #2c313a;
}

.insights-table tbody tr:hover {
    background-color: #3a3f4b;
}

.insights-table tfoot {
    font-weight: bold;
    background-color: #1f2328;
    color: #fff;
}

.insights-table tfoot td {
    border-top: 2px solid #d13a3a;
}

/* --- Media Queries for Mobile Responsiveness --- */
@media (max-width: 820px) {
    #insights-container {
        padding: 10px 5px;
    }
    
    #insights-table-container {
        padding: 0;
        margin: 15px auto 20px;
    }

    .insights-table th, .insights-table td {
        padding: 6px 8px;
        font-size: 0.85rem;
        text-align: center;
    }

    .insights-table thead th {
        font-size: 1rem;
        padding: 8px 6px;
    }
    
    .insights-table {
        min-width: unset;
        width: 100%;
    }
}
    body {
        padding: 5px;
    }

    main#app {
        padding: 5px;
    }

    h1 {
        font-size: 2.8rem;
        margin-bottom: 20px;
    }

    #results-container h2 {
        font-size: 2rem;
    }

    #past-events {
        padding: 0 5px;
        margin-top: 15px;
    }

    #scoreboard {
        overflow-x: visible; /* No longer need to scroll */
    }

    .scoreboard-list {
        padding: 15px;
        max-width: 100%;
    }

    .scoreboard-item {
        max-width: 100%;
        padding: 15px;
    }

    .scoreboard-item:nth-child(1),
    .scoreboard-item:nth-child(2),
    .scoreboard-item:nth-child(3) {
        animation: none;
    }

    .scoreboard-medal {
        width: 40px;
        height: 40px;
    }

    .scoreboard-model-name-container {
        gap: 10px;
    }

    .scoreboard-model-name {
        font-size: 1.4rem;
    }

    .scoreboard-betting-stats {
        flex-direction: row;
        gap: 8px;
    }

    .scoreboard-betting-stats .betting-stat {
        min-width: 45px;
    }

    .scoreboard-betting-stats .betting-stat-label {
        font-size: 0.65rem;
    }

    .scoreboard-betting-stats .betting-stat-value {
        font-size: 0.9rem;
    }

    .scoreboard-accuracy-container {
        align-items: center;
    }

    .scoreboard-accuracy {
        font-size: 1.2rem;
    }

    .scoreboard-record {
        font-size: 0.8rem;
    }

    /* Optimize past event layout for mobile */
    .past-event-card {
        padding: 10px;
        margin-bottom: 15px;
    }

    .event-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .event-summaries {
        align-items: flex-start;
    }

    .best-model,
    .betting-summary {
        text-align: left;
    }

    .past-event-card > h3.collapsible-header {
        padding-right: 35px;
    }

    /* Adjust +/- icon for mobile */
    .past-event-card > h3.collapsible-header::after {
        font-size: 1.8rem;
        right: 10px;
    }

    .past-fight {
        flex-direction: column;
        padding: 10px 0;
        gap: 10px;
    }

    .past-fight-info, .past-fight-predictions {
        min-width: 100%;
        width: 100%;
    }

    .past-fight-info h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .model-accuracy-summary {
        padding: 10px;
        text-align: left;
    }
}

/* Floating Info Box */
.floating-info {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background-color: rgba(20, 20, 20, 0.9);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    font-size: 0.8rem;
}

.floating-info .last-run,
.floating-info .last-updated,
.floating-info .contact-info {
    margin: 5px 0;
    color: #ccc;
    text-align: right;
}

.floating-info strong {
    color: #fff;
    font-weight: bold;
}

.floating-info .contact-info {
    margin-top: 8px;
    padding-top: 5px;
    border-top: 1px solid #444;
}

.floating-info .contact-info a {
    color: #D20A0A;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9em;
}

.floating-info .contact-info a:hover {
    color: #ff3333;
    text-decoration: underline;
}

/* Mobile responsiveness for chart */
@media (max-width: 768px) {
    #profit-chart-container {
        height: 300px !important;
        padding: 0 10px;
    }
    
    #profit-chart {
        max-height: 250px;
    }
    
    .summary-cards > div {
        min-width: 120px !important;
        padding: 15px !important;
    }
    
    .summary-cards h3 {
        font-size: 16px !important;
    }
    
    .summary-cards > div > div {
        font-size: 20px !important;
    }
    
    .event-details {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .event-details table {
        font-size: 12px !important;
    }
    
    #app {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    #profit-chart-container {
        height: 250px !important;
    }
    
    #profit-chart {
        max-height: 200px;
    }
    
    body {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .floating-info {
        bottom: 12px;
        right: 12px;
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}