/* =============================================================================
   SOKKOPINGIS-CUP STYLESHEET
   Sports League Website CSS - Organized and Optimized
   ============================================================================= */

/* -----------------------------------------------------------------------------
   BASE STYLES
   ----------------------------------------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* -----------------------------------------------------------------------------
   LAYOUT CONTAINERS
   ----------------------------------------------------------------------------- */

/* Main containers with better centering and space usage */
.container {
    max-width: 1000px; /* Reduced from 1200px for better centering */
    margin: 0 auto;
    padding: 20px;
}

.athlete-stats-container {
    max-width: 1100px; /* Reduced from 1400px */
    margin: 0 auto;
    padding: 20px;
}

.stats-page-container {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* Standings container with centering */
.standings-container {
    background: white;
    overflow: hidden;
    margin: 0 auto; /* Center the container */
    max-width: 1000px; /* Add max-width for better centering */
    padding: 0; /* Remove default padding, let inner elements handle it */
}

/* -----------------------------------------------------------------------------
   HEADER STYLING
   ----------------------------------------------------------------------------- */

.header {
    text-align: center;
    margin-bottom: 25px; /* Reduced from 30px */
    padding: 25px 20px;
    background-color: #f5f5f5;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1em;
}

.standings-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 25px 30px; /* Slightly more padding for better proportions */
    text-align: center;
}

.standings-header h1,
.standings-header h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
}

/* -----------------------------------------------------------------------------
   NAVIGATION AND CONTROLS
   ----------------------------------------------------------------------------- */

.controls {
    display: flex;
    flex-direction: column;
    gap: 18px; /* Slightly increased from 15px */
    align-items: center;
    padding: 0 20px; /* Add horizontal padding */
}

.view-toggle {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.view-toggle button {
    background: #2980b9;
    color: white;
    border: 1px solid #ddd;
    padding: 8px 16px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
    min-width: 140px; /* Consistent button widths */
    text-align: center;
}

.view-toggle button:focus {
    outline: 2px solid #f39c12;
    outline-offset: 2px;
}

.view-toggle button.active {
    background: #1a5490;
}

.view-toggle button:hover {
    background: #1a5490;
}

/* Season Selector */
.season-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.season-selector label {
    font-weight: bold;
    font-size: 1.1em;
}

.season-selector select {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 1em;
    min-width: 120px;
}

.season-selector select:focus {
    outline: 2px solid #3498db;
    outline-offset: 0px;
}

.drop-lowest-toggle {
    border: none;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* -----------------------------------------------------------------------------
   INDEX PAGE NAVIGATION
   ----------------------------------------------------------------------------- */

.index-navigation {
    display: grid;
    gap: 8px;
    margin-top: 0;
    padding: 30px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.index-link-container {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #4a6174;
    height: 70px; /* Fixed height similar to sarja headers */
}

.index-link-container:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #3d566e, #34495e);
    transform: translateY(-1px);
}

.index-link {
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    text-align: center;
}

.index-link:hover, 
.index-link:focus {
    border-left-color: #f39c12;
    outline: 2px solid #f39c12;
    outline-offset: 2px;
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.index-link h2 {
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    margin: 0 0 4px 0;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.index-link p {
    color: #bdc3c7;
    font-size: 0.9em;
    margin: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
    font-weight: normal;
}

.index-link:hover h2,
.index-link:focus h2 {
    color: #f39c12;
}

.index-link:hover p,
.index-link:focus p {
    color: #ecf0f1;
}

/* Arrow positioning for index links */
.index-link::after {
    content: '→';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3em;
    color: #3498db;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.index-link:hover::after,
.index-link:focus::after {
    color: #f39c12;
    transform: translateY(-50%) translateX(3px);
    opacity: 1;
}

/* -----------------------------------------------------------------------------
   SIMPLE VIEW STYLING
   ----------------------------------------------------------------------------- */

.simple-list {
    padding: 20px 30px; /* More side padding */
    max-width: 900px;
    margin: 0 auto;
}

.simple-sarja {
    margin-bottom: 25px; /* Slightly more spacing */
    background: white;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    border-radius: 6px; /* Subtle rounding */
}

.simple-sarja h3 {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    padding: 18px 25px; /* Better proportioned padding */
    font-size: 1.3em; /* Slightly smaller for better proportion */
    font-weight: bold;
    margin: 0;
    border-bottom: 2px solid #2c3e50;
    text-align: center; /* Center the sarja titles */
}

.simple-sarja ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.simple-athlete {
    padding: 12px 20px;
    margin: 0;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    border-bottom: 1px solid #e9ecef;
    font-size: 1em;
    line-height: 1.4;
    color: #333;
    transition: background-color 0.2s ease;
}

.simple-athlete:hover {
    background: #e8f4fd;
}

.simple-athlete:focus {
    outline: 2px solid #f39c12;
    outline-offset: 2px;
}

.simple-athlete.top-3 {
    font-weight: bold;
    background: #e3f2fd;
    border-left-color: #f39c12;
}

.simple-athlete:last-child {
    border-bottom: none;
}

/* -----------------------------------------------------------------------------
   TABLE STYLING
   ----------------------------------------------------------------------------- */

/* Tables section with proper margins */
#standings-tables,
#standings-simple {
    margin: 0 auto;
    max-width: 950px; /* Slightly narrower than container for better readability */
    padding: 20px;
}

#standings-tables table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #bdc3c7;
    background: white;
}

#standings-tables th {
    background-color: #34495e;
    color: white;
    padding: 12px 10px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #2c3e50;
    border-right: 1px solid #4a6174;
    font-size: 0.95em;
}

#standings-tables th:last-child {
    border-right: none;
}

#standings-tables th:first-child {
    width: 50px;
    text-align: center;
}

