:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #00d9ff;
    --accent-secondary: #ff006e;
    --accent-tertiary: #8338ec;
    --neon-blue: #00d9ff;
    --neon-pink: #ff006e;
    --neon-purple: #8338ec;
    --neon-green: #06ffa5;
    --card-bg: #1a1a1a;
    --card-hover: #252525;
    --border: #2a2a2a;
    --glow: rgba(0, 217, 255, 0.5);
}

.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent: #0066cc;
    --card-bg: #f9f9f9;
    --card-hover: #e9e9e9;
    --border: #dddddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading Page Styles */
.loading-container {
    text-align: center;
    padding: 40px;
}

.logo-circle {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px;
    border: 3px solid var(--border);
    overflow: hidden;
}

.animated-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.loading-text {
    font-size: 32px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Welcome Page Styles */
.welcome-container {
    max-width: 1200px;
    width: 90%;
    padding: 60px 40px;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    position: relative;
    border: 3px solid transparent;
    background-image: 
        linear-gradient(var(--bg-secondary), var(--bg-secondary)),
        linear-gradient(135deg, var(--neon-blue), var(--neon-purple), var(--neon-pink), var(--neon-green));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: gradient-rotate 4s linear infinite;
    background-size: 100% 100%, 300% 300%;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3), 
                0 0 60px rgba(131, 56, 236, 0.2),
                inset 0 0 20px rgba(0, 217, 255, 0.05);
}

@keyframes border-glow {
    0%, 100% {
        opacity: 0.6;
        filter: blur(0px);
    }
    50% {
        opacity: 1;
        filter: blur(4px);
    }
}

