/* Position Guide Styles */
.position-guide {
    background: #1e3a8a;
    border-radius: 10px;
    padding: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.position-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.position-category-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.position-category-btn:hover,
.position-category-btn.active {
    background: #f59e0b;
    color: #1e3a8a;
    border-color: #f59e0b;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
    z-index: 2;
    position: relative;
}

.position-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.position-card:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    transform: translateY(-3px);
}

.position-card i {
    font-size: 2rem;
    color: #f59e0b;
    margin-bottom: 10px;
    display: block;
}

.position-card h5 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.position-card .abbreviation {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.position-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.position-header h4 {
    margin: 0;
    color: #f59e0b;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.position-stats {
    display: flex;
    gap: 15px;
}

.stat-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.position-description {
    margin: 15px 0 20px;
    line-height: 1.7;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}

.key-responsibilities h5,
.key-attributes h5,
.famous-players h5 {
    color: #f59e0b;
    margin: 25px 0 12px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.key-responsibilities h5::before,
.key-attributes h5::before,
.famous-players h5::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 20px;
    background: #f59e0b;
    border-radius: 2px;
}

#responsibilities-list {
    padding-left: 20px;
    margin: 0;
}

#responsibilities-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.attribute-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid #f59e0b;
    transition: all 0.2s ease;
}

.attribute-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.attribute-item i {
    color: #f59e0b;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 4px;
    padding: 5px;
}

.attribute-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}

.attribute-level {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 3px;
}

.players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.player-tag {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(245, 158, 11, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.player-tag::before {
    content: '★';
    font-size: 0.8rem;
    color: #f59e0b;
}

.player-tag:hover {
    background: #f59e0b;
    color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

/* Pitch Legend */
.pitch-legend {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.legend-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}

.legend-section h6 {
    margin: 0 0 8px 0;
    color: #f59e0b;
    font-size: 0.95rem;
    font-weight: 700;
}

.legend-section p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.heatmap-scale {
    display: flex;
    gap: 8px;
    margin: 8px 0;
}

.heat-level {
    flex: 1;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.heat-level span {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.marker-example {
    display: flex;
    justify-content: center;
    margin: 8px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .position-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .attributes-grid {
        grid-template-columns: 1fr;
    }
    
    .position-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .position-stats {
        width: 100%;
        justify-content: flex-start;
    }
    
    .pitch-visualization {
        height: 300px;
    }
    
    .pitch-visualization-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pitch-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pitch-controls label {
        font-size: 0.85rem;
    }
}

/* Pitch Visualization */
.pitch-visualization-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.pitch-visualization-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pitch-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pitch-controls label {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.pitch-controls input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #f59e0b;
}

.pitch-visualization-container h5 {
    margin: 0 0 10px 0;
    color: #f59e0b;
    font-size: 1rem;
}

.pitch-visualization {
    width: 100%;
    height: 400px;
    background: #1a4b1a;
    border: 2px solid #fff;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-pitch {
    width: 100%;
    height: 100%;
}

/* Coverage area */
.coverage-area {
    position: absolute;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

/* Position marker */
.position-marker {
    width: 30px;
    height: 30px;
    background: #f59e0b;
    border-radius: 50%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a8a;
    font-size: 14px;
    transform: translate(-50%, -50%);
    z-index: 5;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    transition: all 0.3s ease;
}

.position-marker i {
    color: #1e3a8a;
}

/* SVG marker pulse */
.svg-pitch .marker-pulse {
    fill: #f59e0b;
    opacity: 0.6;
    animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
    0% { r: 3; opacity: 0.8; }
    70% { r: 10; opacity: 0.15; }
    100% { r: 12; opacity: 0; }
}

/* Heat cells */
.heat-cell {
    transition: opacity 0.3s ease;
}

/* Coverage and marker transitions */
#coverage-layer,
#marker-layer {
    transition: opacity 0.3s ease;
}

/* Animation for position cards */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.position-card {
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.position-card:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    transform: translateY(-3px);
}

.position-card.active {
    background: rgba(245, 158, 11, 0.3);
    border-color: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.position-card i {
    font-size: 2rem;
    color: #f59e0b;
    margin-bottom: 10px;
    display: block;
}

.position-card h5 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.position-card .abbreviation {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    font-weight: 500;
}

/* Add delay to each position card */
.position-card:nth-child(1) { animation-delay: 0.1s; }
.position-card:nth-child(2) { animation-delay: 0.2s; }
.position-card:nth-child(3) { animation-delay: 0.3s; }
.position-card:nth-child(4) { animation-delay: 0.4s; }
.position-card:nth-child(5) { animation-delay: 0.5s; }
.position-card:nth-child(6) { animation-delay: 0.6s; }