#standings-tables th:nth-child(2) {
    width: 45%;
}

#standings-tables th:nth-child(3) {
    width: 15%;
    text-align: center;
}

#standings-tables th:nth-child(4) {
    width: 15%;
    text-align: center;
}

#standings-tables th:nth-child(5) {
    width: 15%;
    text-align: center;
}

#standings-tables th:nth-child(6) {
    width: 10%;
    text-align: center;
}

#standings-tables td {
    padding: 10px;
    border-bottom: 1px solid #bdc3c7;
    border-right: 1px solid #bdc3c7;
}

#standings-tables td:last-child {
    border-right: none;
}

#standings-tables tbody tr {
    background-color: #f8f9fa;
}

#standings-tables tbody tr:nth-child(even) {
    background-color: #ffffff;
}

#standings-tables tr:hover {
    background-color: #e8f4fd;
}

#standings-tables table:focus-within {
    outline: 2px solid #f39c12;
    outline-offset: 2px;
}

/* Section styling for dynamically generated tables */
#standings-tables section {
    margin-bottom: 25px; /* Consistent with simple view */
    background: white;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 6px; /* Subtle rounding */
}

#standings-tables section:last-child {
    margin-bottom: 0;
}

#standings-tables h3 {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    padding: 18px 25px;
    font-size: 1.3em;
    font-weight: bold;
    margin: 0;
    border-bottom: 2px solid #2c3e50;
    text-align: center;
}

/* Table Content Styling */
#standings-tables .position {
    text-align: center;
    font-weight: bold;
    color: #333;
}

#standings-tables .name {
    font-weight: 600;
    color: #2c3e50;
}

#standings-tables .club {
    color: #7f8c8d;
    font-size: 0.9em;
    font-weight: normal;
}

#standings-tables .points {
    text-align: center;
    font-weight: bold;
    color: #333;
    font-size: 1em;
}

#standings-tables .first-places {
    text-align: center;
    color: #333;
    font-weight: normal;
}

#standings-tables .best-placement {
    text-align: center;
    color: #333;
    font-weight: normal;
}

#standings-tables .tournaments-count {
    text-align: center;
    color: #333;
    font-weight: normal;
}

/* Top 3 highlighting */
#standings-tables tbody tr:nth-child(-n+3) {
    background-color: #e3f2fd;
}

#standings-tables tbody tr:nth-child(-n+3):nth-child(even) {
    background-color: #e3f2fd;
}

#standings-tables tbody tr:nth-child(-n+3):hover {
    background-color: #bbdefb;
}

#standings-tables tbody tr:nth-child(-n+3) .position {
    font-weight: bold;
    color: #2c3e50;
}

#standings-tables tbody tr:nth-child(-n+3) .name {
    font-weight: bold;
}

/* -----------------------------------------------------------------------------
   FILTERS AND FORMS
   ----------------------------------------------------------------------------- */

.filters {
    background: #f8fafc;
    padding: 25px 30px; /* Better side padding */
    border-bottom: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Slightly wider minimum */
    gap: 25px; /* More spacing */
    max-width: 950px;
    margin: 0 auto;
}

