@font-face {
    font-family: 'Manrope';
    src: url('assets/fonts/manrope-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
}

@font-face {
    font-family: 'Newsreader';
    src: url('assets/fonts/newsreader-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 500 600;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/manrope-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
}

@font-face {
    font-family: 'Orbitron';
    src: url('assets/fonts/orbitron-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: 'Share Tech Mono';
    src: url('assets/fonts/share-tech-mono-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

body.legacy-page {
    --legacy-ink: #20201d;
    --legacy-muted: #66645e;
    --legacy-paper: #f5f2ea;
    --legacy-card: #fffdf8;
    --legacy-line: #d8d4ca;
    --legacy-navy: #17324a;
    --legacy-accent: #9f4d31;
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    overflow-x: clip;
    color: var(--legacy-ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(195, 103, 69, 0.07), transparent 25rem),
        radial-gradient(circle at 90% 14%, rgba(23, 50, 74, 0.07), transparent 28rem),
        var(--legacy-paper) !important;
    font-family: 'Manrope', sans-serif !important;
}

html:has(body.legacy-page) {
    overflow-x: clip;
}

body.legacy-page *,
body.legacy-page *::before,
body.legacy-page *::after {
    box-sizing: border-box;
}

body.legacy-page h1,
body.legacy-page h2,
body.legacy-page h3,
body.legacy-page h4,
body.legacy-page .board-title {
    color: var(--legacy-ink) !important;
    font-family: 'Newsreader', Georgia, serif !important;
    letter-spacing: -0.025em !important;
    text-wrap: balance;
}

body.legacy-page.college-page .header h1,
body.legacy-page.college-page .player-select-card h3 {
    color: var(--legacy-ink) !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    -webkit-text-fill-color: var(--legacy-ink) !important;
}

body.legacy-page p,
body.legacy-page .text-gray-600,
body.legacy-page .text-gray-500,
body.legacy-page .text-gray-400 {
    color: var(--legacy-muted) !important;
}

body.legacy-page a,
body.legacy-page button {
    -webkit-tap-highlight-color: transparent;
}

body.legacy-page :focus-visible {
    outline: 3px solid rgba(195, 103, 69, 0.35) !important;
    outline-offset: 3px;
}

body.legacy-page .container,
body.legacy-page .nav-container,
body.legacy-page main[class*='max-w-'],
body.legacy-page header > div[class*='max-w-'] {
    width: min(1440px, calc(100% - 3rem)) !important;
    max-width: 1440px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
}

body.legacy-page .tech-header,
body.legacy-page header.gradient-bg,
body.legacy-page header.bg-gray-800,
body.legacy-page .main-nav {
    position: sticky !important;
    top: 0;
    z-index: 1000;
    color: var(--legacy-ink) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--legacy-line) !important;
    background: rgba(245, 242, 234, 0.94) !important;
    box-shadow: none !important;
    backdrop-filter: blur(18px);
}

body.legacy-page .header-inner,
body.legacy-page .nav-container,
body.legacy-page header.gradient-bg > .container,
body.legacy-page header.bg-gray-800 > div {
    min-height: 70px !important;
    height: auto !important;
}

body.legacy-page .header-accent {
    display: none;
}

body.legacy-page .logo-container,
body.legacy-page header .bg-white.p-1,
body.legacy-page .nav-logo {
    width: 42px !important;
    height: 42px !important;
    padding: 0.2rem !important;
    border: 1px solid var(--legacy-line) !important;
    border-radius: 11px !important;
    background: var(--legacy-card) !important;
    box-shadow: none !important;
}

body.legacy-page.odds-page .nav-logo {
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    color: var(--legacy-ink) !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: 'Newsreader', Georgia, serif !important;
    font-size: 1.05rem !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap;
}

body.legacy-page .brand-name,
body.legacy-page header h1,
body.legacy-page .nav-logo {
    color: var(--legacy-ink) !important;
}

body.legacy-page .brand-tagline,
body.legacy-page header p,
body.legacy-page .board-subtitle {
    color: var(--legacy-accent) !important;
}

body.legacy-page .nav-section,
body.legacy-page .nav-menu,
body.legacy-page header nav {
    gap: 0.2rem !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.legacy-page .nav-link,
body.legacy-page header nav a {
    min-height: 38px;
    padding: 0.55rem 0.7rem !important;
    color: var(--legacy-muted) !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

body.legacy-page .nav-link:hover,
body.legacy-page .nav-link.active,
body.legacy-page header nav a:hover,
body.legacy-page header nav a[class*='bg-white'] {
    color: var(--legacy-ink) !important;
    background: var(--legacy-card) !important;
    box-shadow: inset 0 0 0 1px var(--legacy-line) !important;
}

body.legacy-page main,
body.legacy-page .header {
    padding-top: 1.25rem !important;
    padding-bottom: 3rem !important;
}

body.legacy-page .header {
    margin-bottom: 0.75rem;
    text-align: left !important;
}

body.legacy-page .header h1,
body.legacy-page .board-title {
    margin: 0 !important;
    font-size: clamp(2.5rem, 6vw, 5.5rem) !important;
    font-weight: 500 !important;
    line-height: 0.95 !important;
}

body.legacy-page .glass-panel,
body.legacy-page .analysis-card,
body.legacy-page [class*='bg-white'][class*='rounded'],
body.legacy-page [class*='bg-gray-800'][class*='rounded'],
body.legacy-page .player-select-card,
body.legacy-page .player-header-card,
body.legacy-page .similar-player-card,
body.legacy-page .stat-box,
body.legacy-page .filter-section,
body.legacy-page .week-selector {
    color: var(--legacy-ink) !important;
    border: 1px solid var(--legacy-line) !important;
    border-radius: 14px !important;
    background: rgba(255, 253, 248, 0.94) !important;
    box-shadow: 0 6px 20px rgba(32, 32, 29, 0.055) !important;
    backdrop-filter: none !important;
}

body.legacy-page [class*='bg-gray-50'],
body.legacy-page [class*='bg-blue-50'],
body.legacy-page [class*='bg-green-50'],
body.legacy-page [class*='bg-purple-50'],
body.legacy-page [class*='bg-yellow-50'],
body.legacy-page [class*='bg-red-50'],
body.legacy-page [class*='bg-indigo-50'] {
    color: var(--legacy-ink) !important;
    border-color: var(--legacy-line) !important;
    background: #f0ede5 !important;
}

body.legacy-page .input-field,
body.legacy-page .filter-input,
body.legacy-page .search-input,
body.legacy-page .multi-select-btn,
body.legacy-page input:not([type='checkbox']):not([type='radio']),
body.legacy-page select,
body.legacy-page textarea {
    min-height: 42px;
    color: var(--legacy-ink) !important;
    border: 1px solid #c4bfb3 !important;
    border-radius: 9px !important;
    background: var(--legacy-card) !important;
    box-shadow: none !important;
    font-family: 'Manrope', sans-serif !important;
}

body.legacy-page button,
body.legacy-page .btn-primary,
body.legacy-page [class*='bg-blue-600'],
body.legacy-page [class*='bg-green-500'] {
    min-height: 40px;
    color: white !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: var(--legacy-navy) !important;
    box-shadow: none !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 0.75rem;
    font-weight: 800 !important;
}

body.legacy-page button:hover,
body.legacy-page .btn-primary:hover {
    filter: brightness(0.96);
    transform: none !important;
}

body.legacy-page .tab-nav,
body.legacy-page .pagination,
body.legacy-page .stat-checkboxes {
    gap: 0.4rem !important;
}

body.legacy-page .tab-btn,
body.legacy-page .page-btn,
body.legacy-page .stat-checkbox {
    color: var(--legacy-muted) !important;
    border: 1px solid var(--legacy-line) !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.legacy-page .tab-btn.active,
body.legacy-page .page-btn.active,
body.legacy-page .stat-checkbox.checked {
    color: white !important;
    border-color: var(--legacy-navy) !important;
    background: var(--legacy-navy) !important;
}

body.legacy-page .table-container,
body.legacy-page [class*='overflow-x-auto'] {
    border: 1px solid var(--legacy-line) !important;
    border-radius: 12px !important;
    background: var(--legacy-card) !important;
    box-shadow: none !important;
}

body.legacy-page table {
    color: var(--legacy-ink) !important;
    border-color: var(--legacy-line) !important;
    background: transparent !important;
    font-family: 'Manrope', sans-serif !important;
}

body.legacy-page table th,
body.legacy-page .stats-table th,
body.legacy-page .player-stats-table th,
body.legacy-page .comparison-table th {
    height: 38px;
    padding: 0.55rem 0.65rem !important;
    color: #f8f5ed !important;
    border-color: var(--legacy-line) !important;
    background: var(--legacy-navy) !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.08em !important;
}

body.legacy-page table td,
body.legacy-page .stats-table td,
body.legacy-page .player-stats-table td,
body.legacy-page .comparison-table td {
    padding: 0.65rem !important;
    color: var(--legacy-ink) !important;
    border-color: var(--legacy-line) !important;
    background: var(--legacy-card) !important;
    font-size: 0.76rem !important;
}

body.legacy-page table tbody tr:nth-child(even) td {
    background: #f1eee6 !important;
}

body.legacy-page .player-name,
body.legacy-page .selected-player-name,
body.legacy-page .similar-player-name,
body.legacy-page .search-item-name,
body.legacy-page .search-result-name {
    color: var(--legacy-ink) !important;
    font-weight: 800 !important;
}

body.legacy-page .grade-cell,
body.legacy-page .similarity-score,
body.legacy-page .similarity-badge {
    border-radius: 7px !important;
}

body.legacy-page .stat-checkbox:not(.checked) {
    color: #79766f !important;
}

/* Live odds becomes a clean market board instead of a glowing LED wall. */
body.legacy-page .led-board {
    width: min(1440px, calc(100% - 3rem));
    margin: 1.25rem auto 3rem;
    padding: 0 !important;
    color: var(--legacy-ink) !important;
    border: 1px solid var(--legacy-line) !important;
    border-radius: 16px !important;
    background: var(--legacy-card) !important;
    box-shadow: 0 10px 32px rgba(32, 32, 29, 0.06) !important;
}

body.legacy-page.odds-page * {
    text-shadow: none !important;
}

body.legacy-page .board-header {
    padding: 1.1rem !important;
    border-bottom: 1px solid var(--legacy-line) !important;
    background: transparent !important;
}

body.legacy-page .board-title {
    font-size: clamp(2.2rem, 5vw, 4.8rem) !important;
    text-shadow: none !important;
}

body.legacy-page .status-bar,
body.legacy-page .grid-header {
    color: var(--legacy-muted) !important;
    border-color: var(--legacy-line) !important;
    background: #ece8de !important;
    text-shadow: none !important;
}

body.legacy-page .odds-grid,
body.legacy-page .odds-table {
    color: var(--legacy-ink) !important;
    background: transparent !important;
    text-shadow: none !important;
}

body.legacy-page .stats-table .team-name {
    color: var(--legacy-ink) !important;
}

body.legacy-page.odds-page .status-item {
    color: var(--legacy-muted) !important;
}

body.legacy-page.odds-page .team-cell.away-team,
body.legacy-page.odds-page .odds-cell.away-team,
body.legacy-page.odds-page .legend-away {
    color: #1f6849 !important;
}

body.legacy-page.odds-page .team-cell.home-team,
body.legacy-page.odds-page .odds-cell.home-team,
body.legacy-page.odds-page .legend-home {
    color: #9f4d31 !important;
}

body.legacy-page.odds-page .rank-badge,
body.legacy-page.odds-page .game-time-cell,
body.legacy-page.odds-page .legend-time {
    color: #644c16 !important;
}

body.legacy-page.odds-page .rank-badge {
    border-color: #8a6a26 !important;
    background: #f1e6cc !important;
}

body.legacy-page.odds-page .game-time-cell.live {
    color: #7f1d1d !important;
    opacity: 1 !important;
    animation: none !important;
}

body.legacy-page .loading,
body.legacy-page .no-data,
body.legacy-page .legend,
body.legacy-page .main-footer {
    color: var(--legacy-muted) !important;
    border-color: var(--legacy-line) !important;
    background: transparent !important;
    text-shadow: none !important;
}

body.legacy-page .dropdown-menu,
body.legacy-page .multi-select-dropdown,
body.legacy-page .search-dropdown,
body.legacy-page .search-results {
    color: var(--legacy-ink) !important;
    border: 1px solid var(--legacy-line) !important;
    border-radius: 10px !important;
    background: var(--legacy-card) !important;
    box-shadow: 0 18px 50px rgba(32, 32, 29, 0.14) !important;
}

body.legacy-page.odds-page .nav-item:last-child .dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

/* Portal-specific light workspace */
body.legacy-page.portal-page header h1 {
    font-family: 'Manrope', sans-serif !important;
    font-size: 1rem !important;
}

body.legacy-page.portal-page main {
    max-width: 1100px !important;
}

body.legacy-page.portal-page [class*='bg-gray-700'] {
    color: var(--legacy-ink) !important;
    border-color: var(--legacy-line) !important;
    background: #efebe2 !important;
}

body.legacy-page.portal-page .dropzone {
    color: var(--legacy-muted) !important;
    border: 1px dashed #b9b3a7 !important;
    background: #f2eee6 !important;
}

body.legacy-page.portal-page [class*='text-white'],
body.legacy-page.portal-page [class*='text-gray-100'],
body.legacy-page.portal-page [class*='text-gray-300'] {
    color: var(--legacy-ink) !important;
}

body.legacy-page.portal-page button[class*='bg-blue'],
body.legacy-page.portal-page button[type='submit'] {
    color: white !important;
}

body.legacy-page footer.gradient-bg {
    color: var(--legacy-muted) !important;
    border-top: 1px solid var(--legacy-line) !important;
    background: transparent !important;
}

body.legacy-page footer.gradient-bg p,
body.legacy-page footer.gradient-bg .text-gray-200,
body.legacy-page footer.gradient-bg .text-gray-300 {
    color: var(--legacy-muted) !important;
}

body.legacy-page.matchup-page main {
    min-height: calc(100vh - 190px);
}

@media (max-width: 900px) {
    body.legacy-page .container,
    body.legacy-page .nav-container,
    body.legacy-page main[class*='max-w-'],
    body.legacy-page header > div[class*='max-w-'],
    body.legacy-page .led-board {
        width: min(100% - 1.25rem, 1440px) !important;
    }

    body.legacy-page .header-inner,
    body.legacy-page .nav-container,
    body.legacy-page header.gradient-bg > .container,
    body.legacy-page header.bg-gray-800 > div {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 0.35rem !important;
        padding-block: 0.65rem !important;
    }

    body.legacy-page .nav-section,
    body.legacy-page .nav-menu,
    body.legacy-page header nav {
        display: flex !important;
        width: 100% !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        scrollbar-width: none;
    }

    body.legacy-page .nav-section::-webkit-scrollbar,
    body.legacy-page .nav-menu::-webkit-scrollbar,
    body.legacy-page header nav::-webkit-scrollbar {
        display: none;
    }

    body.legacy-page .compare-container,
    body.legacy-page .grid[class*='md:grid-cols'] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    body.legacy-page .container,
    body.legacy-page .nav-container,
    body.legacy-page main[class*='max-w-'],
    body.legacy-page header > div[class*='max-w-'],
    body.legacy-page .led-board {
        width: min(100% - 0.8rem, 1440px) !important;
    }

    body.legacy-page .header h1,
    body.legacy-page .board-title {
        font-size: clamp(2.25rem, 14vw, 4rem) !important;
    }

    body.legacy-page .analysis-card,
    body.legacy-page .glass-panel,
    body.legacy-page [class*='bg-white'][class*='rounded'],
    body.legacy-page [class*='bg-gray-800'][class*='rounded'] {
        padding: 0.9rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.legacy-page *,
    body.legacy-page *::before,
    body.legacy-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