@keyframes gradient-rotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.welcome-title {
    text-align: center;
    font-size: 48px;
    margin-bottom: 60px;
    font-weight: 300;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

.bold-name {
    font-weight: 700;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.navigation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.nav-card {
    background: linear-gradient(145deg, var(--card-bg), #151515);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    overflow: hidden;
}

.card-icon {
    font-size: 48px;
    transition: all 0.3s ease;
    filter: grayscale(0.3);
}

.nav-card:hover .card-icon {
    transform: scale(1.2) translateY(-5px);
    filter: grayscale(0) drop-shadow(0 0 10px currentColor);
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(145deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-card:hover {
    background: linear-gradient(145deg, #252525, #1f1f1f);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.3), 
                0 0 30px rgba(0, 217, 255, 0.2),
                inset 0 0 20px rgba(0, 217, 255, 0.05);
}

.nav-card:hover::before {
    opacity: 1;
}

.nav-card:nth-child(1):hover {
    box-shadow: 0 20px 40px rgba(131, 56, 236, 0.3), 
                0 0 30px rgba(131, 56, 236, 0.2);
}

.nav-card:nth-child(2):hover {
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.3), 
                0 0 30px rgba(0, 217, 255, 0.2);
}

.nav-card:nth-child(3):hover {
    box-shadow: 0 20px 40px rgba(255, 0, 110, 0.3), 
                0 0 30px rgba(255, 0, 110, 0.2);
}

.nav-card:nth-child(4):hover {
    box-shadow: 0 20px 40px rgba(6, 255, 165, 0.3), 
                0 0 30px rgba(6, 255, 165, 0.2);
}

.nav-card:nth-child(5):hover {
    box-shadow: 0 20px 40px rgba(255, 0, 110, 0.3), 
                0 0 30px rgba(255, 0, 110, 0.2);
}

/* Visualize Pages */
.visualize-page {
    max-width: 1400px;
    width: 95%;
    padding: 70px 30px 40px;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    border: 1px solid var(--border);
    position: relative;
}

.visualize-content {
    margin-top: 10px;
}

.visualize-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.page-meta {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

.visualize-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rolling-window-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.rolling-window {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rolling-window input[type="checkbox"] {
    accent-color: var(--accent);
}

.rolling-disabled {
    opacity: 0.5;
}

.visualize-controls {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.controls-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.sidebar-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.sidebar-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.visualize-main {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.chart-container {
    position: relative;
    overflow: auto;
    max-height: 720px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background-color: #000;
}

#correlationCanvas {
    display: block;
}

.chart-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, rgba(0,217,255,0.1), transparent),
                radial-gradient(circle at bottom right, rgba(131,56,236,0.15), transparent);
    color: var(--text-primary);
    font-weight: 500;
    pointer-events: none;
}

.hover-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.error-box {
    padding: 10px 12px;
    border-radius: 8px;
    background-color: rgba(255, 0, 110, 0.1);
    border: 1px solid rgba(255, 0, 110, 0.6);
    font-size: 13px;
}

.legend {
    margin-top: 20px;
}

.legend-title {
    font-size: 14px;
    margin-bottom: 6px;
}

.legend-bar {
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0033ff, #ffffff, #ff0000);
    margin-bottom: 4px;
}

.legend-bar-green-red {
    background: linear-gradient(90deg, #0e9f6e 0%, #0e9f6e 40%, #ffffff 50%, #e11d48 60%, #e11d48 100%);
    box-shadow: 0 0 8px rgba(14, 159, 110, 0.25), 0 0 8px rgba(225, 29, 72, 0.25);
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
}

.feature-list {
    margin-top: 18px;
    max-height: 280px;
    overflow: auto;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    font-size: 13px;
}

.feature-row {
    padding: 2px 0;
    color: var(--text-secondary);
}

.nav-card:nth-child(6):hover {
    box-shadow: 0 20px 40px rgba(131, 56, 236, 0.3), 
                0 0 30px rgba(131, 56, 236, 0.2);
}

.nav-card h2 {
    font-size: 24px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.nav-card:hover h2 {
    text-shadow: 0 0 20px currentColor;
    letter-spacing: 0.5px;
}

.nav-card:nth-child(1):hover h2 {
    color: var(--neon-purple);
}

.nav-card:nth-child(2):hover h2 {
    color: var(--neon-blue);
}

.nav-card:nth-child(3):hover h2 {
    color: var(--neon-pink);
}

.nav-card:nth-child(4):hover h2 {
    color: var(--neon-green);
}

.nav-card:nth-child(5):hover h2 {
    color: var(--neon-pink);
}

.nav-card:nth-child(6):hover h2 {
    color: var(--neon-purple);
}

.coming-soon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 0 15px rgba(131, 56, 236, 0.6);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(131, 56, 236, 0.6);
    }
    50% {
        box-shadow: 0 0 25px rgba(131, 56, 236, 0.8), 0 0 35px rgba(0, 217, 255, 0.4);
    }
}
.view-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.view-toggle-buttons {
    display: flex;
    gap: 10px;
}

.view-toggle-hint {
    color: var(--text-secondary);
    font-size: 14px;
}

.corr-table-container {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    padding: 12px;
    height: min(70vh, 720px);  /* set a fixed scroll area height */
    min-height: 320px;
    overflow: hidden;          /* clip anything outside; inner div scrolls */
    box-sizing: border-box;
}

.corr-table-scroll {
    height: 100%;
    width: 100%;
    overflow: auto;            /* both horizontal & vertical scroll INSIDE here */
    background:
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(rgba(0, 0, 0, 0.45), transparent 70%) 0 0 / 100% 16px no-repeat,
        linear-gradient(transparent 30%, rgba(0, 0, 0, 0.45)) 0 100% / 100% 16px no-repeat,
        linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent 70%) 0 0 / 16px 100% no-repeat,
        linear-gradient(90deg, transparent 30%, rgba(0, 0, 0, 0.45)) 100% 0 / 16px 100% no-repeat;
    background-attachment: local, scroll, scroll, scroll, scroll;
}

.corr-table {
    width: max-content;       /* allow table to be wider than scroll area to force horizontal scroll */
    table-layout: auto;
    border-collapse: collapse;
    font-size: 13px;
}

.corr-table th,
.corr-table td {
    border: 1px solid var(--border);
    padding: 6px 8px;
    text-align: center;
    white-space: nowrap;      /* keep cells on one line; scroll horizontally */
}

.corr-table th {
    position: sticky;
    top: 0;
    background: var(--card-hover);
    z-index: 2;
    color: var(--text-primary);
}

.corr-table td.row-header {
    position: sticky;
    left: 0;
    background: var(--card-hover);
    z-index: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.corr-cell-pos {
    background: rgba(14, 159, 110, 0.18);
    color: #dff7ef;
}

.corr-cell-neg {
    background: rgba(225, 29, 72, 0.18);
    color: #ffe6ed;
}

.corr-cell-muted {
    background: transparent;
    color: var(--text-secondary);
}

.corr-cell-strong {
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (max-width: 900px) {
    .corr-table-container {
        height: min(60vh, 520px);
    }
}

@media (max-width: 600px) {
    .corr-table-container {
        height: min(55vh, 420px);
        min-height: 240px;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .calibration-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navigation-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .welcome-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .nav-card {
        padding: 40px 15px;
        min-height: 150px;
    }
    
    .nav-card h2 {
        font-size: 20px;
    }

    .training-results-page .content-layout {
        flex-direction: column;
    }

    .training-results-page .chart-sidebar {
        width: 100%;
        height: 300px;
        position: relative;
        top: 0;
    }

    .top-menu {
    .heatmap-wrapper {
        position: relative;
        overflow: auto;
        width: 100%;
        height: 100%;
    }

    #correlationCanvas {
        position: absolute;
        top: 0;
        left: 0;
        display: block;
    }

    .heatmap-row-labels,
    .heatmap-col-labels {
        position: absolute;
        font-size: 11px;
        color: var(--text-primary);
        pointer-events: none;
    }

    .heatmap-row-labels {
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
        gap: 0;
    }

    .heatmap-row-labels .label {
        padding: 2px 6px;
        white-space: nowrap;
    }

    .heatmap-col-labels {
        top: 0;
        left: 0;
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        gap: 0;
    }

    .heatmap-col-labels .label {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        padding: 4px 2px;
        white-space: nowrap;
        text-align: left;
    }
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .menu-actions {
        width: 100%;
        justify-content: stretch;
    }

    .menu-btn {
        flex: 1;
    }

    .predictions-table {
        font-size: 12px;
    }

    .predictions-table th,
    .predictions-table td {
        padding: 10px 8px;
    }

    .calibration-grid {
        grid-template-columns: 1fr;
        margin: 0 15px 15px;
        gap: 20px;
    }

    .calibration-card {
        padding: 20px;
    }

    .chart-placeholder {
        height: 350px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .calibration-analysis-section {
        margin: 30px 15px 15px;
        padding: 20px;
    }

    .tips-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .calibration-tips {
        padding: 20px;
    }

    .model-card-grid {
        grid-template-columns: 1fr;
    }

    .model-card-header {
        margin: 60px 0 30px;
    }

    .model-card-title {
        font-size: 28px;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .navigation-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Coming Soon Page Styles */
.coming-soon-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}

.back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.back-button:hover {
    border-color: var(--neon-blue);
    background: var(--card-hover);
    transform: translateX(-5px);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.back-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.back-button:hover .back-arrow {
    transform: translateX(-3px);
}

.coming-soon-content {
    max-width: 1000px;
    text-align: center;
}

.construction-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: swing 2s ease-in-out infinite;
}

@keyframes swing {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.coming-soon-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

.coming-soon-subtitle {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 60px;
    font-weight: 300;
}

.feature-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.preview-card {
    background: linear-gradient(145deg, var(--card-bg), #151515);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px 20px;
    transition: all 0.3s ease;
}

.preview-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-blue);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.preview-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.preview-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.preview-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.progress-section {
    margin-bottom: 50px;
}

.progress-label {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    max-width: 500px;
    height: 12px;
    background: var(--card-bg);
    border-radius: 10px;
    margin: 0 auto 15px;
    border: 2px solid var(--border);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    width: 65%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
    border-radius: 8px;
    animation: pulse-progress 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

@keyframes pulse-progress {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 217, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 217, 255, 0.6), 0 0 30px rgba(131, 56, 236, 0.4);
    }
}

.progress-percentage {
    font-size: 28px;
    font-weight: 700;
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.notify-section {
    margin-top: 40px;
}

.notify-text {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.notify-button {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.3);
    font-family: 'Inter', sans-serif;
}

.notify-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.5), 0 0 40px rgba(131, 56, 236, 0.3);
}

.notify-button:active {
    transform: translateY(-1px);
}

/* Responsive Design for Coming Soon */
@media (max-width: 768px) {
    .feature-preview {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .coming-soon-title {
        font-size: 48px;
    }
    
    .construction-icon {
        font-size: 60px;
    }
    
    .back-button {
        top: 20px;
        left: 20px;
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* League Selection Page Styles */
.league-selection-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}

.league-content {
    max-width: 1200px;
    width: 100%;
}

.page-title {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 80px;
    padding-bottom: 30px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

.leagues-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.league-card {
    background: linear-gradient(145deg, var(--card-bg), #151515);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    overflow: hidden;
}

.league-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(145deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.league-card:hover {
    background: linear-gradient(145deg, #252525, #1f1f1f);
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 217, 255, 0.4), 
                0 0 40px rgba(0, 217, 255, 0.3),
                inset 0 0 30px rgba(0, 217, 255, 0.05);
}

.league-card:hover::before {
    opacity: 1;
}

.league-card:nth-child(1):hover {
    box-shadow: 0 20px 50px rgba(0, 217, 255, 0.4), 0 0 40px rgba(0, 217, 255, 0.3);
}

.league-card:nth-child(2):hover {
    box-shadow: 0 20px 50px rgba(131, 56, 236, 0.4), 0 0 40px rgba(131, 56, 236, 0.3);
}

.league-card:nth-child(3):hover {
    box-shadow: 0 20px 50px rgba(255, 0, 110, 0.4), 0 0 40px rgba(255, 0, 110, 0.3);
}

.league-card:nth-child(4):hover {
    box-shadow: 0 20px 50px rgba(6, 255, 165, 0.4), 0 0 40px rgba(6, 255, 165, 0.3);
}

.league-card:nth-child(5):hover {
    box-shadow: 0 20px 50px rgba(255, 0, 110, 0.4), 0 0 40px rgba(255, 0, 110, 0.3);
}

.league-card:nth-child(6):hover {
    box-shadow: 0 20px 50px rgba(0, 217, 255, 0.4), 0 0 40px rgba(0, 217, 255, 0.3);
}

.league-logo {
    font-size: 72px;
    transition: all 0.3s ease;
    filter: grayscale(0.2);
}

.league-card:hover .league-logo {
    transform: scale(1.2) translateY(-5px);
    filter: grayscale(0) drop-shadow(0 0 20px currentColor);
}

.league-name {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.league-card:hover .league-name {
    letter-spacing: 2px;
}

.league-card:nth-child(1):hover .league-name {
    color: var(--neon-blue);
    text-shadow: 0 0 20px var(--neon-blue);
}

.league-card:nth-child(2):hover .league-name {
    color: var(--neon-purple);
    text-shadow: 0 0 20px var(--neon-purple);
}

.league-card:nth-child(3):hover .league-name {
    color: var(--neon-pink);
    text-shadow: 0 0 20px var(--neon-pink);
}

.league-card:nth-child(4):hover .league-name {
    color: var(--neon-green);
    text-shadow: 0 0 20px var(--neon-green);
}

.league-card:nth-child(5):hover .league-name {
    color: var(--neon-pink);
    text-shadow: 0 0 20px var(--neon-pink);
}

.league-card:nth-child(6):hover .league-name {
    color: var(--neon-blue);
    text-shadow: 0 0 20px var(--neon-blue);
}

.coming-soon-leagues {
    text-align: center;
    margin-top: 40px;
}

.coming-soon-text {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 50px;
}

.pulse-dot {
    color: var(--neon-green);
    font-size: 24px;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px var(--neon-green);
    }
    50% {
        opacity: 0.4;
        text-shadow: 0 0 5px var(--neon-green);
    }
}

/* Responsive Design for League Selection */
@media (max-width: 968px) {
    .leagues-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 640px) {
    .leagues-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .page-title {
        font-size: 36px;
        margin-bottom: 40px;
    }
    
    .league-card {
        padding: 40px 20px;
        min-height: 180px;
    }
    
    .league-logo {
        font-size: 56px;
    }
    
    .league-name {
        font-size: 28px;
    }
    
    .coming-soon-text {
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* League Modeling Page Styles */
.league-modeling-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    position: relative;
}

.modeling-content {
    max-width: 1400px;
    width: 100%;
}

.modeling-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
}

.modeling-title {
    font-size: 56px;
    font-weight: 700;
    color: var(--text-primary);
}

.league-logo-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    animation: logo-pulse 2s ease-in-out infinite;
    padding: 10px;
    overflow: hidden;
}

.league-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.league-logo-fallback {
    font-size: 40px;
}

@keyframes logo-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 217, 255, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(0, 217, 255, 0.2);
    }
}

.modeling-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.modeling-card {
    background: linear-gradient(145deg, var(--card-bg), #151515);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 40px 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modeling-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-blue);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.3);
}

.modeling-card:nth-child(2):hover {
    border-color: var(--neon-purple);
    box-shadow: 0 15px 40px rgba(131, 56, 236, 0.3);
}

.modeling-card:nth-child(3):hover {
    border-color: var(--neon-pink);
    box-shadow: 0 15px 40px rgba(255, 0, 110, 0.3);
}

.card-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.modeling-card:hover .card-icon-circle {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
}

.modeling-card:nth-child(2):hover .card-icon-circle {
    border-color: var(--neon-purple);
    box-shadow: 0 0 20px rgba(131, 56, 236, 0.4);
}

.modeling-card:nth-child(3):hover .card-icon-circle {
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
}

.card-icon-symbol {
    font-size: 36px;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
}

.card-input-section {
    width: 100%;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.input-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.model-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.model-input:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

.model-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.model-select:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(131, 56, 236, 0.2);
}

.model-button {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 217, 255, 0.3);
}

.model-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 217, 255, 0.5);
}

.model-button:active {
    transform: translateY(0);
}

.card-description {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.card-description li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
}

.card-description li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--neon-blue);
    font-size: 20px;
    line-height: 1;
}

.modeling-card:nth-child(2) .card-description li::before {
    color: var(--neon-purple);
}

.modeling-card:nth-child(3) .card-description li::before {
    color: var(--neon-pink);
}

/* Responsive Design for Modeling Page */
@media (max-width: 1024px) {
    .modeling-cards-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 640px) {
    .modeling-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .modeling-title {
        font-size: 42px;
    }
    
    .league-logo-circle {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }
    
    .modeling-card {
        padding: 30px 20px;
        min-height: auto;
    }
    
    .card-title {
        font-size: 22px;
    }
}

/* Model Dashboard Styles */
.model-dashboard-page {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.dashboard-layout {
    display: flex;
    gap: 30px;
    max-width: 1600px;
    margin: 100px auto 0;
}

/* Left Sidebar */
.sidebar-left {
    width: 360px;
    background: linear-gradient(145deg, var(--card-bg), #151515);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 25px 18px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    position: sticky;
    top: 20px;
}

.sidebar-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.model-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--neon-blue);
}

.toggle-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Preferences Section */
.preferences-section {
    margin-bottom: 20px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    margin-top: 0;
    padding: 0 !important;
    font-weight: 400;
    opacity: 0.9;
    text-align: left !important;
    width: 100% !important;
    display: block !important;
}

.section-dropdown {
    width: 100%;
    padding: 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.section-dropdown:hover {
    border-color: var(--neon-blue);
    background: var(--card-hover);
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.section-content {
    margin-top: 15px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: visible;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.2);
}

.form-select {
    cursor: pointer;
}

.form-select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* Toggle Switch */
.toggle-with-select {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.inline-select {
    flex: 1;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    border-color: var(--neon-blue);
    background: var(--card-hover);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--neon-blue);
}

.checkbox-item span {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Features Section */
.features-section {
    margin-bottom: 30px;
}

/* Feature Categories */
.feature-category {
    margin-bottom: 10px;
}

.category-header {
    width: 100%;
    padding: 12px 15px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.category-header:hover {
    border-color: var(--neon-purple);
    background: var(--card-hover);
}

.category-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.category-items {
    margin-top: 8px;
    padding: 12px;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
}

/* Feature Configuration */
.feature-config,
.feature-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
}

.feature-config:last-child,
.feature-item:last-child {
    border-bottom: none;
}

.feature-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: start;
}

.feature-item input[type="checkbox"] {
    margin-top: 4px;
    cursor: pointer;
}

.feature-item label {
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-blue);
    font-family: 'Courier New', monospace;
    word-break: break-word;
    cursor: pointer;
    grid-column: 2;
}

.feature-item .variation-select,
.feature-item .operation-select {
    grid-column: 2;
}

.feature-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-blue);
    font-family: 'Courier New', monospace;
    word-break: break-word;
}

.variation-select,
.operation-select {
    width: 100%;
    padding: 6px 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    max-height: 80px;
    overflow-y: auto;
}

.variation-select:focus,
.operation-select:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 8px rgba(131, 56, 236, 0.3);
}

.variation-select option,
.operation-select option {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 4px;
}

.variation-select option:checked,
.operation-select option:checked {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: white;
}

/* Window Buttons for Lookback Windows */
.window-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.window-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-btn:hover {
    border-color: var(--neon-blue);
    transform: translateY(-1px);
}

.window-btn.active {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border-color: var(--neon-blue);
    color: white;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.3);
}

.advanced-feature-item.disabled .window-btn {
    background: #0f0f0f;
    border-color: #1a1a1a;
    color: #3a3a3a;
    cursor: not-allowed;
    pointer-events: none;
}

.advanced-feature-item.disabled .window-btn.active {
    background: #1a1a1a;
    border-color: #252525;
    color: #4a4a4a;
    box-shadow: none;
}

/* Advanced Features Section */
.advanced-features-section {
    margin-bottom: 30px;
}

.advanced-feature-item {
    padding: 15px;
    margin-bottom: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.advanced-feature-item:hover {
    border-color: var(--neon-green);
    background: var(--card-hover);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.feature-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--neon-green);
    font-family: 'Courier New', monospace;
    word-break: break-word;
    transition: all 0.3s ease;
}

.advanced-feature-item.disabled .feature-title {
    color: var(--text-secondary);
    opacity: 0.5;
}

.feature-details {
    padding-left: 60px;
    transition: all 0.3s ease;
}

.advanced-feature-item.disabled .feature-details {
    opacity: 0.4;
}

.detail-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.window-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
}

.feature-comment {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-style: italic;
    margin-top: 8px;
    padding-left: 10px;
    border-left: 2px solid var(--neon-purple);
}

/* Added Features Section */
.added-features-section {
    margin-bottom: 30px;
}

.added-features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    min-height: 50px;
    overflow: visible;
}

.pill-wrapper {
    display: inline-block;
    position: relative;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.added-feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.added-feature-pill:hover {
    border-color: var(--neon-pink);
    background: var(--card-hover);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.3);
}

.pill-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.pill-arrow {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.pill-remove {
    width: 18px;
    height: 18px;
    border: none;
    background: var(--neon-pink);
    color: white;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    font-weight: bold;
}

.pill-remove:hover {
    background: #ff3385;
    transform: scale(1.1);
}

.pill-dropdown {
    position: fixed;
    margin-top: 4px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    min-width: 280px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dropdown-section {
    margin-bottom: 12px;
}

.dropdown-section:last-child {
    margin-bottom: 0;
}

.dropdown-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.dropdown-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dropdown-option {
    padding: 4px 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.dropdown-option:hover {
    border-color: var(--neon-blue);
    background: var(--card-hover);
}

.dropdown-option.selected {
    background: var(--neon-blue);
    border-color: var(--neon-blue);
    color: #000;
    font-weight: 600;
}

.add-feature-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.feature-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.feature-input:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.3);
}

.feature-input::placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

.add-feature-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.add-feature-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.5);
}

