
/* ELO TABLE ALIGNMENT FIX: Remove left padding for ELO table parent containers */
.ranking-container.tournament-ranking-container:has(.tournament-elo-table) {
    padding-left: 0 !important;
}
.entry-content.wp-block-post-content:has(.tournament-elo-table) {
    padding-left: 0 !important;
}
/* Fallback for browsers without :has() support */
.ranking-container.tournament-ranking-container .tournament-elo-table {
    /* If needed, force parent to zero padding */
    padding-left: 0 !important;
}
.entry-content.wp-block-post-content .tournament-elo-table {
    /* If needed, force parent to zero padding */
    padding-left: 0 !important;
}
/* Responsive: Zet corporation-select op een nieuwe regel bij kleine schermen (enkel 1 select, altijd zichtbaar) */
@media screen and (max-width: 600px) {
  .form-container .corporation-responsive {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-bottom: 8px;
  }
  .form-container .corporation-label {
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.95em;
  }
  .rang-label {
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.95em;
  }
  .vp-label {
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.95em;
  }


  .form-container .corporation-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}
@media screen and (max-width: 480px) {
  .tournament-links {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .tournament-links a,
  .external-link-btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    display: block !important;
  }
}
@media screen and (max-width: 480px) {
  .external-link-btn {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
}
@media screen and (max-width: 480px) {
  .hide-on-mobile {
    display: none !important;
  }
}
@media screen and (max-width: 480px) {
  .tournament-links {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }
  .tournament-links a {
    width: 100% !important;
    text-align: center !important;
  }
}
/* Responsive: Zet datum-badge bovenaan bij smalle schermen */
@media screen and (max-width: 480px) {
  .responsive-tournament-info {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .responsive-tournament-info .tournament-date-badge {
    min-width: 0 !important;
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #e5e5e5 !important;
    border-radius: 0 !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    padding: 12px 10px 12px 10px !important;
    gap: 16px;
  }
  .responsive-tournament-info .tournament-date-day,
  .responsive-tournament-info .tournament-date-month {
    margin-bottom: 0 !important;
    margin-right: 8px;
    font-size: 1.2em !important;
  }
  .responsive-tournament-info .spots-left {
    margin-top: 0 !important;
    margin-left: auto;
    font-size: 0.95em !important;
  }
  .responsive-tournament-info .tournament-maininfo {
    padding: 14px 10px 14px 10px !important;
  }
}
.corporation-select option {
    min-height: 40px !important;
    font-size: 16px !important;
    line-height: 40px !important;
}
.corp-option-hidden-text {
    color: transparent !important;
    text-shadow: none !important;
    font-size: 16px !important;
    min-height: 40px !important;
}
.form-field, .player-fields, .player-card {
    overflow: visible !important;
    min-height: 48px !important;
}

.corporation-select {
    display: block !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    vertical-align: middle !important;
}
/* Forceer vaste hoogte voor corporation-select, ook bij kleine schermen */
.corporation-select {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    box-sizing: border-box !important;
    min-width: 120px;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #fff;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    /* Optioneel: custom arrow */
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23444" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 24px 24px;
}
/* Player tournaments table styling */
.player-tournaments table {
    border-collapse: collapse;
    width: 100%;
}

.root {
    --color1: #f17956;
    --color2: #ec583c;
}


.player-tournaments th, .player-tournaments td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.player-tournaments th {
    background-color: #f4f4f4;
}

.player-tournaments .tournament-cell {
    vertical-align: top;
    border-right: 2px solid #333;
}

.player-tournaments .tournament-separator {
    border-bottom: 3px solid #333;
}

.player-tournaments tr:nth-child(even) {
    background-color: #f9f9f9;
}

.player-tournaments tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Existing ranking container styles - ALLEEN VOOR BACKEND */
body.wp-admin .ranking-container table thead {
    position: sticky;
    top: 32px; /* Account for WordPress admin bar (32px) */
    background-color: white; /* Ensures the header has a background */
    z-index: 10; /* Keeps the header above other elements */
}

/* Adjust for when admin bar is present - ALLEEN BACKEND */
body.wp-admin.admin-bar .ranking-container table thead {
    top: 46px; /* WordPress admin bar height on desktop */
}

/* Adjust for mobile admin bar - ALLEEN BACKEND */
@media screen and (max-width: 782px) {
    body.wp-admin.admin-bar .ranking-container table thead {
        top: 46px; /* WordPress admin bar height on mobile */
    }
}

/* Frontend - geen sticky header */
body:not(.wp-admin) .ranking-container table thead {
    position: static;
    top: auto;
}
.progress {
    width: 100%;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 5px;
    background-color: #4caf50; /* Default color (green) */
    position: absolute;
    top: 0;
    left: 0;
}

.progress-bar.rare {
    background-color: #2196f3; /* Blue for rare achievements */
}

.progress-bar.common {
    background-color: #ff9800; /* Orange for common achievements */
}

.progress-bar.frequent {
    background-color: #f44336; /* Red for frequent achievements */
}

.progress-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-weight: bold;
    font-size: 12px;
    /* z-index: 100; */
    white-space: nowrap;
    pointer-events: none;
}

.achievement-item {
    position: relative;
    display: inline-block;
    width: 50px; /* Size of the trophy */
    height: 50px; /* Size of the trophy */
    background-color: #fff;  /* Optional: For visual reference */
    border-radius: 50%;  /* Optional: If you want a circular placeholder */
    /* z-index: 100; */
}
.achievement-symbol { /* the placeholder */
    position: absolute;
    top: 0;
    left: 0;
    width: 50px; /* Size of the trophy */
    height: 50px; /* Size of the trophy */
    background-color: transparent;
    z-index: 0;
    background-size: cover;
}

.small-text {
    font-size: 12px;
}

.achievement-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; /* Adjust size of the icon inside the trophy */
    height: 40px; /* Adjust size of the icon inside the trophy */
    cursor: pointer;
    z-index: 1; /* Positief zodat icons zichtbaar zijn */
    display: block !important; /* Force display */
    visibility: visible !important; /* Force visibility */
}


