/* DrRoto DFS Dashboard Styles */

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

:root {
    --primary-blue: #1e40af;
    --primary-red: #dc2626;
    --secondary-blue: #3b82f6;
    --secondary-red: #ef4444;
    --light-blue: #dbeafe;
    --light-red: #fee2e2;
    --dark-gray: #1f2937;
    --medium-gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --green: #10b981;
    --orange: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--white);
    color: var(--dark-gray);
    line-height: 1.6;
}

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

/* Header Section */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.logo-section {
    text-align: center;
    margin-bottom: 25px;
}

.logo-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.tagline {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

.controls-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: end;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.9;
}

.control-select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.control-select:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.control-select:focus {
    outline: none;
    border-color: var(--white);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.control-select option {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-refresh {
    padding: 10px 20px;
    background: var(--white);
    color: var(--primary-blue);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.stat-card {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--secondary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.blue {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.stat-icon.green {
    background: #d1fae5;
    color: var(--green);
}

.stat-icon.orange {
    background: #fed7aa;
    color: var(--orange);
}

.stat-icon.red {
    background: var(--light-red);
    color: var(--primary-red);
}

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--medium-gray);
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark-gray);
}

/* Position Tabs */
.position-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.position-tab {
    padding: 12px 28px;
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--dark-gray);
}

.position-tab:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
}

.position-tab.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

/* Filter Section */
.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 20px;
    color: var(--medium-gray);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: var(--light-gray);
    color: var(--dark-gray);
}

.filter-btn.active {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

.additional-controls {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid var(--secondary-blue);
    color: var(--secondary-blue);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-action:hover {
    background: var(--secondary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* Sort Controls */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 10px;
}

.sort-label {
    font-weight: 600;
    color: var(--medium-gray);
}

.sort-btn {
    padding: 6px 16px;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    color: var(--medium-gray);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.sort-btn:hover {
    background: var(--secondary-blue);
    color: var(--white);
    border-color: var(--secondary-blue);
}

.sort-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

/* Players Grid */
.players-grid {
    display: grid;
    gap: 15px;
}

.player-card {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.player-card:hover {
    border-color: var(--secondary-blue);
    box-shadow: var(--shadow-lg);
    transform: translateX(5px);
}

.player-rank {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
}

.player-info {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: center;
}

.player-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.player-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-gray);
}

.player-team {
    color: var(--medium-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

.player-matchup {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.matchup-text {
    color: var(--medium-gray);
    font-weight: 500;
}

.matchup-text.home {
    color: var(--green);
}

.matchup-text.away {
    color: var(--primary-red);
}

.trend {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.trend.hot {
    background: var(--light-red);
    color: var(--primary-red);
}

.trend.cold {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.trend.neutral {
    background: var(--light-gray);
    color: var(--medium-gray);
}

.player-stats {
    display: flex;
    gap: 30px;
}

.stat {
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.stat-value.salary {
    color: var(--orange);
}

.stat-value.projected {
    color: var(--green);
}

.stat-value.ownership {
    color: var(--secondary-blue);
}

.stat-value.value {
    color: var(--primary-red);
}

.stat-value.rating {
    color: var(--dark-gray);
}

.player-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-add {
    padding: 8px 16px;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: #059669;
    transform: scale(1.05);
}

.btn-add.added {
    background: var(--medium-gray);
    cursor: not-allowed;
}

.value-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    margin-top: 20px;
    color: var(--medium-gray);
    font-weight: 500;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--medium-gray);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--white);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid var(--light-gray);
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.lineup-slots {
    display: grid;
    gap: 10px;
    margin-bottom: 30px;
}

.lineup-slot {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 15px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 10px;
    align-items: center;
    transition: all 0.3s ease;
}

.lineup-slot:hover {
    background: var(--light-blue);
}

.lineup-slot.filled {
    background: #d1fae5;
    border: 2px solid var(--green);
}

.slot-position {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.slot-player {
    font-weight: 600;
    color: var(--dark-gray);
}

.slot-salary {
    font-weight: 700;
    color: var(--orange);
}

.lineup-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 10px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.summary-item span:first-child {
    font-size: 0.875rem;
    color: var(--medium-gray);
    font-weight: 600;
}

.summary-item span:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-gray);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .player-info {
        grid-template-columns: 1fr;
    }
    
    .player-stats {
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.75rem;
    }
    
    .controls-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-select {
        width: 100%;
    }
    
    .stats-overview {
        grid-template-columns: 1fr 1fr;
    }
    
    .position-tabs {
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .filter-section {
        flex-direction: column;
    }
    
    .player-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .player-rank {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .player-info {
        margin-left: 60px;
    }
}
