/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #334155;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #10b981;
    text-decoration: none;
}

nav a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 30px;
}

nav a.active {
    color: #10b981;
}

/* Date Navigation */
.date-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
}

.nav-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: #334155;
    border-color: #10b981;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.date-display {
    font-size: 28px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
}

/* Warning Banner */
.warning-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.warning-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.warning-content {
    flex: 1;
    color: #78350f;
    font-size: 15px;
    line-height: 1.6;
}

.warning-content strong {
    color: #92400e;
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.warning-content a {
    color: #ea580c;
    font-weight: 600;
    text-decoration: none;
}

.warning-content a:hover {
    text-decoration: underline;
}

/* League Filter */
.league-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.league-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.league-btn.active {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

/* Bet Type Filter */
.bet-type-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 24px 0;
}

.bet-type-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 7px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.bet-type-btn:hover {
    background: #334155;
    border-color: #6366f1;
    color: #e2e8f0;
}

.bet-type-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

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

.stat-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-label {
    font-size: 14px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Picks Grid */
.picks-section {
    margin: 40px 0;
}

.picks-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #e2e8f0;
}

.tier-section {
    margin-bottom: 30px;
}

.tier-header {
    font-size: 18px;
    margin-bottom: 16px;
    padding: 12px 20px;
    border-radius: 8px;
    display: inline-block;
}

.tier-header.tier-top_play {
    background: #10b981;
    color: #fff;
}

.tier-header.tier-hidden_gems {
    background: #a855f7;
    color: #fff;
}

.tier-header.tier-solid {
    background: #3b82f6;
    color: #fff;
}

.tier-header.tier-lean {
    background: #f59e0b;
    color: #fff;
}

.tier-header.tier-avoid {
    background: #ef4444;
    color: #fff;
}

.tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Pick Tile (Bubble) */
.pick-tile {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.pick-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.pick-tile.tier-top_play {
    border-color: #10b981;
}

.pick-tile.tier-hidden_gems {
    border-color: #a855f7;
}

.pick-tile.tier-solid {
    border-color: #3b82f6;
}

.pick-tile.tier-lean {
    border-color: #f59e0b;
}

.pick-tile.tier-avoid {
    border-color: #ef4444;
}

.tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.league-badge {
    background: #334155;
    color: #94a3b8;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.result-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.result-badge.win {
    background: #10b981;
    color: #fff;
}

.result-badge.loss {
    background: #ef4444;
    color: #fff;
}

.result-badge.push {
    background: #64748b;
    color: #fff;
}

.result-badge.pending {
    background: #f59e0b;
    color: #fff;
}

.tile-matchup {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.tile-pick {
    font-size: 18px;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 12px;
}

.tile-stats {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.tile-time {
    font-size: 12px;
    color: #64748b;
    text-align: right;
}

/* Chart Section */
.chart-section {
    margin: 40px 0;
}

.chart-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #e2e8f0;
}

#performance-chart {
    max-height: 300px;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin: 60px 0;
}

.cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

/* Error/Empty States */
.error, .no-picks {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #94a3b8;
    font-size: 16px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

/* Tier Performance Section */
.tier-performance-section {
    margin: 40px 0;
}

.tier-performance-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #e2e8f0;
}

.tier-table {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.tier-table thead {
    background: #0f172a;
}

.tier-table th {
    padding: 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #334155;
}

.tier-table tbody tr {
    border-bottom: 1px solid #334155;
    transition: background 0.2s;
}

.tier-table tbody tr:last-child {
    border-bottom: none;
}

.tier-table tbody tr:hover {
    background: #0f172a;
}

.tier-table td {
    padding: 16px;
    font-size: 16px;
    color: #e2e8f0;
}

.tier-name {
    font-weight: 600;
    padding-left: 24px !important;
}

.tier-row.tier-top-play .tier-name {
    color: #10b981;
}

.tier-row.tier-hidden-gems .tier-name {
    color: #a855f7;
}

.tier-row.tier-solid .tier-name {
    color: #3b82f6;
}

.tier-row.tier-lean .tier-name {
    color: #f59e0b;
}

.tier-row.tier-avoid .tier-name {
    color: #ef4444;
}

.record {
    font-weight: 500;
}

.win-pct {
    font-weight: 500;
}

.roi {
    font-weight: 600;
}

.roi.positive {
    color: #10b981;
}

.roi.negative {
    color: #ef4444;
}

.roi.neutral {
    color: #94a3b8;
}

.picks {
    color: #94a3b8;
    font-size: 14px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
}

/* Avoid Bucket Group */
.bucket-header-row {
    background: #0a0f1e;
    border-top: 2px solid #334155;
}

.bucket-header-row td {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #475569;
}

.bucket-subtitle {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #334155;
    font-size: 11px;
    margin-left: 10px;
}

.sub-tier-row .tier-name {
    padding-left: 36px !important;
}

.combined-row {
    background: #0a0f1e;
    border-top: 1px dashed #334155;
}

.combined-row td {
    color: #64748b;
    font-size: 14px;
}

.combined-name {
    font-style: italic;
    padding-left: 36px !important;
}

/* Tile hint text */
.tile-hint {
    font-size: 11px;
    color: #475569;
    text-align: right;
    margin-top: 6px;
}

.pick-tile:hover .tile-hint {
    color: #10b981;
}

/* Value range line on tile */
.tile-value-range {
    font-size: 12px;
    color: #64748b;
    background: #0f172a;
    border-radius: 5px;
    padding: 5px 8px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.tile-value-range strong {
    color: #e2e8f0;
}

.tile-value-flag {
    font-size: 11px;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 5px;
    padding: 4px 8px;
    margin: 4px 0;
    line-height: 1.3;
}

.tile-caution-note {
    font-size: 11px;
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 5px;
    padding: 4px 8px;
    margin: 4px 0;
    line-height: 1.3;
}

/* ── Pick Detail Modal ─────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #334155;
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #475569;
    color: #e2e8f0;
}

.modal-league-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.modal-matchup {
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 12px;
    line-height: 1.4;
}

.modal-pick-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.modal-pick-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

.modal-pick-display {
    font-size: 16px;
    font-weight: bold;
    color: #10b981;
    flex: 1;
}

.modal-result {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.modal-result.win   { background: #10b981; color: #fff; }
.modal-result.loss  { background: #ef4444; color: #fff; }
.modal-result.push  { background: #64748b; color: #fff; }
.modal-result.pending { background: #f59e0b; color: #fff; }

.modal-meta-row {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.modal-meta-row strong {
    color: #e2e8f0;
}

.modal-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #334155;
}

/* Score comparison table */
.modal-score-table {
    background: #0f172a;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.modal-score-header {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.modal-score-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #1e293b;
}

.modal-score-row:last-child {
    border-bottom: none;
}

.modal-score-divider {
    height: 1px;
    background: #334155;
    margin: 6px 0;
}

.total-row .team-name {
    font-weight: 600;
    color: #94a3b8;
}

.total-row .score-num {
    font-weight: 700;
}

.team-name {
    font-size: 14px;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-tag, .away-tag {
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 600;
}

.home-tag { background: #1e3a5f; color: #60a5fa; }
.away-tag { background: #2d1b69; color: #a78bfa; }

.score-num {
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0;
    text-align: center;
}

.col-pred { text-align: center; color: #94a3b8; }
.col-actual { text-align: center; color: #10b981; font-weight: 600; }

/* Post-game insight */
.modal-insight {
    background: #0f172a;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.insight-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 5px 0;
    border-bottom: 1px solid #1e293b;
}

.insight-row:last-child { border-bottom: none; }

.insight-label { color: #64748b; }
.insight-val { color: #e2e8f0; font-weight: 500; }

.modal-pending-note {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    font-style: italic;
    margin-top: 8px;
}

.modal-no-pred {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    padding: 20px;
    background: #0f172a;
    border-radius: 10px;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .tier-table {
        font-size: 14px;
    }

    .tier-table th,
    .tier-table td {
        padding: 12px 8px;
    }

    .tier-name {
        padding-left: 12px !important;
    }
}