.filter-group {
    display: flex;
    flex-direction: column;
    border: none;
}

.filter-group-tickbox {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    border: none;
}

.filter-group label {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1em;
}

.filter-group input,
.filter-group select {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px;
    font-size: 1em;
    transition: all 0.2s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: 2px solid #3498db;
    outline-offset: 0px;
}

.quick-filters {
    grid-column: 1/-1;
    margin-top: 15px;
}

.quick-filters-label {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1em;
}

.quick-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.quick-filter-btn {
    background: #2980b9;
    color: white;
    border: 1px solid #ddd;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
    min-width: 140px; /* Consistent button widths */
    text-align: center;
}

.quick-filter-btn:focus {
    outline: 2px solid #f39c12;
    outline-offset: 2px;
}

.quick-filter-btn.active {
    background: #1a5490;
}

.quick-filter-btn:hover {
    background: #1a5490;
}

.clear-filters {
    background: #e67e22;
    color: white;
    border: 1px solid #ddd;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

.clear-filters:hover {
    background: #d35400;
}

.clear-filters:focus {
    outline: 2px solid #f39c12;
    outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
   STATISTICS TABLES
   ----------------------------------------------------------------------------- */

.stats-table-container {
    background: white;
    overflow: hidden;
    max-width: 950px;
    margin: 20px auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.stats-table-container table,
.stats-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    background: white;
}

.stats-table-container th,
.stats-table th {
    background-color: #34495e;
    color: white;
    padding: 12px 10px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #2c3e50;
    border-right: 1px solid #4a6174;
    font-size: 0.95em;
}

.stats-table-container th:last-child,
.stats-table th:last-child {
    border-right: none;
}

.stats-table-container td,
.stats-table td {
    padding: 10px;
    border-bottom: 1px solid #bdc3c7;
    border-right: 1px solid #bdc3c7;
}

.stats-table-container td:last-child,
.stats-table td:last-child {
    border-right: none;
}

.stats-table-container tbody tr,
.stats-table tbody tr {
    background-color: #f8f9fa;
}

.stats-table-container tbody tr:nth-child(even),
.stats-table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.stats-table-container tr:hover,
.stats-table tr:hover {
    background-color: #e8f4fd;
}

.stats-table-container table:focus-within,
.stats-table:focus-within {
    outline: 2px solid #f39c12;
    outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
   STATISTICS CONTENT STYLING
   ----------------------------------------------------------------------------- */

.sarja-badge {

    padding: 3px 8px;
    font-size: 0.85em;
    font-weight: bold;
    text-align: center;
}

.era-voitot {
    text-align: center;
    font-weight: bold;
    color: #27ae60;
}

.era-prosentti {
    text-align: center;
    font-weight: bold;
    color: #8e44ad;
}

.percentage {
    font-weight: 600;
    text-align: center;
}

.percentage.high,
.percentage-high {
    color: #27ae60;
    background-color: #d5f4e6;
    padding: 2px 6px;
}

.percentage.low,
.percentage-low {
    color: #e74c3c;
    background-color: #fadbd8;
    padding: 2px 6px;
}

.ottelut-tot {
    text-align: center;
    color: #333;
}

.current-result {
    font-weight: bold;
}

.current-result-table {
    font-weight: bold;
}

.previous-result {
    font-style: italic;
    font-weight: normal;
}

.previous-result-table {
    font-style: italic;
    font-weight: normal;
}

/* -----------------------------------------------------------------------------
   TEXT CARDS
   ----------------------------------------------------------------------------- */

.text-card {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #3498db;
}

.text-card:hover {
    background-color: #f8f9fa;
}

.player-name-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.player-details {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.detail-item {
    font-size: 0.9em;
    color: #666;
}

.detail-value {
    font-weight: 600;
    color: #333;
}

/* -----------------------------------------------------------------------------
   UTILITY CLASSES
   ----------------------------------------------------------------------------- */

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #7f8c8d;
}

.error {
    background-color: #e74c3c;
    color: white;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
}

.last-updated {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 25px;
    padding: 15px;
    border-top: 1px solid #ecf0f1;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -----------------------------------------------------------------------------
   MOBILE RESPONSIVE DESIGN - COMPACT VERSION
   Replaces the mobile sections in your main CSS
   ----------------------------------------------------------------------------- */

/* Tablets - Reduced padding */
@media (max-width: 768px) {
    .container,
    .athlete-stats-container,
    .standings-container {
        padding: 10px; /* Reduced from 15px */
        margin: 0;
    }
    
    .header {
        padding: 10px; /* Reduced from 15px */
        margin-bottom: 15px; /* Reduced from 25px */
    }
    
    .header h1 {
        font-size: 2em;
    }

    .standings-header {
        padding: 15px 10px; /* Reduced horizontal padding */
    }

    .controls {
        flex-direction: column;
        gap: 10px; /* Reduced from 15px */
        padding: 0 5px; /* Reduced from 0 10px */
    }

    .season-selector {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        padding: 5px 10px; /* Reduced padding */
    }

    .view-toggle {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 10px; /* Reduced from 15px */
    }

    .filters {
        grid-template-columns: 1fr;
        gap: 15px; /* Reduced from 20px */
        padding: 15px 10px; /* Reduced padding */
    }

    .quick-filter-buttons {
        justify-content: center;
        gap: 5px; /* Reduced from 10px */
    }

    #standings-tables,
    #standings-simple {
        padding: 10px; /* Reduced from 15px */
    }

    .simple-list {
        padding: 10px; /* Reduced from 15px 20px */
    }

    .simple-sarja {
        margin-bottom: 15px; /* Reduced from 25px */
    }

    .simple-sarja h3,
    #standings-tables h3 {
        padding: 12px 15px; /* Reduced from 15px 20px */
        font-size: 1.2em;
    }

    .simple-athlete {
        padding: 8px 12px; /* Reduced from 10px 15px */
        font-size: 0.95em;
    }

    #standings-tables section {
        margin-bottom: 15px; /* Reduced from 25px */
    }
    
    #standings-tables th,
    #standings-tables td,
    .stats-table-container th,
    .stats-table-container td,
    .stats-table th,
    .stats-table td {
        padding: 5px 3px; /* Reduced from 6px 4px */
        font-size: 0.85em;
    }
    
    #standings-tables th:nth-child(3),
    #standings-tables td:nth-child(3),
    .stats-table-container th:nth-child(3),
    .stats-table-container td:nth-child(3),
    .stats-table th:nth-child(3),
    .stats-table td:nth-child(3) {
        display: none;
    }

    .player-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .text-card {
        padding: 10px; /* Reduced from 15px */
        margin-bottom: 8px; /* Reduced from 10px */
    }

    .last-updated {
        margin-top: 15px; /* Reduced from 25px */
        padding: 10px; /* Reduced from 15px */
    }

    /* Index page responsive - more compact */
    .index-navigation {
        padding: 15px 10px; /* Reduced from 20px 30px */
        gap: 5px; /* Reduced from 6px */
    }
    
    .index-link-container {
        height: 60px; /* Reduced from 65px */
    }
    
    .index-link {
        padding: 8px 12px; /* Reduced from 10px 15px */
    }
    
    .index-link h2 {
        font-size: 1.1em; /* Reduced from 1.2em */
        margin-bottom: 2px; /* Reduced from 3px */
    }
    
    .index-link p {
        font-size: 0.8em; /* Reduced from 0.85em */
    }
    
    .index-link::after {
        right: 12px; /* Reduced from 15px */
        font-size: 1.1em; /* Reduced from 1.2em */
    }
}

/* Mobile phones - Very compact */
@media (max-width: 480px) {
    .container,
    .athlete-stats-container,
    .standings-container {
        padding: 5px; /* Much more compact */
    }

    .header {
        padding: 8px;
        margin-bottom: 10px;
    }

    .standings-header {
        padding: 12px 8px;
    }
    
    .controls {
        gap: 8px;
        padding: 0;
    }

    .season-selector {
        padding: 4px 8px;
    }
    
    #standings-tables,
    #standings-simple,
    .simple-list {
        padding: 8px;
    }

    .simple-sarja {
        margin-bottom: 10px;
    }
    
    .simple-sarja h3,
    #standings-tables h3 {
        padding: 10px 12px;
        font-size: 1.1em;
    }

    .simple-athlete {
        padding: 6px 10px;
        font-size: 0.9em;
    }

    #standings-tables section {
        margin-bottom: 10px;
    }
    
    .filters {
        padding: 10px 8px;
        gap: 12px;
    }

    .quick-filter-buttons {
        gap: 3px;
    }

    #standings-tables th:nth-child(6),
    #standings-tables td:nth-child(6),
    #standings-tables th:nth-child(7),
    #standings-tables td:nth-child(7),
    .stats-table-container th:nth-child(6),
    .stats-table-container td:nth-child(6),
    .stats-table-container th:nth-child(7),
    .stats-table-container td:nth-child(7),
    .stats-table th:nth-child(6),
    .stats-table td:nth-child(6),
    .stats-table th:nth-child(7),
    .stats-table td:nth-child(7) {
        display: none;
    }

    #standings-tables th,
    #standings-tables td,
    .stats-table-container th,
    .stats-table-container td,
    .stats-table th,
    .stats-table td {
        padding: 4px 2px;
        font-size: 0.8em;
    }
    
    .view-toggle button,
    .quick-filter-btn {
        padding: 5px 10px; /* Reduced from 6px 12px */
        font-size: 0.85em; /* Reduced from 0.9em */
        margin: 0 1px; /* Reduced from 0 2px */
    }

    .text-card {
        padding: 8px;
        margin-bottom: 6px;
    }

    .last-updated {
        margin-top: 10px;
        padding: 8px;
        font-size: 0.8em;
    }

    /* Index page mobile - very compact */
    .index-navigation {
        padding: 10px 8px;
        gap: 4px;
    }
    
    .index-link-container {
        height: 55px;
    }
    
    .index-link {
        padding: 6px 10px;
    }
    
    .index-link h2 {
        font-size: 1em;
        margin-bottom: 1px;
    }
    
    .index-link p {
        font-size: 0.75em;
    }
    
    .index-link::after {
        right: 10px;
        font-size: 1em;
    }
}

