/* Team Intelligence Styles */

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

/* Team Selector Section */
.team-selector-section {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.selector-container h2 {
    color: var(--text-primary);
    margin: 0 0 10px 0;
    font-size: 2.2rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.team-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.selection-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.selection-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.team-dropdown {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.team-dropdown:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.btn-analyze {
    background: linear-gradient(135deg, var(--accent-color), #9b59b6);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.analysis-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.95rem;
    gap: 8px;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
}

/* Intelligence Dashboard */
.intelligence-dashboard {
    margin-bottom: 30px;
}

.intelligence-container {
    background: var(--bg-primary);
    border-radius: 15px;
    padding: 0;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.loading-intelligence {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Team Intelligence Header */
.team-intelligence-header {
    background: linear-gradient(135deg, var(--accent-color), #9b59b6);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.team-info h2 {
    margin: 0 0 8px 0;
    font-size: 2rem;
}

.team-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.team-meta span {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.team-actions {
    display: flex;
    gap: 10px;
}

.btn-compare,
.btn-export {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-compare:hover,
.btn-export:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Intelligence Grid */
.intelligence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    padding: 30px;
}

.intelligence-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.intelligence-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #9b59b6);
}

.intelligence-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.intelligence-card h3 {
    color: var(--text-primary);
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Basic Info Card */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    text-align: center;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.info-item .label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.info-item .value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.injury-count {
    color: #e74c3c !important;
}

.form-rating {
    color: #2ecc71 !important;
}

.morale-indicator {
    text-align: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.morale-badge {
    padding: 6px 15px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.morale-badge.high {
    background: #2ecc71;
    color: white;
}

.morale-badge.medium {
    background: #f39c12;
    color: white;
}

.morale-badge.low {
    background: #e74c3c;
    color: white;
}

/* Tactical Analysis Card */
.formation-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.formation {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
}

.possession-stats {
    text-align: center;
}

.possession {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.playing-style h4 {
    color: var(--text-primary);
    margin: 0 0 15px 0;
}

.style-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.style-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.style-label {
    min-width: 120px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.bar-container {
    flex: 1;
    position: relative;
    height: 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #9b59b6);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.bar-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.tactical-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.strengths,
.weaknesses {
    padding: 15px;
    border-radius: 8px;
}

.strengths {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.weaknesses {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.strengths h5,
.weaknesses h5 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
}

.strengths ul,
.weaknesses ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.strengths li,
.weaknesses li {
    padding: 5px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Performance Patterns Card */
.pattern-section {
    margin-bottom: 25px;
}

.pattern-section h4 {
    color: var(--text-primary);
    margin: 0 0 15px 0;
    font-size: 1rem;
}

.home-away-comparison,
.opposition-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.performance-stat,
.vs-stat {
    text-align: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.performance-stat .label,
.vs-stat .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.performance-stat .value,
.vs-stat .value {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.value.home {
    color: #2ecc71;
}

.value.away {
    color: #e74c3c;
}

.value.advantage {
    color: var(--accent-color);
}

/* Manager Influence Card */
.manager-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.manager-info h4 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.tenure {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.manager-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-item .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-item .value {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.manager-attributes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.attribute {
    display: flex;
    align-items: center;
    gap: 15px;
}

.attr-label {
    min-width: 130px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.attr-bar {
    flex: 1;
    height: 16px;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.attr-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #9b59b6);
    transition: width 0.8s ease;
}

/* Transfer Impact Card */
.transfer-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.transfer-stat {
    text-align: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.transfer-stat .value.profit {
    color: #2ecc71;
}

.transfer-stat .value.expense {
    color: #e74c3c;
}

.recent-signings h4 {
    color: var(--text-primary);
    margin: 0 0 15px 0;
}

.signings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signing-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.signing-info .name {
    font-weight: 600;
    color: var(--text-primary);
}

.signing-info .position {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-left: 8px;
}

.signing-details {
    text-align: right;
}

.fee {
    display: block;
    font-weight: 600;
    color: var(--accent-color);
}

.status {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 3px;
}

.status.excellent {
    background: #2ecc71;
    color: white;
}

.status.good {
    background: #27ae60;
    color: white;
}

.status.adapting {
    background: #f39c12;
    color: white;
}

.status.struggling {
    background: #e74c3c;
    color: white;
}

/* Quick Insights Panel */
.quick-insights {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.quick-insights h2 {
    color: var(--text-primary);
    margin: 0 0 25px 0;
    text-align: center;
    font-size: 1.8rem;
}

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

.insight-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.insight-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.insight-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), #9b59b6);
    border-radius: 50%;
    color: white;
}

.insight-content h3 {
    color: var(--text-primary);
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.insight-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    .intelligence-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .team-intelligence-header {
        flex-direction: column;
        text-align: center;
    }
    
    .team-meta {
        justify-content: center;
    }
    
    .tactical-summary {
        grid-template-columns: 1fr;
    }
    
    .home-away-comparison,
    .opposition-stats,
    .manager-stats,
    .transfer-summary {
        grid-template-columns: 1fr 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-options {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .team-selector-section {
        padding: 20px;
    }
    
    .intelligence-card {
        padding: 20px;
    }
    
    .info-grid,
    .home-away-comparison,
    .opposition-stats,
    .manager-stats,
    .transfer-summary {
        grid-template-columns: 1fr;
    }
    
    .style-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .style-label {
        min-width: auto;
    }
}