/* Model Tuning Section */
.model-tuning-section {
    margin-bottom: 30px;
}

.tuning-group {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.tuning-group:hover {
    border-color: var(--neon-purple);
    background: var(--card-hover);
}

.tuning-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tuning-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-purple);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.tuning-group.disabled .tuning-title {
    color: var(--text-secondary);
    opacity: 0.5;
}

.tuning-params {
    padding-left: 10px;
    transition: all 0.3s ease;
}

.tuning-group.disabled .tuning-params {
    opacity: 0.4;
}

.tuning-group.disabled .param-select,
.tuning-group.disabled .param-input {
    background: #0f0f0f;
    border-color: #1a1a1a;
    color: #3a3a3a;
    cursor: not-allowed;
    pointer-events: none;
}

.param-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.param-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
    word-break: break-word;
    max-width: 140px;
}

.param-select,
.param-input {
    flex: 1;
    min-width: 80px;
    max-width: 120px;
    padding: 5px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.param-select:focus,
.param-input:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 8px rgba(131, 56, 236, 0.3);
}

.param-select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

.param-comment {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-style: italic;
    margin-top: 10px;
    padding: 8px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 6px;
    border-left: 2px solid var(--neon-purple);
}

.toggle-switch.inline {
    margin: 0;
}

.sub-section {
    margin-top: 12px;
    padding-left: 20px;
    border-left: 2px solid var(--border);
}