/* Extra small screens (very small phones) */
@media (max-width: 360px) {
    .container,
    .athlete-stats-container,
    .standings-container {
        padding: 3px;
    }

    .standings-header {
        padding: 10px 5px;
    }

    #standings-tables,
    #standings-simple,
    .simple-list {
        padding: 5px;
    }

    .simple-sarja h3,
    #standings-tables h3 {
        padding: 8px 10px;
        font-size: 1em;
    }

    .simple-athlete {
        padding: 5px 8px;
        font-size: 0.85em;
    }

    .filters {
        padding: 8px 5px;
    }

    .index-navigation {
        padding: 8px 5px;
        gap: 3px;
    }

    .index-link-container {
        height: 50px;
    }

    .index-link {
        padding: 5px 8px;
    }

    .index-link h2 {
        font-size: 0.95em;
    }

    .index-link p {
        font-size: 0.7em;
    }
}
/* -----------------------------------------------------------------------------
   SPECIFIC MOBILE TABLE FIXES FOR VOITETUT_ERAT.HTML
   Add this to your CSS to override the general mobile table hiding
   ----------------------------------------------------------------------------- */

/* For voitetut_erat.html specifically - override the general mobile hiding */
.voitetut-erat-page {
    /* This class should be added to the body or main container of voitetut_erat.html */
}

