/* Fantasy Football Draft Assistant - Advanced Analytics Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --background-color: #ecf0f1;
    --card-background: #ffffff;
    --text-color: #34495e;
    --border-color: #bdc3c7;
    --card-bg: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    color: var(--secondary-color);
    font-size: 1.2em;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background-color: var(--card-background);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background-color: var(--background-color);
}

.tab-button.active {
    background-color: var(--secondary-color);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Control Sections */
.control-section {
    background-color: var(--card-background);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.control-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8em;
}

.control-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-group label {
    font-weight: 500;
    min-width: 150px;
}

.control-group select {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
}

.control-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Sliders */
.slider-group {
    margin-bottom: 25px;
    position: relative;
}

.slider-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    margin-bottom: 10px;
}

.info-icon {
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 18px;
    user-select: none;
    transition: transform 0.2s;
    display: inline-block;
    margin-left: 8px;
}

.info-icon:hover {
    transform: scale(1.2);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-label {
    font-size: 14px;
    color: #7f8c8d;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-value {
    font-weight: bold;
    color: var(--secondary-color);
    min-width: 40px;
    text-align: center;
}

/* Rankings Section */
.rankings-section {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-controls select {
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

#rankings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#rankings-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 8px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

#rankings-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
}

#rankings-table tbody tr:hover {
    background-color: #f8f9fa;
}

#rankings-table tbody tr.high-injury-risk {
    background-color: #ffe5e5;
}

/* Model Info */
.model-info {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}

.model-info h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.model-info h4 {
    color: var(--secondary-color);
    margin: 15px 0 10px 0;
}

.model-info ul {
    list-style: none;
    padding-left: 20px;
}

.model-info li {
    margin: 5px 0;
}

/* Draft Pick Tab */
.draft-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    height: calc(100vh - 300px);
}

.draft-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.draft-controls {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.draft-controls h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

#player-search {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
}

#player-search:focus {
    outline: none;
    border-color: var(--secondary-color);
}

#search-results {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.search-result {
    padding: 10px;
    background-color: #f8f9fa;
    margin: 5px 0;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    font-size: 14px;
}

.search-result:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateX(5px);
}

.search-result .player-info {
    flex: 1;
}

.search-result .player-stats {
    font-size: 12px;
    color: #666;
}

.search-result:hover .player-stats {
    color: #ddd;
}

.draft-status {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.draft-status h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.draft-status p {
    margin: 5px 0;
    font-size: 16px;
}

.draft-status span {
    font-weight: bold;
    color: var(--secondary-color);
}

.recent-picks {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    overflow-y: auto;
}

.recent-picks h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.recent-pick {
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.recent-pick:last-child {
    border-bottom: none;
}

.pick-number {
    font-weight: bold;
    color: var(--secondary-color);
    margin-right: 10px;
}

/* Right side - Best Available */
.draft-right {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.draft-right h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.position-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.pos-tab {
    padding: 8px 16px;
    border: none;
    background-color: #f8f9fa;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.pos-tab:hover {
    background-color: var(--background-color);
}

.pos-tab.active {
    background-color: var(--secondary-color);
    color: white;
}

.best-available-list {
    max-height: calc(100vh - 450px);
    overflow-y: auto;
}

.best-available-header {
    display: grid;
    grid-template-columns: 40px 1fr 50px 50px 80px 80px 60px;
    padding: 10px;
    font-weight: bold;
    border-bottom: 2px solid var(--primary-color);
    background-color: #f8f9fa;
    margin-bottom: 10px;
}

.player-row {
    display: grid;
    grid-template-columns: 40px 1fr 50px 50px 80px 80px 60px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.player-row:hover {
    background-color: #f8f9fa;
}

.player-row.high-risk {
    background-color: #fff5f5;
}

.player-row.high-risk:hover {
    background-color: #ffe5e5;
}

.rank {
    font-weight: bold;
    color: var(--secondary-color);
}

.player-name {
    font-weight: 500;
}

.player-position {
    background-color: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    text-align: center;
    font-size: 12px;
}

.player-team {
    color: #666;
    font-size: 12px;
}

.player-vorp {
    font-weight: bold;
    color: var(--success-color);
}

.player-risk {
    color: var(--danger-color);
    font-size: 12px;
}

.player-score {
    font-weight: bold;
}

/* Tooltips */
.tooltip {
    position: absolute;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    top: 30px;
    left: 0;
    right: auto;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.tooltip.hidden {
    display: none;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--primary-color);
}

/* Input number styling */
input[type="number"] {
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    width: 80px;
    text-align: center;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* New draft board styles */
.available-players {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.position-limits {
    margin-top: 10px;
}

.limit-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

.limit-row span:first-child {
    font-weight: 500;
}

.player-pool {
    flex: 1;
    overflow-y: auto;
    margin-top: 10px;
    max-height: 400px;
}

.player-card {
    background: white;
    border: 2px solid #e3e8ee;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all 0.2s ease;
}

.player-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.player-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.player-card .player-name {
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-card .player-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
}

.player-card .player-rank {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.player-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 12px;
    margin-left: 8px;
}

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

.teams-container {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    overflow-x: auto;
}

.team-board {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    min-width: 280px;
    box-shadow: var(--shadow);
}

.team-board h4 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-color);
}

.team-roster {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.roster-slot {
    background: #f8fafc;
    border: 2px dashed #e3e8ee;
    border-radius: 8px;
    padding: 12px;
    min-height: 50px;
    transition: all 0.2s ease;
    position: relative;
}

.roster-slot.drag-over {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.roster-slot.filled {
    border-style: solid;
    background: white;
}

.roster-slot.disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

.slot-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}

.unit-label {
    color: #666;
    font-size: 14px;
    margin-left: 5px;
}


.control-group {
    position: relative;
}

/* Methodology */
.methodology-section {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.methodology-section h3 {
    color: var(--primary-color);
    margin: 20px 0 10px 0;
}

.methodology-section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.methodology-section ul {
    margin-left: 30px;
    margin-bottom: 15px;
}

.methodology-section li {
    margin: 8px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .control-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .control-group label {
        min-width: auto;
    }
    
    #rankings-table {
        font-size: 12px;
    }
    
    #rankings-table th,
    #rankings-table td {
        padding: 6px 4px;
    }
}