/* Main styles */
body {
    background-color: #000733;
    color: #E8F1F9;
}

/* Scrollbar styling */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: #0A0F3B;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #2B1EC0;
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #3FF384;
}

/* Rating bar animation */
.rating-bar {
    transition: width 1s ease-out;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 240px;
}

/* Skill progress */
.skill-progress {
    background: linear-gradient(90deg, #2B1EC0 0%, #3FF384 100%);
}

/* Position badge */
.position-badge {
    background: rgba(63, 243, 132, 0.1);
    border: 1px solid #3FF384;
}

/* Multi-position badges */
.multi-position-badge {
    background: rgba(10, 15, 59, 0.6);
    border: 1px solid rgba(43, 30, 192, 0.5);
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.multi-position-badge:hover {
    background: rgba(43, 30, 192, 0.3);
    border-color: rgba(63, 243, 132, 0.5);
}

/* Hover effects */
.hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

/* Table styling */
.stats-table th {
    position: sticky;
    top: 0;
    background-color: #0A0F3B;
    z-index: 10;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.stats-table td {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Ensure minimum spacing for tight columns */
.stats-table th:not(:first-child),
.stats-table td:not(:first-child) {
    min-width: 3rem;
}

/* Skill columns need extra space */
.stats-table th:nth-child(n+18),
.stats-table td:nth-child(n+18) {
    min-width: 4rem;
}

/* Card shadows */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

/* Loading animation */
.loading-spinner {
    border: 3px solid #0A0F3B;
    border-top: 3px solid #3FF384;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bell curve container */
.bell-curve-container {
    position: relative;
    height: 150px;
    margin: 10px 0;
}

/* No data indicator */
.nodata-badge {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #FF4444;
    color: #FF6B6B;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Responsive table styles */
@media (max-width: 1024px) {
    /* Hide less important columns on medium screens */
    .stats-table th:nth-child(6), /* Shots */
    .stats-table td:nth-child(6),
    .stats-table th:nth-child(9), /* Pass % */
    .stats-table td:nth-child(9),
    .stats-table th:nth-child(11), /* Tackles */
    .stats-table td:nth-child(11),
    .stats-table th:nth-child(12), /* Blocks */
    .stats-table td:nth-child(12),
    .stats-table th:nth-child(15), /* Dribbles */
    .stats-table td:nth-child(15) {
        display: none;
    }
}

/* Mobile card format */
@media (max-width: 640px) {
    .stats-table {
        display: block;
    }
    
    .stats-table thead {
        display: none;
    }
    
    .stats-table tbody {
        display: block;
    }
    
    .stats-table tr {
        display: block;
        margin-bottom: 1rem;
        background: #0A0F3B;
        border-radius: 0.5rem;
        padding: 1rem;
        border: 1px solid #2B1EC0;
    }
    
    .stats-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(43, 30, 192, 0.3);
    }
    
    .stats-table td:last-child {
        border-bottom: none;
    }
    
    .stats-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #9CA3AF;
    }
    
    /* Team info stays at top */
    .stats-table td:first-child {
        display: block;
        text-align: center;
        padding-bottom: 1rem;
        margin-bottom: 0.5rem;
        border-bottom: 2px solid #2B1EC0;
    }
    
    .stats-table td:first-child:before {
        display: none;
    }
    
    /* Skill ratings section */
    .stats-table tr::after {
        content: '';
        display: block;
        padding: 0.5rem;
        text-align: center;
        color: #9CA3AF;
        font-weight: 600;
        border-bottom: 1px solid rgba(43, 30, 192, 0.3);
    }
    
    .stats-table tr:nth-child(1)::after {
        content: 'Skill Ratings';
    }
    
    /* Skill ratings grid */
    .stats-table td:nth-child(n+18) {
        display: inline-block;
        width: 50%;
        text-align: center;
        padding: 0.75rem;
        border: none;
        position: relative;
    }
    
    .stats-table td:nth-child(n+18):before {
        position: absolute;
        left: 0.75rem;
        font-weight: 600;
    }
    
    .stats-table td:nth-child(n+18) .skill-value {
        margin-left: auto;
        margin-right: 2rem;
    }
    
    .stats-table td:nth-child(n+18) .info-btn {
        position: absolute;
        right: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: rgba(63, 243, 132, 0.2);
        border: 1px solid #3FF384;
        color: #3FF384;
        font-size: 12px;
        line-height: 18px;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .stats-table td:nth-child(n+18) .info-btn:hover {
        background: rgba(63, 243, 132, 0.3);
        transform: translateY(-50%) scale(1.1);
    }
}