.ranking-container tr {
    border-bottom: 1px solid #ddd;
}

.ranking-container th, .ranking-container td {
    text-align: center; /* Align all columns to center */
}

@media screen and (max-width: 768px) {
    .ranking-container table {
        font-size: 14px;
    }
    .ranking-container th, .ranking-container td {
        padding: 6px;
    }
}

.platinum {
    background-image: url("assets/img/tournament_platinum.png");
}

.gold {
    background-image: url("assets/img/tournament_gold.png");
}

.silver {
    background-image: url("assets/img/tournament_silver.png");
}

.bronze {
    background-image: url("assets/img/tournament_bronze.png");
}


.tooltip {
    visibility: hidden;
    width: 360px;
    max-width: 360px;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    white-space: normal;
    word-wrap: break-word;
}

/* Arrow for tooltip */
.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
    z-index: 501;
}


.tooltip-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.tooltip-content div {
    flex: 1;
}

.tooltip-content strong {
    font-size: 16px;
    display: block;
    margin-bottom: 8px;
}

.tooltip-content p {
    margin: 4px 0;
    line-height: 1.4;
}

.enlarged-trophy {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
}
    

.achievement-item:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.tooltip img {
    width: 100px; /* Adjust size for the enlarged version */
    height: 100px; /* Adjust size for the enlarged version */
    margin-bottom: 10px; /* Space between the image and the description */
}

.tournament-ranking-container td .achievement-item .tooltip {
    position: absolute !important;
    bottom: 75% !important; /* Position above the achievement */
    left: 75% !important;
    transform: translateX(-50%) !important;
    margin-bottom: 10px !important; /* Space between the tooltip and the achievement */
    z-index: 99999 !important;
    padding: 12px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
    transition: opacity 0.3s ease-in-out !important;
    pointer-events: none !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}
.tournament-ranking-container tbody tr:nth-child(1) .achievement-item .tooltip,
.tournament-ranking-container tbody tr:nth-child(2) .achievement-item .tooltip {
    bottom: -200% !important; /* Lower the tooltip position */
}


.form-container {
    display: flex;
    justify-content: center; /* Centers horizontally */
    overflow-x: auto; /* Enables horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for mobile devices */
    position: relative;
    overflow: visible;
}

.form-container table {
    width: 100%;
    border-collapse: collapse;
    position: relative;
}

.form-container th, .form-container td {
    text-align: left;
    padding: 8px;
}


