/* AI Starting XI Page Styles */

.section-subtitle {
    text-align: center;
    color: #04f5ff;
    font-size: 0.95em;
    margin: -10px 0 20px 0;
    font-style: italic;
}

/* XI Section */
.xi-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 15px 0;
}

.pitch-container {
    background: linear-gradient(135deg, #1a5f2e 0%, #2d8659 100%);
    border: 3px solid #00cc6a;
    border-radius: 15px;
    padding: 20px 15px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 0 30px rgba(0, 255, 135, 0.1);
}

.pitch {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.pitch-section {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.player-tile {
    background: linear-gradient(135deg, #37003c 0%, #2c0030 100%);
    border: 2px solid #00cc6a;
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
    min-width: 90px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 204, 106, 0.2);
}

.player-tile:hover {
    background: linear-gradient(135deg, #04f5ff 0%, #00ff87 100%);
    color: #37003c;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(4, 245, 255, 0.4);
}

.player-tile:hover .player-name-tile,
.player-tile:hover .player-team-tile,
.player-tile:hover .player-xp-tile,
.player-tile:hover .player-fixture-tile {
    color: #37003c;
}

.player-name-tile {
    font-weight: bold;
    font-size: 0.95em;
    color: #00ff87;
    margin-bottom: 4px;
}

.player-team-tile {
    font-size: 0.75em;
    color: #04f5ff;
    opacity: 0.9;
    margin-bottom: 6px;
}

.player-xp-tile {
    background: rgba(0, 255, 135, 0.2);
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: bold;
    color: #00ff87;
    margin-bottom: 4px;
    display: inline-block;
    width: 100%;
}

.player-fixture-tile {
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.player-fixture-tile.very-easy {
    background: #00b359;
    color: white;
}

.player-fixture-tile.easy {
    background: #00ff87;
    color: #37003c;
}

.player-fixture-tile.medium {
    background: #ffa500;
    color: white;
}

.player-fixture-tile.hard {
    background: #ff4444;
    color: white;
}

.player-fixture-tile.very-hard {
    background: #cc0000;
    color: white;
}

.player-fixture-tile.blank {
    background: #666;
    color: white;
    opacity: 0.7;
}

.player-fixture-tile.double {
    box-shadow: 0 0 0 2px #ffd700, inset 0 0 0 1px #ffd700;
    animation: double-pulse 2s ease-in-out infinite;
}

@keyframes double-pulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

@keyframes glow {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

.bench-section {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bench-label {
    font-weight: bold;
    font-size: 1.1em;
    color: #37003c;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.bench-players-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.bench-info {
    background: linear-gradient(135deg, #04f5ff15 0%, #00cc6a15 100%);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #00cc6a;
    color: #37003c;
    font-size: 0.95em;
    line-height: 1.6;
    text-align: center;
}

/* XI Summary */
.xi-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.xi-summary-card {
    background: linear-gradient(135deg, #37003c 0%, #2c0030 100%);
    border: 2px solid #04f5ff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 16px rgba(4, 245, 255, 0.2);
}

.summary-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #00ff87;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #04f5ff;
}

.summary-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
}

.summary-stat:last-child {
    margin-bottom: 0;
}

.summary-stat .stat-label {
    color: #04f5ff;
    font-weight: 500;
    font-size: 0.95em;
}

.summary-stat .stat-value {
    color: #00ff87;
    font-weight: bold;
    font-size: 1.1em;
}

.summary-stat .stat-value.highlight {
    font-size: 1.4em;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Top Players Grid */
.position-section {
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.position-section:hover {
    border-color: #00cc6a;
    box-shadow: 0 6px 16px rgba(0, 204, 106, 0.2);
}

.position-title {
    background: linear-gradient(135deg, #37003c 0%, #2c0030 100%);
    color: #00cc6a;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: bold;
    margin: -15px -15px 12px -15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
}

.players-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#topPlayers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

#topPlayers .position-section {
    margin: 0;
}

#topPlayers .players-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#topPlayers .player-card {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 12px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

#topPlayers .player-card:hover {
    border-color: #00ff87;
    background: #fffbf7;
    box-shadow: 0 4px 12px rgba(0, 255, 135, 0.2);
    transform: translateX(5px);
}

#topPlayers .player-info {
    flex: 0 0 auto;
    min-width: 150px;
}

#topPlayers .player-name {
    font-size: 1em;
    font-weight: bold;
    color: #37003c;
    margin: 0;
}

#topPlayers .player-team {
    font-size: 0.85em;
    color: #666;
    margin: 4px 0 0 0;
}

#topPlayers .player-stats {
    display: flex;
    gap: 8px;
    margin: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#topPlayers .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 60px;
}

#topPlayers .stat-label {
    font-size: 0.75em;
    color: #999;
    text-transform: uppercase;
}

#topPlayers .stat-value {
    font-size: 0.95em;
    font-weight: bold;
    color: #37003c;
}

#topPlayers .stat-value.good {
    color: #00cc6a;
    font-size: 1.05em;
}

/* Methodology Section */
.methodology {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00cc6a;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.methodology h2 {
    color: #00cc6a;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.methodology h2:hover {
    color: #04f5ff;
}

.methodology h2 .toggle-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.methodology h2 .toggle-icon.rotated {
    transform: rotate(-180deg);
}

.methodology-content {
    max-width: 1200px;
    margin: 0 auto;
}

.methodology-content .intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #e0e0e0;
}

.formula-box {
    background: #0f3460;
    border: 2px solid #04f5ff;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.formula-box h3 {
    color: #04f5ff;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    color: #00ff87;
    background: rgba(0, 255, 135, 0.1);
    padding: 1rem;
    border-radius: 6px;
    font-weight: bold;
}

.formula-small {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #04f5ff;
    background: rgba(4, 245, 255, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    display: inline-block;
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.component {
    background: rgba(55, 0, 60, 0.3);
    border: 1px solid #37003c;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.component:hover {
    transform: translateY(-5px);
    border-color: #00cc6a;
}

.component.highlight {
    background: rgba(0, 204, 106, 0.1);
    border: 2px solid #00cc6a;
}

.component h4 {
    color: #00cc6a;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.component p {
    color: #ccc;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.component ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.component ul li {
    color: #e0e0e0;
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.4;
}

.component ul li::before {
    content: '▸';
    color: #04f5ff;
    position: absolute;
    left: 0;
}

.multipliers {
    margin: 2rem 0;
}

.multipliers h3 {
    color: #04f5ff;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.multiplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.multiplier {
    background: rgba(4, 245, 255, 0.05);
    border: 1px solid #04f5ff;
    border-radius: 8px;
    padding: 1.5rem;
}

.multiplier h4 {
    color: #04f5ff;
    margin-bottom: 1rem;
}

.multiplier ul {
    list-style: none;
    padding: 0;
}

.multiplier ul li {
    padding: 0.5rem 0;
    color: #e0e0e0;
}

.multiplier .easy {
    color: #00ff87;
    font-weight: bold;
}

.multiplier .medium {
    color: #ffd700;
    font-weight: bold;
}

.multiplier .hard {
    color: #ff4444;
    font-weight: bold;
}

.multiplier .blank {
    color: #666;
    opacity: 0.7;
}

.multiplier .double {
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .xi-section {
        grid-template-columns: 1fr;
    }
    
    .pitch-container {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .xi-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pitch-container {
        padding: 20px 15px;
        min-height: 350px;
    }
    
    .pitch-section {
        gap: 10px;
    }
    
    .player-tile {
        min-width: 80px;
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .player-name-tile {
        font-size: 0.85em;
    }
    
    #topPlayers {
        grid-template-columns: 1fr;
    }
    
    .components-grid {
        grid-template-columns: 1fr;
    }
    
    .methodology {
        padding: 1.5rem;
    }
    
    .methodology h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    #topPlayers .player-card {
        flex-direction: column;
    }
    
    #topPlayers .player-stats {
        justify-content: flex-start;
    }
    
    .pitch-section {
        gap: 8px;
    }
    
    .player-tile {
        min-width: 70px;
        padding: 8px 10px;
        font-size: 0.8em;
    }
}

/* AI xP Difficulty Colors */
.player-points.ai-xp.very-easy {
    background: #00b359 !important;
}

.player-points.ai-xp.easy {
    background: #00ff87 !important;
    color: #37003c !important;
}

.player-points.ai-xp.medium {
    background: #ffa500 !important;
}

.player-points.ai-xp.hard {
    background: #ff4444 !important;
}

.player-points.ai-xp.very-hard {
    background: #cc0000 !important;
}

.player-points.ai-xp.blank {
    background: #666 !important;
    opacity: 0.7;
}