.sub-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-blue);
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.model-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.checkbox-item.small {
    padding: 4px 8px;
    font-size: 11px;
}

.checkbox-item.small input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

.checkbox-item.small span {
    font-size: 11px;
}

/* Sidebar Action Buttons */
.sidebar-action-btn {
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 12px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.sidebar-action-btn:hover {
    transform: translateY(-2px);
    border-color: var(--neon-purple);
    box-shadow: 0 5px 20px rgba(131, 56, 236, 0.3);
}

.sidebar-action-btn.primary {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border: none;
    color: white;
}

.sidebar-action-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(0, 217, 255, 0.5);
}

/* Main Content Area */
.main-content {
    flex: 1;
    position: relative;
}

.top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 30px;
}

.action-link {
    background: none;
    border: none;
    color: var(--neon-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    padding: 8px 0;
}

.action-link:hover {
    color: var(--neon-purple);
    text-shadow: 0 0 10px var(--neon-purple);
}

/* Scorecard Container */
.scorecard-container {
    background: linear-gradient(145deg, var(--card-bg), #151515);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scorecard-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    text-align: left;
    width: 100%;
}

/* Scorecard Sections */
.scorecard-section {
    width: 100%;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 15px;
}

.section-header {
    font-size: 24px;
    font-weight: 700;
    color: var(--neon-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.info-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

/* Performance Cards */
.performance-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.perf-card {
    padding: 25px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.perf-card.highlight {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.perf-card:hover {
    transform: translateY(-3px);
    border-color: var(--neon-purple);
}

.perf-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.perf-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--neon-blue);
}

/* Features Table */
.features-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-row {
    display: grid;
    grid-template-columns: 40px 1fr 100px 150px;
    gap: 15px;
    align-items: center;
    padding: 12px 15px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-row:hover {
    border-color: var(--neon-purple);
    background: var(--card-hover);
}

.feature-rank {
    font-size: 16px;
    font-weight: 700;
    color: var(--neon-blue);
    text-align: center;
}

.feature-name-display {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.feature-importance {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    text-align: right;
}

.importance-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.importance-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.importance-fill.low {
    background: linear-gradient(90deg, #444, #666);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--card-bg);
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--neon-purple);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 12px 15px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: var(--card-hover);
}

.accuracy-cell {
    font-weight: 600;
    color: var(--neon-blue);
}

/* Responsive Design for Model Dashboard */
@media (max-width: 1200px) {
    .dashboard-layout {
        flex-direction: column;
    }
    
    .sidebar-left {
        width: 100%;
        position: relative;
        top: 0;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .scorecard-title {
        font-size: 48px;
        margin-bottom: 40px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .metric-value {
        font-size: 36px;
    }
    
    .top-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .content-layout {
        flex-direction: column;
    }
    
    .sidebar-panel {
        width: 100%;
    }
}

/* Training Results Page */
.training-results-page {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.insight-tip {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 30px 20px;
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.1), rgba(0, 217, 255, 0.08));
    border: 2px solid var(--neon-purple);
    border-left: 5px solid var(--neon-purple);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(131, 56, 236, 0.2);
}

.tip-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.tip-content {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
}

.tip-content strong {
    color: var(--neon-purple);
    font-weight: 600;
    margin-right: 5px;
}

.top-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 80px 30px 30px;
    padding: 20px 30px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.menu-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-name-display {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 12px 24px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
}

.filter-name {
    color: var(--neon-blue);
    font-weight: 600;
}

.menu-btn {
    padding: 12px 24px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.menu-btn:hover {
    border-color: var(--neon-blue);
    background: var(--card-hover);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

select.menu-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%2300d9ff' d='M6 9L1 4h10z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

select.menu-btn option {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 8px;
}

/* Download Dropdown Menu */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.download-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    min-width: 240px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow: hidden;
}

.download-menu.show {
    display: block;
}

.download-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.download-option:last-child {
    border-bottom: none;
}

.download-option:hover {
    background: var(--card-hover);
    color: var(--neon-blue);
}

.download-icon {
    font-size: 18px;
}

.content-layout {
    display: flex;
    gap: 30px;
    padding: 0 30px;
    max-width: 1800px;
    margin: 0 auto;
}

.sidebar-panel {
    width: 300px;
    flex-shrink: 0;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--neon-green);
    margin-bottom: 20px;
}

.chart-container {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-container canvas {
    max-height: 500px;
    width: 100% !important;
}

.chart-placeholder {
    text-align: center;
}

.placeholder-text {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.placeholder-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.main-panel {
    flex: 1;
    min-width: 0;
}

.table-container {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
}

.table-container-full {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
    margin: 0 30px 30px;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
}

/* Calibration Layout - Side by Side */
.calibration-layout {
    display: flex;
    gap: 30px;
    margin: 0 30px 30px;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
}

.calibration-table-container {
    flex: 0 0 350px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 20px;
}

.calibration-chart-container {
    flex: 1;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 20px;
}

.calibration-data-wrapper {
    max-height: 500px;
    overflow-y: auto;
    margin-top: 15px;
}

.calibration-data-table {
    width: 100%;
    border-collapse: collapse;
}

.calibration-data-table thead {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 10;
}

.calibration-data-table th {
    padding: 12px 8px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border);
}

.calibration-data-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.calibration-data-table tbody tr:hover {
    background: rgba(0, 217, 255, 0.05);
}

.no-data {
    color: var(--text-secondary);
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
}

@media (max-width: 1200px) {
    .calibration-layout {
        flex-direction: column;
    }
    
    .calibration-table-container {
        flex: 1;
    }
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.table-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.table-info {
    font-size: 14px;
    color: var(--text-secondary);
}

.predictions-table-wrapper {
    overflow-x: auto;
    max-height: 70vh;
    overflow-y: auto;
}

.predictions-table {
    width: 100%;
    border-collapse: collapse;
}

.predictions-table thead {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}

.predictions-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border);
}

.predictions-table td {
    padding: 12px 15px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.predictions-table tbody tr:hover {
    background: var(--card-hover);
}

.correct-pred {
    background: rgba(6, 255, 165, 0.05);
}

.incorrect-pred {
    background: rgba(255, 0, 110, 0.05);
}

.event-id {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--text-secondary);
}

.date-cell {
    font-size: 12px;
    white-space: nowrap;
}

.team-cell {
    font-weight: 600;
}

.prob-cell {
    min-width: 150px;
}

.prob-value {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.prob-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.prob-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.pick-cell {
    font-weight: 600;
    color: var(--neon-blue);
}

.pick-value {
    font-size: 13px;
}

.spread-cell {
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.odds-cell {
    text-align: center;
    min-width: 100px;
}

.odds-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.implied-prob-small {
    font-size: 11px;
    color: var(--text-secondary);
}

.sub-header {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

.edge-cell {
    text-align: center;
}

.edge-value {
    font-weight: 700;
    font-size: 13px;
}

.edge-value.positive {
    color: var(--neon-green);
}

.edge-value.negative {
    color: var(--neon-pink);
}

.outcome-cell {
    font-weight: 600;
    color: var(--text-secondary);
}

.correct-cell {
    text-align: center;
}

.status-badge {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    line-height: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
}

.status-badge.correct {
    background: var(--neon-green);
    color: #000;
}

.status-badge.incorrect {
    background: var(--neon-pink);
    color: #fff;
}

.window-cell {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
}

.bet-type-cell {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-blue);
}

.line-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
}

.side-cell {
    text-align: center;
}

.side-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.side-badge.over {
    background: rgba(6, 255, 165, 0.2);
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
}

.side-badge.under {
    background: rgba(131, 56, 236, 0.2);
    color: var(--neon-purple);
    border: 1px solid var(--neon-purple);
}

.odds-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.edge-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 14px;
}

.positive-edge {
    color: var(--neon-green);
}

.negative-edge {
    color: var(--neon-pink);
}

.ev-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 13px;
}

.positive-ev {
    color: var(--neon-green);
}

.negative-ev {
    color: var(--neon-pink);
}

.implied-cell {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Calibration Tables Page */
.calibration-page {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.calibration-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 0 30px 30px;
}

.calibration-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
}

.calibration-card:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.chart-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.chart-placeholder {
    width: 100%;
    height: 500px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
}

.placeholder-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.placeholder-subtext {
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Calibration Table Styles */
.calibration-table-container {
    width: 100%;
    overflow-x: auto;
}

.calibration-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.calibration-table thead {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
}

.calibration-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.calibration-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.calibration-table tbody tr:hover {
    background: var(--bg-secondary);
}

.calibration-table .error-low {
    color: var(--neon-green);
}

.calibration-table .error-high {
    color: var(--neon-pink);
    font-weight: 600;
}

/* Calibration Analysis Section */
.calibration-analysis-section {
    margin: 40px 30px 30px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.metric-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.metric-before,
.metric-after {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric-tag {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-arrow {
    font-size: 24px;
    font-weight: 700;
    margin: 0 15px;
}

.metric-arrow.improvement {
    color: var(--neon-green);
}

.metric-arrow.degradation {
    color: var(--neon-pink);
}

.metric-change {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.metric-change.positive {
    color: var(--neon-green);
}

.metric-change.negative {
    color: var(--neon-pink);
}

.calibration-summary {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
}

.calibration-summary h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.calibration-summary p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.calibration-summary p:last-child {
    margin-bottom: 0;
}

.calibration-summary strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Calibration Tips Section */
.calibration-tips {
    margin-top: 30px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 25px;
}

.calibration-tips h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tip-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 15px;
    transition: all 0.3s ease;
}

.tip-card:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
    transform: translateY(-2px);
}

.tip-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.tip-content-box {
    flex: 1;
}

.tip-content-box h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tip-content-box p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Model Card Page */
.model-card-page {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.model-card-header {
    text-align: center;
    margin: 80px 0 50px;
}

.model-card-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.model-meta {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.meta-badge {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: #000;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.meta-date {
    color: var(--text-secondary);
    font-size: 14px;
}

.model-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card-section {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.card-section:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.15);
}

.section-header {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon {
    font-size: 24px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.metric-value {
    color: var(--neon-green);
    font-size: 32px;
    font-weight: 700;
}

.models-tested-section,
.feature-categories-section {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.model-test-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.model-test-card.best-model {
    border-color: var(--neon-green);
    background: rgba(6, 255, 165, 0.05);
}

.model-test-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.model-test-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.best-badge {
    background: var(--neon-green);
    color: #000;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.model-test-metrics {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.test-metric {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
}

.test-metric strong {
    color: var(--text-primary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.category-card:hover {
    border-color: var(--neon-purple);
    transform: translateY(-2px);
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.category-count {
    font-size: 14px;
    color: var(--neon-blue);
    font-weight: 500;
}

/* Upcoming Predictions Dashboard */
.predictions-dashboard-page {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.predictions-header {
    text-align: center;
    margin: 120px 0 40px;
}

.predictions-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.predictions-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.menu-section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.predictions-container {
    margin: 30px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
    overflow-x: auto;
}

.prediction-row {
    transition: all 0.3s ease;
}

.prediction-row.strong-bet {
    background: rgba(6, 255, 165, 0.08);
    border-left: 4px solid var(--neon-green);
}

.prediction-row.recommended-bet {
    background: rgba(0, 217, 255, 0.05);
    border-left: 4px solid var(--neon-blue);
}

.prediction-row:hover {
    background: var(--card-hover);
    transform: scale(1.01);
}

.time-small {
    font-size: 11px;
    color: var(--text-secondary);
}

.confidence-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.confidence-badge.high {
    background: rgba(6, 255, 165, 0.2);
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
}

.confidence-badge.medium {
    background: rgba(0, 217, 255, 0.2);
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
}

.confidence-badge.low {
    background: rgba(131, 56, 236, 0.2);
    color: var(--neon-purple);
    border: 1px solid var(--neon-purple);
}

.ev-cell {
    text-align: center;
    font-family: 'Courier New', monospace;
}

.ev-value {
    font-size: 14px;
    font-weight: 700;
}

.ev-value.positive {
    color: var(--neon-green);
}

.ev-value.negative {
    color: var(--neon-pink);
}

.rec-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.rec-badge.strong-bet {
    background: var(--neon-green);
    color: #000;
}

.rec-badge.bet {
    background: var(--neon-blue);
    color: #000;
}

.rec-badge.watch {
    background: var(--neon-purple);
    color: #fff;
}

.rec-badge.pass {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* Backtesting Dashboard */
.backtesting-page {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.backtesting-layout {
    display: flex;
    gap: 30px;
    margin: 30px;
}

/* Batch Filter Panel (Left Sidebar) */
.batch-filter-panel {
    width: 280px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.panel-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.filter-item:hover {
    background: var(--card-hover);
    border-color: var(--neon-blue);
    transform: translateX(5px);
}

.filter-item.active {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(131, 56, 236, 0.1));
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.filter-name {
    flex: 1;
}

.filter-edit {
    font-size: 16px;
    opacity: 0.7;
}

.add-filter-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.add-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.4);
}

/* Main Content Area */
.backtesting-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.backtesting-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.season-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.season-select {
    padding: 8px 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.season-select:hover {
    border-color: var(--neon-blue);
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-tab {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    border-color: var(--neon-purple);
    background: var(--card-hover);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    border-color: var(--neon-purple);
    color: white;
    box-shadow: 0 0 15px rgba(131, 56, 236, 0.4);
}

.download-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    border: none;
    border-radius: 8px;
    color: black;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(6, 255, 165, 0.4);
}

/* Performance Graph */
.performance-graph {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
}

.graph-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* Backtesting Scorecard */
.backtesting-scorecard {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
}

.scorecard-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.scorecard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.metric-box {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.metric-box:hover {
    border-color: var(--neon-blue);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.2);
}

.metric-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-value.success {
    color: var(--neon-green);
}

.metric-value.error {
    color: var(--neon-pink);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .backtesting-layout {
        flex-direction: column;
    }
    
    .batch-filter-panel {
        width: 100%;
        position: relative;
    }
    
    .scorecard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .backtesting-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
    }
    
    .scorecard-grid {
        grid-template-columns: 1fr;
    }
}

/* Training Status Banner */
.training-status-banner {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-content {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(131, 56, 236, 0.1));
    border: 2px solid var(--neon-blue);
    border-radius: 12px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.status-icon {
    font-size: 32px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.status-text {
    flex: 1;
}

.status-text strong {
    color: var(--neon-blue);
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.status-text p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.status-button {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.status-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.4);
}

/* New Full-Width Configuration Layout */
.top-actions-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
    max-width: 1400px;
    padding: 0 20px;
}

.config-section-wrapper {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.config-section-content {
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.7), rgba(21, 21, 21, 0.7));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(42, 42, 42, 0.5);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 217, 255, 0.1);
}

.config-section-content .sidebar-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.config-section-content .sidebar-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

/* Make sections display in columns */
.config-section-content > div:not(.action-buttons-container):not(.sidebar-header) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.config-section-content .preferences-section,
.config-section-content .features-section,
.config-section-content .added-features-section,
.config-section-content .advanced-features-section,
.config-section-content .model-tuning-section {
    grid-column: 1 / -1;
    display: block;
}

/* Action buttons container centered */
.action-buttons-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 30px auto 0;
}

.config-section-content .sidebar-action-btn {
    max-width: 300px;
    width: auto;
    min-width: 250px;
    margin: 0;
}

.scorecard-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 30px;
}

/* Filter Edit Modal Styles */
.filter-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.filter-modal-content {
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.95), rgba(21, 21, 21, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(100, 200, 255, 0.3);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.2), 
                0 2px 8px rgba(100, 200, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(100, 200, 255, 0.2);
    background: linear-gradient(145deg, rgba(0, 217, 255, 0.05), rgba(0, 150, 255, 0.03));
}

.filter-modal-title {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.filter-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.filter-modal-close:hover {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6464;
    transform: rotate(90deg);
}

.filter-modal-body {
    padding: 30px;
    max-height: calc(85vh - 180px);
    overflow-y: auto;
}

.filter-modal-body::-webkit-scrollbar {
    width: 8px;
}

.filter-modal-body::-webkit-scrollbar-track {
    background: rgba(100, 200, 255, 0.05);
    border-radius: 4px;
}

.filter-modal-body::-webkit-scrollbar-thumb {
    background: rgba(100, 200, 255, 0.3);
    border-radius: 4px;
}

.filter-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 200, 255, 0.5);
}

.filter-form-section {
    margin-bottom: 25px;
}

.filter-form-label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.filter-form-label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    background: rgba(100, 200, 255, 0.05);
    border: 1px solid rgba(100, 200, 255, 0.1);
    transition: all 0.3s ease;
}

.filter-form-label.checkbox-label:hover {
    background: rgba(100, 200, 255, 0.1);
    border-color: rgba(100, 200, 255, 0.3);
}

.filter-form-input,
.filter-form-select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(100, 200, 255, 0.05);
    border: 1px solid rgba(100, 200, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

/* Keep filter modal selects readable in dark theme across browsers. */
.filter-form-select {
    color-scheme: dark;
    background-color: rgba(100, 200, 255, 0.08);
}

.filter-form-select option,
.filter-form-select optgroup {
    color: var(--text-primary);
    background-color: #101a24;
}

.filter-form-input:focus,
.filter-form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(100, 200, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.filter-form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.filter-form-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.filter-form-hint {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

.team-suggestions {
    margin-top: 8px;
    border: 1px solid rgba(100, 200, 255, 0.25);
    border-radius: 8px;
    background: rgba(8, 18, 28, 0.95);
    max-height: 180px;
    overflow-y: auto;
}

.team-suggestion-item {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: var(--text-primary);
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
}

.team-suggestion-item:hover {
    background: rgba(100, 200, 255, 0.15);
}

.team-chip-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.team-chip {
    border: 1px solid rgba(100, 200, 255, 0.35);
    background: rgba(100, 200, 255, 0.12);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.team-chip:hover {
    background: rgba(100, 200, 255, 0.2);
}

.team-chip-x {
    font-size: 14px;
    line-height: 1;
    opacity: 0.85;
}

.filter-modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid rgba(100, 200, 255, 0.2);
    background: linear-gradient(145deg, rgba(0, 217, 255, 0.03), rgba(0, 150, 255, 0.02));
}

.filter-btn-cancel,
.filter-btn-save {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn-cancel:hover {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6464;
    border-color: rgba(255, 100, 100, 0.3);
    transform: translateY(-2px);
}

.filter-btn-save {
    background: linear-gradient(135deg, #00d9ff, #0066ff);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.filter-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.5);
}

/* Filter Actions Container */
.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-delete {
    font-size: 24px;
    color: #ff4444;
    opacity: 0.7;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    line-height: 1;
}

.filter-delete:hover {
    opacity: 1;
    color: #ff0000;
    background: rgba(255, 0, 0, 0.15);
    transform: scale(1.2);
}

/* Run Backtest Button */
.run-backtest-btn {
    width: 100%;
    padding: 14px 20px;
    margin-top: 20px;
    background: linear-gradient(135deg, #00d9ff, #0066ff);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.run-backtest-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.5);
}

.run-backtest-btn .btn-icon {
    font-size: 14px;
}

/* Chart View Toggles */
.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.view-toggle-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.view-toggle-group .season-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.view-toggle-group .season-dropdown-wrapper:hover {
    border-color: var(--neon-blue);
}

.view-toggle-group .control-label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    margin: 0;
}

.view-toggle-group .season-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    padding: 2px 4px;
}

.view-toggle-group .season-select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

.view-toggle-btn {
    padding: 8px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-toggle-btn:hover {
    background: var(--card-hover);
    border-color: var(--neon-blue);
    color: var(--text-primary);
}

.view-toggle-btn.active {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(131, 56, 236, 0.4);
}

.download-csv-btn {
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.download-csv-btn:hover {
    background: var(--neon-green);
    color: #0a0a0a;
    border-color: var(--neon-green);
    transform: translateY(-1px);
}

.chart-container {
    width: 100%;
    height: 450px;
    position: relative;
}

#performanceChart {
    width: 100% !important;
    height: 100% !important;
}

/* Historical Summary */
.historical-summary {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px;
    margin-top: 25px;
}

.summary-title {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.historical-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.historical-metric {
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.historical-metric:hover {
    background: var(--card-hover);
    border-color: var(--neon-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.2);
}

.historical-metric .metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.historical-metric .metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.historical-metric .metric-value.success {
    color: var(--neon-green);
}

.historical-metric .metric-value.error {
    color: var(--neon-pink);
}

/* Season Summary Metrics */
.season-summary-metrics {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.season-summary-title {
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.season-summary-help {
    margin-top: -10px;
    margin-bottom: 14px;
    font-size: 12px;
    color: var(--text-secondary);
}

.season-metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.season-metric-item {
    background: rgba(26, 26, 26, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.3s ease;
}

.season-metric-item:hover {
    background: var(--card-hover);
    border-color: var(--neon-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(6, 255, 165, 0.2);
}

.season-metric-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.season-metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.season-metric-value.success {
    color: var(--neon-green);
}

.season-metric-value.error {
    color: var(--neon-pink);
}

.season-metric-value.warning {
    color: #ffc857;
}

.season-metric-subtext {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

@media (max-width: 1400px) {
    .season-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .historical-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .season-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .historical-grid {
        grid-template-columns: 1fr;
    }
    
    .season-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .view-toggle-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .graph-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}