@media screen and (max-width: 600px) {
  /* Spelernaam in match management tabel: groter, gecentreerd, opvallende kleur alleen op small screens */
  .form-container td:first-child {
    text-align: center !important;
    font-size: 1.25em;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(90deg, #f17956 0%, #ec583c 100%);
    border-radius: 8px;
    letter-spacing: 0.5px;
  }
}

.form-container th {
    background-color: #f4f4f4;
    position: sticky;
    top: 0;
    z-index: 10;
}

.form-container tr {
    border-bottom: 1px solid #ddd;
}

@media screen and (max-width: 768px) {
    .form-container table {
        font-size: 14px;
    }
    .form-container th, .form-container td {
        padding: 6px;
    }
}
.tournaments-container { margin: 20px 0; }
.tournament-list { list-style: none; padding: 0; }
.tournament-item { 
    border: 1px solid #ddd; 
    margin: 10px 0; 
    padding: 15px; 
    border-radius: 5px; 
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tournament-item.past { background: #f0f0f0; }
.tournament-info { flex: 1; }
.tournament-actions { 
    display: flex;
    flex-direction: column;
    gap: 10px; /* Adds spacing between buttons */
    align-items: flex-end;
    min-width: 200px;
}
.tournament-actions form {
    margin: 0;
}
.tournament-actions > div {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}
.tournament-date { color: #666; font-size: 0.9em; }
.view-assignments-link, .view-results-link { 
    color: #0073aa; 
    text-decoration: none; 
    font-size: 0.9em;
}
.view-assignments-link:hover, .view-results-link:hover { text-decoration: underline; }
.join-tournament-button, .cancel-tournament-button, .rejoin-tournament-button, .edit-game-button {
    padding: 8px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
}
.join-tournament-button { background: #0073aa; color: white; }
.cancel-tournament-button { background: #d63638; color: white; }
.rejoin-tournament-button { background: #00a32a; color: white; }
.edit-game-button { background: #f0ad4e; color: white; }
.registration-status {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 3px;
}
.registration-status.registered { background: #d1e7dd; color: #0f5132; }
.registration-status.cancelled { background: #f8d7da; color: #721c24; }
.brings-game-info {
    font-size: 0.8em;
    color: #0073aa;
    margin-left: 10px;
    font-style: italic;
}
.future-tournaments h3 { color: #0073aa; }
.past-tournaments h3 { color: #666; }
#toggle-indicator { font-size: 0.8em; }
.external-note {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}
.tournament-links a {
    flex: 0 1 auto; /* Prevent buttons from stretching */
    padding: 8px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    text-align: center;
    background: #0073aa;
    color: white;
    text-decoration: none;
}
.tournament-links a:hover {
    background: #005a8c;
}


/* Payment Status Styling */
.payment-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin: 2px 0;
}

.payment-status.paid {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.payment-status.unpaid {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Registration Status Styling */
.registration-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin: 2px 0;
}

.registration-status.registered {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.registration-status.cancelled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tournament Actions Styling */
.tournament-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.brings-game-info {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 768px) {
    .tournament-actions {
        align-items: flex-start;
    }
    
    .payment-status, .registration-status {
        font-size: 11px;
        padding: 1px 4px;
    }
}


/* Tournament header styling */
.tournament-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tournament-header h2 {
    color: #0073aa;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Tournament results title styling - simpel breedte fix */
.tournament-results-title {
    width: 100%;
    box-sizing: border-box;
}

/* Frontend ranking tables - Mooie, moderne styling ALLEEN VOOR FRONTEND */
body:not(.wp-admin) .ranking-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border: 1px solid #e1e5e9;
}

body:not(.wp-admin) .ranking-container table thead th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 16px 12px;
    text-align: center;
    border: none;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
}

body:not(.wp-admin) .ranking-container table thead th:first-child {
    border-top-left-radius: 12px;
}

body:not(.wp-admin) .ranking-container table thead th:last-child {
    border-top-right-radius: 12px;
}

body:not(.wp-admin) .ranking-container table tbody td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

body:not(.wp-admin) .ranking-container table tbody tr:nth-child(even) {
    background: linear-gradient(135deg, #f8fafb 0%, #f1f3f4 100%);
}

body:not(.wp-admin) .ranking-container table tbody tr:nth-child(odd) {
    background: white;
}

body:not(.wp-admin) .ranking-container table tbody tr:hover {
    background: linear-gradient(135deg, #e8f4fd 0%, #dbeafe 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

/* Backend - geen hover effecten - alle mogelijke selectors */
body.wp-admin .ranking-container table tbody tr:hover,
body.wp-admin .ranking-container table tbody tr:hover td,
body.wp-admin .wp-list-table tbody tr:hover,
body.wp-admin .wp-list-table tbody tr:hover td,
body.wp-admin .wp-list-table.striped tbody tr:hover,
body.wp-admin .wp-list-table.striped tbody tr:hover td,
body.wp-admin .wp-list-table.fixed tbody tr:hover,
body.wp-admin .wp-list-table.fixed tbody tr:hover td,
body.wp-admin .wp-list-table.widefat tbody tr:hover,
body.wp-admin .wp-list-table.widefat tbody tr:hover td,
body.wp-admin table tbody tr:hover,
body.wp-admin table tbody tr:hover td,
body.wp-admin table.sortable tbody tr:hover,
body.wp-admin table.sortable tbody tr:hover td {
    background: inherit !important;
    background-color: inherit !important;
    color: inherit !important;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
    transition: none !important;
    opacity: 1 !important;
}

/* Goud, zilver, brons highlighting voor top 3 - ALLEEN FRONTEND - NIET voor ELO ranking (tournament_ranking) */
.ranking-container.medals table tbody tr:nth-child(1) {
    background: linear-gradient(135deg, #ffd700 20%, #ffed4e 100%) !important;
    color: #8b4513  !important;
    font-weight: 700  !important;
}

.ranking-container.medals table tbody tr:nth-child(2) {
    background: linear-gradient(135deg, #c0c0c0 20%, #e5e5e5 100%)  !important;
    color: #555  !important;
    font-weight: 600  !important;
}

.ranking-container.medals table tbody tr:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32 20%, #daa520 100%)  !important;
    color: #654321  !important;
    font-weight: 600  !important;
}



/* Achievement icons container - ALLEEN FRONTEND */
body:not(.wp-admin) .ranking-container table tbody td:last-child {
    padding: 12px 8px;
}

/* Mobile specific improvements - ALLEEN FRONTEND */
@media screen and (max-width: 768px) {
    body:not(.wp-admin) .ranking-container table thead th {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    body:not(.wp-admin) .ranking-container table tbody td {
        padding: 10px 6px;
        font-size: 12px;
    }
    

}

/* Specifieke styling voor ELO ranking tabel (tournament_ranking shortcode) */
.tournament-ranking-container table {
        table-layout: auto; /* Keep alignment fix */
}

/* Reset voor tabel in ELO ranking container - specifiek voor frontend */
body:not(.wp-admin) .tournament-ranking-container table {
        display: table !important; /* Keep alignment fix */
}

/* Ensure WordPress table classes don't interfere with ELO ranking */
body:not(.wp-admin) .tournament-ranking-container .wp-list-table.widefat.fixed.striped {
        display: table !important; /* Keep alignment fix */
}


.tournament-ranking-container th.col-achievements,
.tournament-ranking-container td.col-achievements {
        padding: 12px 8px; /* Keep padding for alignment */
}

th[data-col="achievements"], td[data-col="achievements"] {
    min-width: 320px;
    width: 350px;

}

/* NORMALE CONTAINER VOOR ELO RANKING - GECENTREERD */
.tournament-ranking-container {
        display: block !important; /* Keep display for alignment */
}

/* ELO ranking container centrering - eenvoudiger approach */
body:not(.wp-admin) .tournament-ranking-container {
        text-align: center !important; /* Keep text alignment */
}

/* ELO ranking tabel - zorgt ervoor dat de tabel zichzelf centreert */
body:not(.wp-admin) .tournament-ranking-container .wp-list-table {
        display: table !important; /* Keep display for alignment */
}

/* ELO ranking tabel cellen - behoud center alignment */
body:not(.wp-admin) .tournament-ranking-container table th,
body:not(.wp-admin) .tournament-ranking-container table td {
        text-align: center !important; /* Keep text alignment */
}

/* Mobile responsive voor ELO ranking tabel */
@media screen and (max-width: 768px) {
    .tournament-ranking-container table {
            /* Keep responsive behavior */
    }
    
    .tournament-ranking-container table th:nth-child(3),
    .tournament-ranking-container table td:nth-child(3) {
        width: 120px; /* Kleinere speler naam kolom op mobile */
        min-width: 120px;
    }
    
    
}

/* Sticky header voor ELO ranking tabel - FRONTEND */
body:not(.wp-admin) .tournament-ranking-container table thead {
        position: sticky !important; /* Keep sticky header */
}

/* Player Profile Container */
.player-profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    background: linear-gradient(135deg, var(--color1) 0%, var(--color2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Player Profile Statistics Cards */
.player-stats-container {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, var(--color1) 0%, var(--color2) 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 5px solid;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
}

.stat-content h3 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
    font-weight: 500;
}

/* Individual card colors */
.elo-card {
    border-left-color: #764ba2;
}

.ranking-card {
    border-left-color: #f093fb;
}

.points-card {
    border-left-color: #4facfe;
}

.score-card {
    border-left-color: #43e97b;
}

.games-card {
    border-left-color: #fa709a;
}

.winrate-card {
    border-left-color: #ffecd2;
}

/* Responsive design for mobile */
@media screen and (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .player-stats-container {
        margin: 20px 0;
        padding: 15px;
    }
}

/* Achievement section styling improvements */
.player-achievements {
    margin: 30px 0;
}

.player-achievements h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color1);
}

/* Tournament matches section improvements */
.player-tournaments h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color1);
}

/* Section cards styling */
.section-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.section-card h2 {
    color: #333;
    font-size: 1.6rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color1);
    display: flex;
    align-items: center;
    gap: 10px;
}


.section-card h2 i {
    font-size: 1.4rem;
}

/* Achievements section improvements */
.achievements-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.no-achievements {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Tournament table improvements */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.tournaments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tournaments-table th {
    background: linear-gradient(135deg, var(--color1) 0%, var(--color2) 100%);
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    border: none;
}

.tournaments-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.tournaments-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.tournaments-table tr:hover {
    background-color: #e3f2fd;
}

.tournaments-table a {
    color: var(--color1);
    text-decoration: none;
    font-weight: 500;
}

.tournaments-table a:hover {
    color: var(--color2);
    text-decoration: underline;
}

.tournament-cell {
    border-right: 2px solid var(--color1) !important;
    background-color: #f0f4ff !important;
    font-weight: 600;
}

.tournament-separator {
    border-bottom: 3px solid var(--color1) !important;
}

/* MATCH MANAGEMENT PAGE STYLING */
/* Match Management Card Layout */
.match-container {
    background: white;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.match-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.match-header {
    background: linear-gradient(135deg, var(--color1) 0%, var(--color2) 100%);
    padding: 20px 25px;
    color: white;
    position: relative;
}

.match-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.match-completed {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
}

.match-form {
    padding: 25px;
}

/* Players Grid Layout */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.player-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.player-card:hover {
    border-color: var(--color1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(241, 121, 86, 0.15);
}

.player-card.locked {
    opacity: 0.7;
    background: #f1f3f4;
}

.player-card.locked:hover {
    transform: none;
    border-color: #e9ecef;
    box-shadow: none;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dee2e6;
}

.player-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    background: linear-gradient(135deg, var(--color1) 0%, var(--color2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.player-achievements {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.player-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Form Fields Styling */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.score-input,
.corporation-select,
.generation-input {
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.score-input:focus,
.corporation-select:focus,
.generation-input:focus {
    outline: none;
    border-color: var(--color1);
    box-shadow: 0 0 0 3px rgba(241, 121, 86, 0.1);
}

.score-input:disabled,
.corporation-select:disabled,
.generation-input:disabled {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.ranking-display {
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--color1) 0%, var(--color2) 100%);
    color: white;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Match Controls */
.match-controls {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    margin-top: 20px;
}

.generation-field {
    flex: 1;
    max-width: 200px;
}

.submit-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--color1) 0%, var(--color2) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--color2) 0%, #d64528 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(241, 121, 86, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Responsive Design for Match Management */
@media screen and (max-width: 768px) {
    .players-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .match-container {
        margin: 20px 0;
    }
    
    .match-header {
        padding: 15px 20px;
    }
    
    .match-title {
        font-size: 1.3rem;
    }
    
    .match-form {
        padding: 20px;
    }
    
    .player-card {
        padding: 15px;
    }
    
    .player-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .match-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .generation-field {
        max-width: none;
    }
    
    .submit-btn {
        width: 100%;
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .match-header {
        padding: 12px 15px;
    }
    
    .match-title {
        font-size: 1.2rem;
    }
    
    .match-form {
        padding: 15px;
    }
    
    .player-card {
        padding: 12px;
    }
    
    .score-input,
    .corporation-select,
    .generation-input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .ranking-display {
        padding: 10px 12px;
        font-size: 1rem;
    }
    
    .submit-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Special styling for locked matches */
.match-container.locked {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.match-container.locked .match-header {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.match-container.locked .player-card {
    background: #e9ecef;
    border-color: #ced4da;
}

.match-container.locked .ranking-display {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

/* Achievement icons in match management */
.player-achievements .achievement-item {
    width: 35px;
    height: 35px;
}

.player-achievements .achievement-symbol {
    width: 35px;
    height: 35px;
}

.player-achievements .achievement-icon {
    width: 28px;
    height: 28px;
}

/* Corporation select styling improvements */
.corporation-select option {
    padding: 8px;
}

/* Loading states */
.match-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.submit-btn.loading {
    background: linear-gradient(135deg, #adb5bd 0%, #868e96 100%);
    cursor: not-allowed;
}

.submit-btn.loading::after {
    content: " ⏳";
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

