/* Fantasy Trade Analyzer Styles */
.fta-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    background: #f8fafc;
    border-radius: 12px;
}

/* Header */
.fta-header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 40px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.fta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0ea5e9;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fta-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    margin: 0;
}

/* Settings Card */
.fta-settings-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.fta-settings-header {
    text-align: center;
    margin-bottom: 30px;
}

.fta-settings-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.fta-settings-header h2 i {
    color: #0ea5e9;
    margin-right: 10px;
}

.fta-settings-header p {
    color: #64748b;
    margin: 0;
}

.fta-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.fta-setting-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

/* Toggle Buttons */
.fta-toggle-group {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

.fta-toggle-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.fta-toggle-btn.active {
    background: #0ea5e9;
    color: white;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.fta-toggle-btn:hover:not(.active) {
    color: #374151;
    background: rgba(14, 165, 233, 0.1);
}

/* Switch */
.fta-switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 8px;
}

.fta-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.fta-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.fta-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.fta-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .fta-slider {
    background-color: #0ea5e9;
}

input:checked + .fta-slider:before {
    transform: translateX(20px);
}

/* Info Box */
.fta-info-box {
    display: flex;
    align-items: center;
    background: #dbeafe;
    color: #1e40af;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
}

.fta-info-box i {
    margin-right: 8px;
}

/* Trade Sections */
.fta-trade-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.fta-player-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

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

.fta-section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.fta-giving-icon {
    color: #ef4444;
}

.fta-getting-icon {
    color: #22c55e;
}

.fta-section-header p {
    color: #64748b;
    margin: 0;
    font-size: 0.875rem;
}

/* Search */
.fta-search-container {
    margin-bottom: 20px;
}

.fta-search-box {
    position: relative;
}

.fta-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.fta-search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
    background: white;
}

.fta-search-box input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Search Results */
.fta-search-results {
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: none;
}

.fta-search-results.show {
    display: block;
}

.fta-search-result {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s;
}

.fta-search-result:hover {
    background: #f8fafc;
}

.fta-search-result:last-child {
    border-bottom: none;
}

.fta-search-result .player-name {
    font-weight: 500;
    color: #1e293b;
}

.fta-search-result .player-info {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

/* Selected Players */
.fta-selected-players {
    min-height: 200px;
    margin-bottom: 20px;
}

.fta-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: #94a3b8;
}

.fta-empty-state i {
    font-size: 2rem;
    margin-bottom: 8px;
}

.fta-player-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.fta-player-info {
    display: flex;
    align-items: center;
}

.fta-player-avatar {
    width: 40px;
    height: 40px;
    background: #0ea5e9;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    margin-right: 12px;
}

.fta-player-details .player-name {
    font-weight: 500;
    color: #1e293b;
    margin: 0;
}

.fta-player-details .player-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin: 2px 0 0 0;
}

.fta-remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.fta-remove-btn:hover {
    background: #fef2f2;
}

/* Total Value */
.fta-total-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.fta-giving-value {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.fta-getting-value {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.fta-value {
    font-size: 1.25rem;
}

/* Controls */
.fta-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

/* Analyze Button */
.fta-analyze-container {
    text-align: center;
    margin-bottom: 40px;
}

/* Buttons */
.fta-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.875rem;
}

.fta-btn i {
    margin-right: 8px;
}

.fta-btn-primary {
    background: #0ea5e9;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
}

.fta-btn-primary:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -1px rgba(14, 165, 233, 0.3);
}

.fta-btn-outline {
    background: white;
    color: #0ea5e9;
    border: 2px solid #0ea5e9;
}

.fta-btn-outline:hover {
    background: #0ea5e9;
    color: white;
}

.fta-btn-secondary {
    background: #6b7280;
    color: white;
}

.fta-btn-secondary:hover {
    background: #4b5563;
}

.fta-btn-lg {
    padding: 16px 48px;
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fta-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Results */
.fta-results {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.fta-trade-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
}

.fta-trade-icon.good {
    background: #dcfce7;
    color: #16a34a;
}

.fta-trade-icon.fair {
    background: #dbeafe;
    color: #2563eb;
}

.fta-trade-icon.poor {
    background: #fef2f2;
    color: #dc2626;
}

.fta-trade-grade {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.fta-trade-grade.good {
    color: #16a34a;
}

.fta-trade-grade.fair {
    color: #2563eb;
}

.fta-trade-grade.poor {
    color: #dc2626;
}

.fta-trade-summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    margin: 40px 0;
    align-items: center;
}

.fta-value-box {
    padding: 20px;
    border-radius: 12px;
    border: 2px solid;
}

.fta-value-box.giving {
    background: #fef2f2;
    border-color: #fecaca;
}

.fta-value-box.getting {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.fta-value-box.difference {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.fta-value-box h4 {
    margin: 0 0 8px 0;
    font-size: 0.875rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 500;
}

.fta-value-box .value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.fta-value-box.giving .value {
    color: #dc2626;
}

.fta-value-box.getting .value {
    color: #16a34a;
}

.fta-value-box.difference .value {
    color: #0ea5e9;
}

.fta-insights {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.fta-insights h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
    text-align: center;
}

.fta-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.fta-insight {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.fta-insight i {
    color: #0ea5e9;
    margin-top: 2px;
}

.fta-insight-content h5 {
    margin: 0 0 4px 0;
    font-weight: 500;
    color: #1e293b;
}

.fta-insight-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

/* Loading */
.fta-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.fta-spinner {
    text-align: center;
    color: #0ea5e9;
}

.fta-spinner i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.fta-spinner p {
    margin: 0;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fta-container {
        padding: 15px;
    }
    
    .fta-title {
        font-size: 1.75rem;
    }
    
    .fta-settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .fta-trade-sections {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .fta-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .fta-trade-summary {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .fta-insights-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
.fta-search-results::-webkit-scrollbar {
    width: 6px;
}

.fta-search-results::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.fta-search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.fta-search-results::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}