.voitetut-erat-page @media (max-width: 768px) {
    /* Show Erä % (4th column), hide Ottelu % (5th column) */
    .stats-table-container th:nth-child(4),
    .stats-table-container td:nth-child(4),
    .stats-table th:nth-child(4),
    .stats-table td:nth-child(4) {
        display: table-cell !important;
    }
    
    .stats-table-container th:nth-child(5),
    .stats-table-container td:nth-child(5),
    .stats-table th:nth-child(5),
    .stats-table td:nth-child(5) {
        display: none !important;
    }
    
    /* Adjust remaining column widths for mobile */
    .stats-table-container th:first-child,
    .stats-table th:first-child {
        width: 15%;
    }
    
    .stats-table-container th:nth-child(2),
    .stats-table td:nth-child(2),
    .stats-table th:nth-child(2),
    .stats-table td:nth-child(2) {
        width: 45%;
    }
    
    .stats-table-container th:nth-child(3),
    .stats-table td:nth-child(3),
    .stats-table th:nth-child(3),
    .stats-table td:nth-child(3) {
        width: 20%;
        text-align: center;
    }
    
    .stats-table-container th:nth-child(4),
    .stats-table td:nth-child(4),
    .stats-table th:nth-child(4),
    .stats-table td:nth-child(4) {
        width: 20%;
        text-align: center;
    }
}
