* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
    min-height: 100vh;
    color: #e0e0e0;
}

/* Navigation Bar */
.navbar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(100, 200, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;  /* Add this */
}

.nav-logo {
    font-size: 1.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #7e64ffea, #414777);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    flex-shrink: 0;              /* Add this */
    white-space: nowrap;         /* Add this */
    margin-right: 40px;          /* Add this */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;  /* Add this */
    padding: 0;  /* Add this */
}

.nav-link {
    color: #a0a0b0;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: #64c8ff;
    border-bottom-color: #64c8ff;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: transparent;
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid rgba(100, 200, 255, 0.2);
}

h1 {
    font-size: 2.5em;
    color: #fff;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #64c8ff, #6b7dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #a0a0b0;
    font-size: 1.1em;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(30, 30, 60, 0.6);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(100, 200, 255, 0.15);
    border-left: 4px solid #64c8ff;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border: 1px solid rgba(100, 200, 255, 0.3);
    transform: translateY(-2px);
}

.stat-label {
    color: #7a7a90;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2.2em;
    font-weight: bold;
    color: #64c8ff;
}

.stat-subtext {
    color: #555;
    font-size: 0.85em;
    margin-top: 8px;
}

/* Dashboard */
.dashboard {
    background: rgba(20, 20, 40, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(100, 200, 255, 0.15);
    margin-bottom: 30px;
}

.dashboard-header {
    margin-bottom: 25px;
}

.dashboard-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.quick-stat-item {
    background: rgba(50, 50, 100, 0.3);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(100, 200, 255, 0.1);
}

.quick-stat-label {
    color: #7a7a90;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.quick-stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #64c8ff;
}

/* Getting Started */
.getting-started {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gs-card {
    background: rgba(50, 50, 100, 0.3);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(100, 200, 255, 0.15);
    transition: all 0.3s ease;
}

.gs-card:hover {
    border-color: rgba(100, 200, 255, 0.4);
    transform: translateY(-4px);
}

.gs-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #64c8ff, #6b7dff);
    color: #0f0f23;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.gs-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
}

.gs-description {
    color: #a0a0b0;
    font-size: 0.95em;
    margin-bottom: 15px;
}

.gs-link {
    color: #64c8ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gs-link:hover {
    color: #fff;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.prediction-card {
    background: rgba(30, 30, 60, 0.6);
    border: 1px solid rgba(100, 200, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.prediction-card:hover {
    border-color: rgba(100, 200, 255, 0.4);
    transform: translateY(-4px);
    background: rgba(30, 30, 60, 0.8);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.matchup-info {
    flex: 1;
}

.team-away {
    display: block;
    font-weight: 700;
    font-size: 1.05em;
    color: #fff;
    margin-bottom: 3px;
}

.vs {
    display: block;
    color: #7a7a90;
    font-size: 0.85em;
    margin-bottom: 3px;
}

.team-home {
    display: block;
    font-weight: 700;
    font-size: 1.05em;
    color: #fff;
}

.prediction-badge {
    display: inline-block;
    background: linear-gradient(135deg, #64c8ff, #6b7dff);
    color: #0f0f23;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9em;
}

.card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.stat {
    background: rgba(50, 50, 100, 0.3);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(100, 200, 255, 0.1);
}

.stat-label-small {
    color: #7a7a90;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.stat-value-small {
    font-size: 1.3em;
    font-weight: bold;
    color: #64c8ff;
}

.confidence-container {
    grid-column: 1 / -1;
    background: rgba(50, 50, 100, 0.3);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(100, 200, 255, 0.1);
}

.confidence-label {
    color: #7a7a90;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.confidence-bar {
    height: 6px;
    background: rgba(100, 200, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #64c8ff, #6b7dff);
    border-radius: 3px;
}

.confidence-text {
    color: #64c8ff;
    font-size: 0.85em;
    font-weight: 600;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(100, 200, 255, 0.1);
}

.moneyline {
    font-weight: 700;
    font-size: 1.1em;
}

.moneyline.favorite {
    color: #4ade80;
}

.moneyline.underdog {
    color: #f87171;
}

.ev-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9em;
}

.ev-high {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.ev-medium {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.ev-low {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

/* Buttons */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    background: rgba(50, 50, 80, 0.8);
    color: #a0a0b0;
    border: 1px solid rgba(100, 200, 255, 0.2);
}

button:hover {
    background: rgba(100, 150, 200, 0.2);
    border-color: rgba(100, 200, 255, 0.4);
    color: #64c8ff;
}

button.active {
    background: rgba(100, 200, 255, 0.3);
    color: #64c8ff;
    border-color: #64c8ff;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(50, 50, 100, 0.4);
    border-radius: 12px;
    border: 2px dashed rgba(100, 200, 255, 0.3);
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: rgba(100, 200, 255, 0.6);
    background: rgba(50, 50, 100, 0.6);
}

.upload-section label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #64c8ff;
}

.upload-section input[type="file"] {
    padding: 10px;
    background: rgba(30, 30, 60, 0.8);
    border: 1px solid rgba(100, 200, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    color: #e0e0e0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid rgba(100, 200, 255, 0.3);
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(100, 200, 255, 0.2);
    padding-bottom: 15px;
}

.modal-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
}

.close-btn {
    background: none;
    border: none;
    color: #64c8ff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
}

.modal-body {
    display: grid;
    gap: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: rgba(50, 50, 100, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(100, 200, 255, 0.1);
}

.detail-label {
    color: #7a7a90;
    font-weight: 600;
    font-size: 0.9em;
}

.detail-value {
    color: #64c8ff;
    font-weight: 700;
    font-size: 0.95em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7a7a90;
}

.empty-state-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

/* Disclaimer */
.disclaimer {
    margin-top: 30px;
    padding: 20px;
    background: rgba(180, 83, 9, 0.2);
    border-left: 5px solid #ea580c;
    border-radius: 8px;
    color: #d97706;
    font-size: 0.95em;
    line-height: 1.6;
    border: 1px solid rgba(180, 83, 9, 0.3);
}

/* Weekly Chart */
#weeklyChart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: #64c8ff;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    .team-stats-table-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .playcalling-table-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .close-games-table-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .data-table-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .player-table-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .homefield-table-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .hamburger-menu {
        display: flex;
    }

    .nav-container {
        gap: 40px;
        padding: 15px 30px;
        position: relative;
    }

    .nav-menu {
        gap: 0;
        font-size: 0.95em;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(20, 20, 40, 0.95);
        border-bottom: 1px solid rgba(100, 200, 255, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        margin: 0;
        flex: none;
    }

    .nav-menu.active {
        max-height: 500px;
        overflow-y: auto;
    }

    .nav-link {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 15px 30px;
        border-bottom: 1px solid rgba(100, 200, 255, 0.1);
        display: block;
        border-bottom: none;
    }

    .nav-link:hover,
    .nav-link.active {
        border-bottom: none;
        background: rgba(100, 200, 255, 0.1);
        color: #64c8ff;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
    }

    /* Mobile table optimization for all tables */
    .team-stats-table,
    .close-games-table,
    .data-table,
    .homefield-table,
    .playcalling-table,
    .player-table {
        font-size: 0.75em !important;
    }

    .team-stats-table th,
    .close-games-table th,
    .data-table th,
    .homefield-table th,
    .playcalling-table th,
    .player-table th {
        padding: 8px 4px !important;
        font-size: 0.8em !important;
    }

    .team-stats-table td,
    .close-games-table td,
    .data-table td,
    .homefield-table td,
    .playcalling-table td,
    .player-table td {
        padding: 8px 4px !important;
        font-size: 0.75em !important;
        white-space: nowrap !important;
    }

    .team-stats-table span[style*="background-color"],
    .close-games-table span[style*="background-color"],
    .data-table span[style*="background-color"],
    .homefield-table span[style*="background-color"],
    .playcalling-table span[style*="background-color"],
    .player-table span[style*="background-color"] {
        padding: 2px 3px !important;
        font-size: 0.85em !important;
        display: inline-block !important;
        white-space: nowrap !important;
    }

    .team-stats-table td span:not([style*="background-color"]),
    .close-games-table td span:not([style*="background-color"]),
    .data-table td span:not([style*="background-color"]),
    .homefield-table td span:not([style*="background-color"]),
    .playcalling-table td span:not([style*="background-color"]),
    .player-table td span:not([style*="background-color"]) {
        white-space: nowrap !important;
        display: inline !important;
    }

    .team-name-cell {
        position: sticky;
        left: 0;
        width: 120px;
        min-width: 120px;
        background: rgba(20, 20, 40, 0.98);
        z-index: 5;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

    /* Header sits above rows */
    .team-stats-table th.team-name-cell {
        position: sticky;
        top: 0;
        z-index: 20;
        background: rgba(20, 20, 40, 0.98);
    }

    /* Data rows stay below header */
    .team-stats-table td.team-name-cell {
        z-index: 5;
    }

    /* Playcalling table sticky column */
    .playcalling-table .team-name-cell {
        position: sticky;
        left: 0;
        width: 120px;
        min-width: 120px;
        background: rgba(20, 20, 40, 0.98);
        z-index: 5;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

    /* Playcalling table header above rows */
    .playcalling-table th.team-name-cell {
        position: sticky;
        top: 0;
        z-index: 20;
        background: rgba(20, 20, 40, 0.98);
    }

    /* Playcalling data rows stay below header */
    .playcalling-table td.team-name-cell {
        z-index: 5;
    }

    /* Prevent text wrapping under sticky column */
    .team-name-cell span {
        display: block;
        white-space: nowrap;
    }

    /* Ensure second column doesn't have sticky positioning */
    .team-stats-table td:nth-child(2),
    .team-stats-table th:nth-child(2) {
        position: static;
        left: auto;
    }

    .playcalling-table td:nth-child(2),
    .playcalling-table th:nth-child(2) {
        position: static;
        left: auto;
    }

    /* Close Games table sticky column */
    .close-games-table .team-name-cell {
        position: sticky;
        left: 0;
        width: 120px;
        min-width: 120px;
        background: rgba(20, 20, 40, 0.98);
        z-index: 5;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

    .close-games-table th.team-name-cell {
        position: sticky;
        top: 0;
        z-index: 20;
        background: rgba(20, 20, 40, 0.98);
    }

    .close-games-table td.team-name-cell {
        z-index: 5;
    }

    /* Data table (Halftime Adjustments) sticky column */
    .data-table .team-name-cell {
        position: sticky;
        left: 0;
        width: 120px;
        min-width: 120px;
        background: rgba(20, 20, 40, 0.98);
        z-index: 5;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

    .data-table th.team-name-cell {
        position: sticky;
        top: 0;
        z-index: 20;
        background: rgba(20, 20, 40, 0.98);
    }

    .data-table td.team-name-cell {
        z-index: 5;
    }

    /* Player table sticky column */
    .player-table .team-name-cell {
        position: sticky;
        left: 0;
        width: 120px;
        min-width: 120px;
        background: rgba(20, 20, 40, 0.98);
        z-index: 5;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

    .player-table th.team-name-cell {
        position: sticky;
        top: 0;
        z-index: 20;
        background: rgba(20, 20, 40, 0.98);
    }

    .player-table td.team-name-cell {
        z-index: 5;
    }

    /* Homefield table sticky column */
    .homefield-table .team-name-cell {
        position: sticky;
        left: 0;
        width: 120px;
        min-width: 120px;
        background: rgba(20, 20, 40, 0.98);
        z-index: 5;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

    .homefield-table th.team-name-cell {
        position: sticky;
        top: 0;
        z-index: 20;
        background: rgba(20, 20, 40, 0.98);
    }

    .homefield-table td.team-name-cell {
        z-index: 5;
    }
}