/* styles.css - Complete styling for AQ2 Leaderboard */

/* ===== BASE STYLES ===== */
html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    overflow: auto;
}

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

a {
    text-decoration:none;
    color:inherit;
}

td a {
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}


.container {
    margin: 0 auto;
    padding-top: 10px;
    max-width: 1200px;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    min-width: 0;
}

.scoreboard-container {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 10px;
    padding: 20px 25px;
    margin: 20px auto;
    width: fit-content;
    min-width: 0;
}

/* ===== HEADER STYLES ===== */
header {
    text-align: center;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.3);
    padding-bottom: 10px;
    border-radius: 15px;
    position: relative;
}

h1 {
    font-size: 3em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

h2 {
	color: #ffd700;
	margin-bottom:10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.8;
}

/* ===== NAVIGATION STYLES ===== */
.back-link {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.back-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.week-info {
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.week-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.week-selector > form {
    display: flex;
    align-items: center;
    gap: 15px;
}

.week-selector select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 6px;
    border-radius: 8px;
    font-size: 1em;
    width: fit-content;
}

.week-selector select option {
    background: #2a5298;
    color: white;
}

.week-nav {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.week-nav-disabled {
    background: rgba(255,255,255,0.1);
    border: none;
    color: slategray;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.week-nav:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.week-nav,
.week-nav-disabled {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .week-selector > form {
        width: 100%;
        justify-content: center;
        order: 1;
    }

    .week-selector > a:first-child,
    .week-selector > span:first-child {
        order: 2;
    }

    .week-selector > a:last-child,
    .week-selector > span:last-child {
        order: 3;
    }
}


.nav-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 10px;
    flex-wrap: wrap;
}

.tab {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 12px 24px;
    margin: 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.tab:hover, .tab.active {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* ===== CONTAINER STYLES ===== */
.leaderboard-container, .scoreboard, .section {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.section {
    overflow: visible;
}

.section-light {
    background: rgba(255,255,255,0.05);
}

.controls {
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.controls select, .controls input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
}

.controls select option {
    background: #2a5298;
    color: white;
}

/* ===== TABLE STYLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    overflow: visible;
}

th, td {
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

td {
    padding: 12px 6px; /* Original row height, reduced column spacing */
}

th {
    background: rgba(0,0,0,0.95);
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
    padding: 0;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.table-no-sort th {
    cursor: default;
}

/* Reduce column spacing only */
.leaderboard-container table td {
    padding: 12px 6px; /* Original row height, reduced column spacing */
}

.leaderboard-container table th a {
    padding: 12px 6px; /* Original row height, reduced column spacing */
}

/* Non-sortable headers should not appear clickable */
.leaderboard-container table th:first-child,
.leaderboard-container table th:nth-child(2) {
    cursor: default !important;
    background: rgba(0,0,0,0.95) !important;
    padding: 12px 6px !important; /* Original row height, reduced column spacing */
    vertical-align: middle;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.leaderboard-container table th:first-child:hover,
.leaderboard-container table th:nth-child(2):hover {
    background: rgba(0,0,0,0.95) !important;
    cursor: default !important;
}

/* Sortable headers hover effect */
.leaderboard-container table th:not(:first-child):not(:nth-child(2)):hover {
    background: rgba(255,255,255,0.1);
}

/* Active sort column styling - High specificity to override other styles */
.leaderboard-container table thead tr th.active-sort {
    background: rgba(255, 215, 0, 0.2) !important;
    border-bottom: 2px solid #ffd700 !important;
}

.leaderboard-container table thead tr th.active-sort a {
    color: #ffd700 !important;
    font-weight: bold !important;
}

.leaderboard-container table thead tr th.active-sort:hover {
    background: rgba(255, 215, 0, 0.3) !important;
}

/* Ensure non-active sort columns don't have gold styling */
.leaderboard-container table thead tr th:not(.active-sort) {
    background: rgba(0,0,0,0.95) !important;
}

.leaderboard-container table thead tr th:not(.active-sort) a {
    color: #fff !important;
}

th a {
    color: #fff;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    padding: 12px;
    box-sizing: border-box;
}


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

.player-link {
    color: #4fc3f7;
    text-decoration: none;
    font-weight: bold;
}

.player-link:hover {
    color: #29b6f6;
    text-decoration: underline;
}

.stat-number {
    font-weight: bold;
}

.player-aka {
    display: block;
    font-size: 0.78em;
    opacity: 0.55;
    font-weight: normal;
}

p.search-notice {paddingleft:10px;}

/* ===== STAT COLORS ===== */
#.stat-excellent { color: #4caf50; font-weight: bold; }
#.stat-good { color: #8bc34a; }
#.stat-average { color: #ff9800; }
#.stat-poor { color: #f44336; }

/* Enhanced stat color classes with gold tones */
.stat-legendary { color: #ffd700; /* Gold */ font-weight: bold; text-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
.stat-excellent { color: #2e7d32; }
.stat-good { color: #66bb6a; /* Light green */}
.stat-average { color: #ff9800; /* Orange */ }
.stat-poor { color: #f44336; /* Red */ }

/* ===== AWARD STYLES ===== */
.award-excellent {
    color: #ffd700; /* Gold */
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.award-impressive {
    color: #e91e63; /* Pink/Magenta */
    font-weight: bold;
    text-shadow: 0 0 6px rgba(233, 30, 99, 0.4);
}

.award-accuracy {
    color: #00bcd4; /* Cyan */
    font-weight: bold;
    text-shadow: 0 0 6px rgba(0, 188, 212, 0.4);
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.widget {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 20px;
}

.widget h3 {
    margin-bottom: 15px;
    color: #ffd700;
}

.recent-match {
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.recent-match-header {
    font-weight: bold;
    margin-bottom: 5px;
}

/* ===== MATCH STYLES ===== */
.match-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1.2fr 1fr 1fr 2fr 1.2fr;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    font-weight: bold;

}

.match-title {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.match-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-card {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.info-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #ffd700;
    display: block;
}

.info-label {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 5px;
}

/* ===== TEAM STYLES ===== */
.team-section {
    margin-bottom: 40px;
}

.team-header {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px 10px 0 0;
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
}

.team-red { background: rgba(244, 67, 54, 0.3) !important; }
.team-blue { background: rgba(33, 150, 243, 0.3) !important; }
.team-yellow { background: rgba(255, 193, 7, 0.3) !important; }

.match-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1.2fr 1fr 1fr 2fr 1.2fr;
    gap: 5px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    align-items: center;
    transition: all 0.2s ease;
}

.match-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.match-row:last-child {
    border-bottom: none;
}

.team-winning {
    border-left: 4px solid #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.team-losing {
    border-left: 4px solid #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.team-winning:hover {
    background: rgba(76, 175, 80, 0.15);
}

.team-losing:hover {
    background: rgba(244, 67, 54, 0.15);
}

.text-winning {
    color: #4caf50;
    font-weight: 600;
}

.text-losing {
    color: #f44336;
    font-weight: 600;
}

.players-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.2);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.players-table th,
.players-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.players-table th {
    background: rgba(0,0,0,0.5);
    font-weight: bold;
}

.players-table tr:hover {
    background: rgba(255,255,255,0.1);
}

/* Hover effect for main leaderboard table rows */
.leaderboard-container table tbody tr:hover {
    background: rgba(255,255,255,0.2);
    transition: background-color 0.2s ease;
}

.mvp-crown {
    color: #ffd700;
    float:left;
}

.final-score {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #000;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
}

/* ===== MATCH PAGE: HEADER LAYOUT ===== */
.match-header-inline {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 0;
    padding-bottom: 15px;
}

img.map-screenshot {
    height: 160px;
    width: auto;
    border-radius: 10px;
}

.match-title-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 5px;
    min-height: 160px;
    padding-top: 0;
}

.match-datetime {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin: 0;
}

.match-map-name {
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.scoreboard-title {
    color: #ffd700;
    font-size: 1.4em;
    margin: 0;
    align-self: flex-start;
}

/* ===== MATCH PAGE: SCOREBOARD TABLE ===== */
.scoreboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    overflow: visible;
    table-layout: auto;
}

.scoreboard-table thead {
    background: rgba(0, 0, 0, 0.8);
}

.scoreboard-table thead tr th:first-child {
    width: 0;
    padding: 0;
    border: none;
    background: transparent;
    visibility: hidden;
}

.scoreboard-table thead tr th:nth-child(2) {
    border-top-left-radius: 10px;
}

.scoreboard-table thead tr th:last-child {
    border-top-right-radius: 10px;
}

.scoreboard-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.scoreboard-table tbody tr {
    transition: background-color 0.2s ease;
}

.scoreboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.scoreboard-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.team-separator {
    height: 15px;
    background: transparent;
}

.team-separator td {
    border-bottom: none;
    padding: 0;
}

.scoreboard-table tbody tr:last-child td {
    border-bottom: none;
}

.team-score-cell {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    text-align: center;
    vertical-align: middle;
    font-size: 2.5em;
    font-weight: bold;
    color: #ffffff;
    border-right: 3px solid rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 10px;
}

.scoreboard-table tbody tr:first-child .team-score-cell {
    border-top-left-radius: 10px;
}

.scoreboard-table tbody tr:last-child .team-score-cell {
    border-bottom-left-radius: 10px;
    border-bottom: none;
}

.team-score-red {
    background: rgba(139, 69, 82, 0.9);
}

.team-score-blue {
    background: rgb(42, 67, 131);
}

.team-score-yellow {
    background: rgba(180, 142, 51, 0.9);
}

.team-score-gray {
    background: rgba(100, 100, 100, 0.7);
}

.team-red-row {
    background: rgba(139, 69, 82, 0.2);
}

.team-blue-row {
    background: rgba(52, 73, 94, 0.2);
}

.team-yellow-row {
    background: rgba(180, 142, 51, 0.2);
}

.team-gray-row {
    background: rgba(100, 100, 100, 0.2);
}

.scoreboard-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

/* ===== MATCH PAGE: TEAM FIX BUTTON ===== */
.team-fix-container {
    text-align: center;
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.team-fix-button {
    display: inline-block;
    background: rgba(255, 152, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: 1px solid rgba(255, 152, 0, 0.5);
}

.team-fix-button:hover {
    background: rgba(255, 152, 0, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.team-fix-message {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    animation: slideIn 0.4s ease;
}

.team-fix-message.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4caf50;
}

.team-fix-message.warning {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid rgba(255, 152, 0, 0.5);
    color: #ff9800;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===== PLAYER STYLES ===== */
.player-header {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 0px 20px 5px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.player-name {
    font-size: 3em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.quick-stat {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
	max-width:163 px;
}

.quick-stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #ffd700;
    display: block;
}

.quick-stat-label {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 5px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    max-width: 100%;
}

.weapon-stats-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: transparent;
}

.weapon-stats-table th,
.weapon-stats-table td {
    border-bottom: none;
}

.weapon-stats-table thead th {
    padding: 10px 8px;
    font-weight: bold;
    text-align: center;
    background: rgba(0,0,0,0.5);
}

.weapon-stats-table thead th:first-child {
    text-align: left;
    border-radius: 8px 0 0 8px;
    width: 38%;
}

.weapon-stats-table thead th:last-child {
    border-radius: 0 8px 8px 0;
}

.weapon-stats-table tbody td {
    padding: 10px 8px;
    text-align: center;
}

.weapon-stats-table tbody td:first-child {
    text-align: left;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weapon-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 8px;
    border-radius: 8px;
    align-items: center;
    overflow: visible;
}

.weapon-name {
    font-weight: bold;
}

.weapon-stat {
    text-align: center;
    font-weight: bold;
}

.hit-location-stats {
    display: grid;
    gap: 8px;
    overflow: hidden;
    width: 100%;
}

.hit-location-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 10px 12px;
    border-radius: 8px;
    align-items: center;
    min-width: 0;
}

.hit-location-name {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-icon {
    font-size: 1.2em;
}

.hit-location-stat {
    text-align: center;
    font-weight: bold;
}

.hit-detail {
    font-size: 0.8em;
    opacity: 0.7;
}

.percentage-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 3px;
}

.percentage-fill {
    height: 100%;
    background: linear-gradient(90deg, #f44336, #ff9800, #4caf50);
    transition: width 0.3s;
}

.recent-matches {
    grid-column: 1 / -1;
    max-width: 100%;
}

.matches-grid {
    display: grid;
    gap: 5px;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.matches-grid .match-header {
    display: grid;
    grid-template-columns: 1.4fr 0.5fr 1.1fr 1.1fr 0.7fr 0.8fr 0.7fr 0.7fr 0.6fr 0.6fr 1.3fr;
    gap: 8px;
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 0;
    text-align: left;
    box-sizing: border-box;
}

.match-row {
    display: grid;
    grid-template-columns: 1.4fr 0.5fr 1.1fr 1.1fr 0.7fr 0.8fr 0.7fr 0.7fr 0.6fr 0.6fr 1.3fr;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    align-items: center;
    box-sizing: border-box;
}

.match-row:hover {
    background: rgba(255,255,255,0.2);
}

.match-header-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 0.8fr 0.8fr 0.8fr 0.8fr 1fr;
    gap: 15px;
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-highlight {
    color: #4fc3f7;
    font-weight: bold;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width 0.3s;
}

/* ===== STATS SUMMARY ===== */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 340px) {
    .stats-summary {
        grid-template-columns: 1fr;
    }
}

/* ===== HEADER SEARCH WIDGET ===== */
.header-search-form {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.header-search-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 0.9em;
    width: 125px;
    transition: width 0.3s ease, background 0.2s ease;
    outline: none;
}

.header-search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.header-search-input:focus {
    width: 160px;
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}

.header-search-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
    line-height: 1;
}

.header-search-btn:hover {
    background: rgba(255,255,255,0.5);
}

@media (max-width: 600px) {
    .header-search-form {
        position: static;
        justify-content: center;
        margin: 8px 0 0;
    }

    .header-search-input {
        width: 200px;
    }

    .header-search-input:focus {
        width: 220px;
    }
}

/* ===== HEADER FILTER STYLES ===== */
.header-filters {
    margin-top: 12px;
    padding: 0 10px 10px;
}

.header-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

@media (max-width: 640px) {
    .header-filter-grid {
        grid-template-columns: 1fr;
    }
}

.filter-select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.filter-select:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}

.filter-select:focus {
    outline: none;
    border-color: #4fc3f7;
    box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.2);
}

.filter-select option {
    background: #2a5298;
    color: white;
}


.stat-card {
    background: rgba(255,255,255,0.1);
    padding: 5px;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #ffd700;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 5px;
}

.no-data {
    text-align: center;
    padding: 40px;
    opacity: 0.7;
}

.match-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.summary-section {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 30px;
}

.summary-section h2 {
    color: #ffd700;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer {
    text-align: center;
    opacity: 0.7;
    font-size: 0.9em;
}

.performance-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 3px;
}

.performance-fill {
    height: 100%;
    background: linear-gradient(90deg, #f44336, #ff9800, #4caf50);
    transition: width 0.3s;
}

/* ===== WEAPON ICON MAPPINGS ===== */
.weapon-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

.weapon-mk23::before { content: "Ã°Å¸â€Â«"; }
.weapon-mp5::before { content: "Ã°Å¸â€Â«"; }
.weapon-m4::before { content: "Ã°Å¸â€Â«"; }
.weapon-ak74::before { content: "Ã°Å¸â€Â«"; }
.weapon-sniper::before { content: "Ã°Å¸Å½Â¯"; }
.weapon-shotgun::before { content: "Ã°Å¸â€™Â¥"; }
.weapon-knife::before { content: "Ã°Å¸â€Âª"; }
.weapon-grenade::before { content: "Ã°Å¸â€™Â£"; }
.weapon-kick::before { content: "Ã°Å¸Â¦Âµ"; }

/* Animation keyframes */
@keyframes slideInFromTop {
    0% {
        transform: translateY(-30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-30px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Enhanced table styling */
.enhanced-table {
    position: relative;
    overflow: hidden;
}

.enhanced-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4fc3f7, #29b6f6, #03a9f4);
    z-index: 1;
}

/* Rank badges */
.rank-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    margin-right: 8px;
}

.rank-1 { background: linear-gradient(45deg, #ffd700, #ffb300); color: #000; }
.rank-2 { background: linear-gradient(45deg, #c0c0c0, #9e9e9e); color: #000; }
.rank-3 { background: linear-gradient(45deg, #cd7f32, #8d5524); color: #fff; }
.rank-other { background: rgba(255,255,255,0.1); color: #fff; }

/* Skill level indicators */
.skill-novice { color: #9e9e9e; }
.skill-amateur { color: #2196f3; }
.skill-pro { color: #4caf50; }
.skill-elite { color: #ff9800; }
.skill-legendary { color: #e91e63; }

/* Team color variants */
.team-indicator {
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.team-1-indicator { background: #f44336; }
.team-2-indicator { background: #2196f3; }
.team-3-indicator { background: #ffc107; }

/* Match result indicators */
.match-result-win {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4caf50;
}

.match-result-loss {
    background: rgba(244, 67, 54, 0.1);
    border-left: 4px solid #f44336;
}

.match-result-draw {
    background: rgba(255, 152, 0, 0.1);
    border-left: 4px solid #ff9800;
}

/* Statistics trend indicators */
.trend-up::after {
    content: " Ã¢â€ â€”";
    color: #4caf50;
    font-weight: bold;
}

.trend-down::after {
    content: " Ã¢â€ Ëœ";
    color: #f44336;
    font-weight: bold;
}

.trend-stable::after {
    content: " Ã¢â€ â€™";
    color: #ff9800;
    font-weight: bold;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Enhanced Tooltip styling */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.95);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10000;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 250px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    border: 6px solid transparent;
    border-top-color: rgba(0,0,0,0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10000;
}

/* Alternative tooltip positioning for elements near the top */
.tooltip-bottom::after {
    bottom: auto;
    top: 125%;
    border-top-color: transparent;
    border-bottom-color: rgba(0,0,0,0.95);
}

.tooltip-bottom::before {
    bottom: auto;
    top: 125%;
    transform: translateX(-50%) translateY(-100%);
    border-top-color: transparent;
    border-bottom-color: rgba(0,0,0,0.95);
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
}

/* Tooltip positioning adjustments for table headers */
th.tooltip::after {
    bottom: 130%;
    min-width: 200px;
    white-space: nowrap;
    max-width: none;
    width: max-content;
}

th.tooltip::before {
    bottom: 130%;
}

/* Right-aligned tooltips for headers near the right edge */
.tooltip-right::after {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.tooltip-right::before {
    left: auto;
    right: 20px;
    transform: translateX(0);
}

/* Left-aligned tooltips for headers near the left edge */
.tooltip-left::after {
    left: 0;
    transform: translateX(0);
}

.tooltip-left::before {
    left: 20px;
    transform: translateX(0);
}

/* Responsive grid improvements */
@media (max-width: 1200px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 900px) {
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .match-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .weapon-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 5px;
    }
    
    /* Make table more compact on smaller screens */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    overflow: visible;
}
    
    .leaderboard-container {
        padding: 15px;
    }

    .matches-grid .match-header,
    .matches-grid .match-row {
        grid-template-columns: 1.5fr 1fr 1.2fr;
    }

    .matches-grid .col-hide {
        display: none;
    }

    .matches-grid .match-header > div:last-child,
    .matches-grid .match-row > div:last-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .quick-stats {
		grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
		gap: 10px;
    }
    
    .match-info {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    .section {
        padding: 20px 15px;
    }
}

/* Print styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .back-link,
    .nav-tabs {
        display: none !important;
    }
    
    .section,
    .leaderboard-container {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    body {
        background: #000 !important;
    }
    
    .section,
    .leaderboard-container,
    .widget {
        background: #111 !important;
        border: 2px solid #fff !important;
    }
    
    .tab {
        border: 1px solid #fff !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.tab:focus,
.back-link:focus {
    outline: 2px solid #4fc3f7;
    outline-offset: 2px;
}

.player-link:focus {
    outline: none;
}

/* Removed custom scrollbar styling to use native browser scrollbars */