/* Main Container Styles */
#fantasy-team-manager {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Team Selection Area */
.team-selection {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: center;
}

#team-selector {
    min-width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Status Messages */
#roster-status-messages {
    margin: 20px 0;
}

.message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.salary-warning {
    background-color: #ffe6e6;
    border: 1px solid #ffcccc;
    color: #cc0000;
}

.player-count-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

/* Player Grid */
.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Player Cards */
.player-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.player-card.kept {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.player-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.player-info {
    margin-bottom: 10px;
}

.player-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.player-details {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.player-value {
    font-size: 16px;
    font-weight: 600;
    color: #2196F3;
}

/* Player Actions */
.player-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.keep-player {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.kept .keep-player {
    background-color: #f44336;
}

.keep-player:hover {
    opacity: 0.9;
}

.taxi-badge {
    background-color: #ff9800;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Taxi Player Indicator */
.taxi-player {
    background-color: #ff9800;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
    margin-top: 5px;
}

/* Status Boxes */
.status-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.status-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: white;
}

.status-box h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
}

.progress.warning {
    background-color: #dc3545;
}

/* Position Limits Table */
.position-limits-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.position-limits-table th,
.position-limits-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.position-limits-table th {
    background-color: #f8f9fa;
}

/* Submit Button */
#submit-players {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

#submit-players:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#submit-players:not(:disabled):hover {
    background-color: #1976D2;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    background: #f5f5f5;
    border-radius: 4px;
}

/* Messages */
.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 4px;
    margin: 5px 0;
}

.info-message {
    color: #1976d2;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #bbdefb;
}

/* Roster Container */
.roster-container {
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

/* Player Row */
.player-row {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.player-row:last-child {
    border-bottom: none;
}

.player-row.kept {
    background-color: #e8f5e9;
}

.player-row:hover {
    background-color: #f5f5f5;
}

/* Player Information */
.player-name {
    flex: 2;
    font-weight: 500;
}

.player-team,
.player-position {
    flex: 1;
    text-align: center;
}

.player-value {
    flex: 1;
    text-align: right;
    font-weight: 500;
}

/* Taxi Squad */
.taxi-player {
    background: #fff3e0;
    color: #f57c00;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: auto;
    font-size: 0.9em;
}

/* Keep Player Button */
.keep-player {
    margin-left: auto;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #1976d2;
}

.keep-player:hover {
    background: #1976d2;
    border-color: #1976d2;
    color: white;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .player-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .player-name {
        flex: 100%;
    }

    .player-team,
    .player-position,
    .player-value {
        flex: 1;
    }

    .keep-player,
    .taxi-player {
        flex: 100%;
        text-align: center;
        margin: 8px 0 0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .keep-player {
        padding: 12px 20px;
        min-height: 44px;
    }

    .player-card {
        padding: 20px;
    }

    .player-actions {
        margin-top: 15px;
    }
}

/* High DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .player-card {
        border-width: 0.5px;
    }
}

/* Print Styles */
@media print {
    #fantasy-team-manager {
        max-width: none;
        padding: 0;
    }

    .player-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }

    .keep-player,
    #submit-players {
        display: none;
    }
}

/* Touch Feedback */
.touch-device .keep-player:active {
    transform: scale(0.95);
}

.touch-active {
    background-color: rgba(0,0,0,0.1);
}

/* Salary Cap Status */
#salary-cap-status {
    font-size: 16px;
    font-weight: 600;
    padding: 8px;
    border-radius: 4px;
    display: inline-block;
}

#salary-cap-status.error {
    color: #f44336;
    background-color: #ffebee;
}

/* Position Limits Table Updates */
.position-limits-table td {
    font-weight: 500;
}

.position-limits-table tr[style*="color: green"] td {
    background-color: #e8f5e9;
}

.position-limits-table tr[style*="color: red"] td {
    background-color: #ffebee;
}

/* Loading State */
.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Add to your existing CSS */
.player-row.taxi {
    background-color: #e8f5e9;
}

.taxi-notice {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #c8e6c9;
}

.uploaded-data-info {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-left: 4px solid #46b450;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin: 20px 0;
    padding: 15px;
}

.uploaded-data-info h3 {
    margin-top: 0;
    color: #23282d;
}

.uploaded-data-info p {
    margin: 0.5em 0;
    color: #555;
}

.dlss-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.roster-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.roster-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    table-layout: fixed;
}

.roster-table th,
.roster-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.roster-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.roster-status,
.position-limits {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.limits-table {
    width: 100%;
    border-collapse: collapse;
}

.limits-table th,
.limits-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .dlss-container {
        padding: 10px;
    }

    .roster-table {
        display: block;
        overflow-x: auto;
    }

    .roster-table th,
    .roster-table td,
    .limits-table th,
    .limits-table td {
        padding: 8px 5px;
        font-size: 14px;
    }

    .status-row {
        font-size: 14px;
    }

    .button {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .roster-table th,
    .roster-table td,
    .limits-table th,
    .limits-table td {
        padding: 6px 3px;
        font-size: 12px;
    }

    .status-row {
        font-size: 12px;
    }

    .button {
        padding: 4px 8px;
        font-size: 12px;
    }
}

.status-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.status-message {
    font-weight: bold;
    margin-top: 10px;
}

.success-message {
    color: #28a745;
    background-color: #d4edda;
    padding: 10px;
    border-radius: 4px;
    margin: 5px 0;
}

.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 4px;
    margin: 5px 0;
}

.taxi-kept {
    color: #ff9800;
    font-weight: bold;
}