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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    background: white;
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #1a365d;
}

header p {
    color: #666;
    font-size: 14px;
}

.back-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
}

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

/* Search */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

#playerSearch {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s;
}

#playerSearch:focus {
    outline: none;
    border-color: #0066cc;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
}

.search-result-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-info strong {
    color: #1a365d;
}

.meta {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}

/* Player Header */
.player-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.player-info-card {
    flex: 1;
    min-width: 200px;
}

.player-info-card p {
    margin: 8px 0;
    font-size: 14px;
}

.conference-selector {
    flex: 0 1 auto;
}

.conference-selector label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: #666;
    font-weight: 600;
}

.conference-selector select {
    padding: 8px 12px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: white;
}

.conference-selector select:focus {
    outline: none;
    border-color: #0066cc;
}

/* Sections */
.section {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.section h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #1a365d;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

/* Tables */
.seasons-table,
.comparables-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.seasons-table th,
.comparables-table th {
    background: #f5f5f5;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.seasons-table td,
.comparables-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
}

.seasons-table tr:hover,
.comparables-table tr:hover {
    background: #f9f9f9;
}

.seasons-table tr.covid-flag {
    background: #fff9e6;
}

/* Projection Grid */
.projection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.projection-stat {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 6px;
    border-left: 4px solid #0066cc;
    text-align: center;
}

.projection-stat.large {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border: none;
}

.projection-stat label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.projection-stat.large label {
    color: rgba(255,255,255,0.9);
}

.projection-stat value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1a365d;
}

.projection-stat.large value {
    color: white;
}

.projection-stat value.large {
    font-size: 36px;
}

/* Message */
.message {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.message.error {
    background: #ffebee;
    border-left-color: #f44336;
    color: #c62828;
}

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

    .player-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .seasons-table,
    .comparables-table {
        font-size: 12px;
    }

    .seasons-table th,
    .comparables-table th,
    .seasons-table td,
    .comparables-table td {
        padding: 8px 4px;
    }
}

/* ── D3/D2 additions ───────────────────────────────────── */
.top-nav {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    align-items: center;
}
.top-nav .brand {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin-right: 4px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.top-nav a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 4px;
}
.top-nav a.active,
.top-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}
.badge-d3 {
    background: #27ae60;
    color: #fff;
}
.search-section {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.conf-select {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
}
.conf-select label {
    color: #555;
    font-size: 14px;
}
.conf-select select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}
.info-section {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.info-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}
.info-section p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}
.info-section a {
    color: #3498db;
    font-size: 13px;
}
.muted { color: #aaa; font-style: italic; }
.no-projection {
    background: #fef9e7;
    border: 1px solid #f39c12;
    border-radius: 8px;
    padding: 16px 20px;
    color: #7d6608;
}
.footnote {
    margin-top: 24px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}
.footnote a { color: #3498db; }
.confidence-high   { color: #27ae60; font-weight: bold; }
.confidence-medium { color: #f39c12; font-weight: bold; }
.confidence-low    { color: #e74c3c; }
