:root {
    --unsc-blue: #a8d4ff;
    --covenant-purple: #7b2cbf;
    --warning-orange: #ff6d00;
    --shield-blue: #c8e4ff;
    --electric-blue: #7ab8ff;
    --background-dark: #0a0e17;
    --background-medium: #151b2b;
    --background-light: #1f2937;
    --text-primary: #e8f4f8;
    --text-secondary: #8b95a8;
    --grid-color: rgba(168, 212, 255, 0.1);
    --border-color: rgba(168, 212, 255, 0.3);
    --primary-color: #00d9ff;
    --card-bg: #151b2b;
    --text-muted: #6b7280;
    --team-red: #dc143c;
}

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

body {
    font-family: 'Overpass', sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    opacity: 0.3;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    position: relative;
    overflow: visible;
    animation: fadeInDown 0.8s ease-out;
    background: transparent;
}

.logo {
    max-width: 280px;
    height: auto;
    margin: 0 auto 10px;
    display: block;
    background: transparent;
    filter:
        drop-shadow(0 0 8px rgba(77, 184, 255, 0.9))
        drop-shadow(0 0 20px rgba(77, 184, 255, 0.6))
        drop-shadow(0 0 40px rgba(77, 184, 255, 0.4));
}

.header-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    transition: color 0.3s ease, transform 0.2s ease, filter 0.3s ease;
}

.header-icon svg {
    width: 24px;
    height: 24px;
}

.header-icon:hover {
    color: var(--primary-color);
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.6));
}

.subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 3px;
    margin-top: 10px;
}

.search-section {
    margin: 40px 0;
    text-align: center;
}

.search-container {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.search-container-dual {
    display: flex;
    gap: 20px;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-medium);
    border: 2px solid var(--unsc-blue);
    border-top: none;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(168, 212, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Overpass', sans-serif;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.search-result-item:hover {
    background: rgba(168, 212, 255, 0.1);
    border-left: 4px solid var(--unsc-blue);
    padding-left: 16px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-type {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.search-result-name {
    color: var(--unsc-blue);
    font-weight: 600;
}

.search-result-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    background: var(--background-medium);
    border: 2px solid var(--shield-blue);
    color: var(--text-primary);
    font-family: 'Overpass', sans-serif;
    font-size: 18px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--unsc-blue);
    box-shadow: 0 0 20px rgba(168, 212, 255, 0.3);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Main Tab Navigation */
.main-tab-navigation {
    display: flex;
    gap: 20px;
    margin: 40px 0 30px 0;
    border-bottom: 3px solid rgba(168, 212, 255, 0.2);
    justify-content: center;
}

/* Games Header Bar - Recent Games title with controls */
.games-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(0, 217, 255, 0.03);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    gap: 20px;
}

.games-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 1px;
    white-space: nowrap;
}

.main-tab-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    padding: 15px 40px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 4px solid transparent;
    position: relative;
}

.main-tab-btn:hover {
    color: var(--unsc-blue);
    text-shadow: 0 0 10px rgba(168, 212, 255, 0.5);
}

.main-tab-btn.active {
    color: var(--unsc-blue);
    border-bottom-color: var(--unsc-blue);
    text-shadow: 0 0 15px rgba(168, 212, 255, 0.8);
}

.main-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 60px 0 30px 0;
    padding-left: 20px;
    border-left: 4px solid var(--unsc-blue);
    color: var(--shield-blue);
    position: relative;
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Game List */
.game-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-item {
    background: var(--background-medium);
    border: 1px solid rgba(168, 212, 255, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.game-item:hover {
    border-color: var(--shield-blue);
}

.game-header-bar {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: linear-gradient(90deg, rgba(10, 14, 23, 0.92) 0%, rgba(10, 14, 23, 0.75) 50%, rgba(10, 14, 23, 0.92) 100%);
    transition: all 0.3s ease;
    position: relative;
}

.game-header-bar:hover {
    background: linear-gradient(90deg, rgba(168, 212, 255, 0.15) 0%, rgba(10, 14, 23, 0.65) 50%, rgba(168, 212, 255, 0.1) 100%);
}

/* Winner highlighting */
.game-header-bar.winner-blue {
    border-left: 4px solid #3388ff;
    box-shadow: inset 0 0 30px rgba(50, 120, 220, 0.3), 0 0 15px rgba(50, 120, 220, 0.2);
    background: linear-gradient(90deg, rgba(30, 80, 180, 0.4) 0%, rgba(10, 14, 23, 0.75) 50%, rgba(30, 80, 180, 0.2) 100%);
}

.game-header-bar.winner-blue:hover {
    box-shadow: inset 0 0 40px rgba(50, 120, 220, 0.4), 0 0 20px rgba(50, 120, 220, 0.3);
    background: linear-gradient(90deg, rgba(30, 80, 180, 0.5) 0%, rgba(10, 14, 23, 0.65) 50%, rgba(30, 80, 180, 0.3) 100%);
}

.game-header-bar.winner-red {
    border-left: 4px solid #dc143c;
    box-shadow: inset 0 0 30px rgba(220, 20, 60, 0.3), 0 0 15px rgba(220, 20, 60, 0.2);
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.35) 0%, rgba(10, 14, 23, 0.75) 50%, rgba(220, 20, 60, 0.15) 100%);
}

.game-header-bar.winner-red:hover {
    box-shadow: inset 0 0 40px rgba(220, 20, 60, 0.4), 0 0 20px rgba(220, 20, 60, 0.3);
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.45) 0%, rgba(10, 14, 23, 0.65) 50%, rgba(220, 20, 60, 0.25) 100%);
}

.game-header-bar.winner-ffa {
    border-left: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.15), 0 0 15px rgba(255, 255, 255, 0.1);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(10, 14, 23, 0.75) 50%, rgba(255, 255, 255, 0.08) 100%);
}

.game-header-bar.winner-ffa:hover {
    box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.2), 0 0 20px rgba(255, 255, 255, 0.15);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(10, 14, 23, 0.65) 50%, rgba(255, 255, 255, 0.12) 100%);
}

.game-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

/* Game header right side - for date and expand icon */
.game-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.game-header-right .date-tag {
    font-size: 12px;
    opacity: 0.9;
    white-space: nowrap;
}

.expand-icon {
    flex-shrink: 0;
    min-width: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    color: var(--unsc-blue);
    transition: transform 0.3s ease;
}

.game-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--shield-blue);
    min-width: 80px;
}

.game-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.game-meta-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5), inset 0 0 8px rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* Score tag winner highlighting */
.game-meta-tag.score-tag-blue {
    background: rgba(50, 120, 220, 0.4);
    border: 1px solid #3388ff;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(50, 120, 220, 0.5), inset 0 0 8px rgba(50, 120, 220, 0.3);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.game-meta-tag.score-tag-red {
    background: rgba(220, 20, 60, 0.4);
    border: 1px solid #dc143c;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.5), inset 0 0 8px rgba(220, 20, 60, 0.3);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.game-meta-tag.score-tag-ffa {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.3);
    text-shadow: 0 0 8px rgba(255, 255, 255, 1);
}

.game-item.expanded .expand-icon {
    transform: rotate(90deg);
}

.game-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.game-item.expanded .game-details {
    max-height: 3000px;
}

.game-details-content {
    padding: 25px;
    border-top: 1px solid rgba(168, 212, 255, 0.2);
}

.game-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(168, 212, 255, 0.05);
    border-left: 3px solid var(--shield-blue);
}

/* Game Details Header with Map Image */
.game-details-header {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(15, 20, 35, 0.8), rgba(25, 35, 55, 0.8));
    border: 1px solid rgba(168, 212, 255, 0.3);
    border-radius: 8px;
}

.map-image-container {
    position: relative;
    width: 280px;
    min-width: 280px;
    height: 160px;
    overflow: hidden;
    border-radius: 6px;
    border: 2px solid rgba(168, 212, 255, 0.4);
    box-shadow: 0 0 20px rgba(168, 212, 255, 0.2);
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.map-image-container:hover .map-image {
    transform: scale(1.05);
}

.map-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.map-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--unsc-blue);
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(168, 212, 255, 0.5);
}

.game-info-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-type-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.game-meta-info {
    display: flex;
    gap: 25px;
    margin-bottom: 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: var(--text-secondary);
}

.game-meta-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-final-score {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.final-score-team {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 4px;
}

.final-score-team.team-red {
    background: rgba(220, 20, 60, 0.3);
    border: 2px solid #dc143c;
    color: #ff6b7a;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.5);
}

.final-score-team.team-blue {
    background: rgba(30, 80, 180, 0.4);
    border: 2px solid #3388ff;
    color: #5599ff;
    text-shadow: 0 0 10px rgba(50, 120, 220, 0.5);
}

.score-separator {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* FFA Winner Display */
.game-final-score.ffa-winner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
    padding: 10px 20px;
    border-left: 3px solid #ffffff;
    margin-top: 15px;
}

.ffa-winner .winner-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ffa-winner .winner-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.ffa-winner .winner-score {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 10px;
}

/* Team game winner highlight */
.final-score-team.winner {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.final-score-team.team-red.winner {
    border-color: #ff8888;
}

.final-score-team.team-blue.winner {
    border-color: #88bbff;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(168, 212, 255, 0.2);
}

.tab-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: var(--unsc-blue);
}

.tab-btn.active {
    color: var(--unsc-blue);
    border-bottom-color: var(--unsc-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Detailed Stats Table */
.detailed-stats {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    background: rgba(15, 20, 35, 0.5);
    border: 1px solid rgba(168, 212, 255, 0.2);
    border-collapse: collapse;
}

.stats-table th {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 12px 8px;
    background: rgba(168, 212, 255, 0.1);
    border: 1px solid rgba(168, 212, 255, 0.2);
    color: var(--unsc-blue);
    text-transform: uppercase;
    text-align: center;
}

.stats-table td {
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
    padding: 10px 8px;
    border: 1px solid rgba(168, 212, 255, 0.1);
    color: var(--text-primary);
    text-align: center;
}

.stats-table tr:hover {
    background: rgba(168, 212, 255, 0.05);
}

.stats-table td:first-child {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    color: var(--unsc-blue);
    text-align: left;
    padding-left: 15px;
}

/* Team coloring for detailed stats */
.stats-table tr[data-team="Red"] {
    background: rgba(220, 20, 60, 0.15);
    border-left: 3px solid #dc143c;
}

.stats-table tr[data-team="Blue"] {
    background: rgba(30, 80, 180, 0.25);
    border-left: 3px solid #3388ff;
}

.stats-table tr[data-team="Red"]:hover {
    background: rgba(220, 20, 60, 0.25);
}

.stats-table tr[data-team="Blue"]:hover {
    background: rgba(30, 80, 180, 0.35);
}

.stats-category {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--shield-blue);
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(168, 212, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Scoreboard */
.scoreboard {
    width: 100%;
    background: rgba(15, 20, 35, 0.5);
    border: 1px solid rgba(168, 212, 255, 0.2);
}

.scoreboard-header {
    display: grid;
    grid-template-columns: 60px 50px 1fr 80px 50px 50px 50px 70px;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(168, 212, 255, 0.1);
    border-bottom: 2px solid var(--unsc-blue);
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--unsc-blue);
    text-transform: uppercase;
}

.scoreboard-row {
    display: grid;
    grid-template-columns: 60px 50px 1fr 80px 50px 50px 50px 70px;
    gap: 10px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(168, 212, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    align-items: center;
}

.scoreboard-row:hover {
    background: rgba(168, 212, 255, 0.05);
    border-left: 3px solid var(--unsc-blue);
    padding-left: 17px;
}

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

.sb-col {
    font-family: 'Overpass', sans-serif;
    font-size: 16px;
    color: var(--text-primary);
}

.sb-place {
    text-align: center;
}

.sb-rank {
    text-align: center;
}

.sb-rank-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.sb-player {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-score, .sb-kills, .sb-deaths, .sb-assists, .sb-kd {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
}

.place-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.place-1st {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    color: #ffd700;
}

.place-2nd {
    background: rgba(192, 192, 192, 0.2);
    border: 1px solid #c0c0c0;
    color: #c0c0c0;
}

.place-3rd {
    background: rgba(205, 127, 50, 0.2);
    border: 1px solid #cd7f32;
    color: #cd7f32;
}

.place-4th {
    background: rgba(168, 212, 255, 0.1);
    border: 1px solid var(--shield-blue);
    color: var(--shield-blue);
}

.player-name-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    color: var(--unsc-blue);
}

.team-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.team-red {
    background: rgba(220, 20, 60, 0.5);
    border: 1px solid #dc143c;
    color: #ff6b6b;
}

.team-blue {
    background: rgba(30, 80, 180, 0.5);
    border: 1px solid #3388ff;
    color: #5599ff;
}

.team-green {
    background: rgba(50, 205, 50, 0.5);
    border: 1px solid #32cd32;
    color: #90ee90;
}

.team-yellow {
    background: rgba(255, 215, 0, 0.5);
    border: 1px solid #ffd700;
    color: #ffed4e;
}

/* Team row highlighting */
.scoreboard-row[data-team="Red"] {
    background: rgba(220, 20, 60, 0.25);
    border-left: 4px solid #dc143c;
}

.scoreboard-row[data-team="Blue"] {
    background: rgba(30, 80, 180, 0.3);
    border-left: 4px solid #3388ff;
}

.scoreboard-row[data-team="Red"]:hover {
    background: rgba(220, 20, 60, 0.40);
    border-left: 6px solid #ff1744;
}

.scoreboard-row[data-team="Blue"]:hover {
    background: rgba(30, 80, 180, 0.45);
    border-left: 6px solid #5599ff;
}

/* PVP Kill Matrix Styles */
.pvp-matrix {
    background: rgba(10, 14, 23, 0.8);
    border: 1px solid rgba(168, 212, 255, 0.3);
    overflow-x: auto;
    padding: 15px;
}

.pvp-header {
    border-bottom: 2px solid rgba(168, 212, 255, 0.4);
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.pvp-corner {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    padding: 5px;
}

.pvp-col-header {
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    padding: 5px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pvp-col-header.red {
    color: #ff6b6b;
}

.pvp-col-header.blue {
    color: #6bb3ff;
}

.pvp-row {
    border-bottom: 1px solid rgba(168, 212, 255, 0.1);
    transition: background 0.2s ease;
}

.pvp-row:hover {
    background: rgba(168, 212, 255, 0.05);
}

.pvp-row.red {
    background: linear-gradient(90deg, rgba(180, 30, 30, 0.15) 0%, transparent 50%);
}

.pvp-row.blue {
    background: linear-gradient(90deg, rgba(30, 80, 180, 0.15) 0%, transparent 50%);
}

.pvp-row.red:hover {
    background: linear-gradient(90deg, rgba(180, 30, 30, 0.25) 0%, rgba(168, 212, 255, 0.05) 50%);
}

.pvp-row.blue:hover {
    background: linear-gradient(90deg, rgba(30, 80, 180, 0.25) 0%, rgba(168, 212, 255, 0.05) 50%);
}

.pvp-row-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 5px;
    font-weight: 500;
}

.pvp-row-header .player-name-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pvp-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 2px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.pvp-cell.pvp-self {
    color: #444;
    background: rgba(0, 0, 0, 0.3);
}

.pvp-cell.pvp-teammate {
    color: #555;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.1) 3px,
        rgba(0, 0, 0, 0.1) 6px
    );
}

.pvp-cell.pvp-cool {
    color: #7eb8da;
    text-shadow: 0 0 5px rgba(126, 184, 218, 0.3);
}

.pvp-cell.pvp-warm {
    color: #ffaa00;
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.4);
    font-weight: 600;
}

.pvp-cell.pvp-hot {
    color: #ff4444;
    text-shadow: 0 0 12px rgba(255, 68, 68, 0.6);
    font-weight: 700;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 12px rgba(255, 68, 68, 0.6); }
    50% { text-shadow: 0 0 20px rgba(255, 68, 68, 0.9); }
}

.pvp-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(168, 212, 255, 0.2);
}

.pvp-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.pvp-legend-box {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pvp-legend-box.pvp-hot {
    background: rgba(255, 68, 68, 0.4);
    border-color: #ff4444;
}

.pvp-legend-box.pvp-warm {
    background: rgba(255, 170, 0, 0.3);
    border-color: #ffaa00;
}

.pvp-legend-box.pvp-cool {
    background: rgba(126, 184, 218, 0.2);
    border-color: #7eb8da;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.player-card {
    background: rgba(15, 20, 35, 0.7);
    border: 1px solid rgba(168, 212, 255, 0.2);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-card:hover {
    border-color: var(--unsc-blue);
    box-shadow: 0 0 20px rgba(168, 212, 255, 0.2);
    transform: translateY(-3px);
}

.player-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--unsc-blue);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-place {
    font-size: 14px;
    padding: 3px 10px;
    background: rgba(255, 109, 0, 0.2);
    border: 1px solid var(--warning-orange);
    color: var(--warning-orange);
    border-radius: 3px;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.player-stat {
    text-align: center;
}

.player-stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--shield-blue);
}

.player-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 3px;
}

/* Player Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--background-medium);
    border: 2px solid var(--unsc-blue);
    padding: 40px;
    max-width: 1000px;
    width: 100%;
    position: relative;
    animation: fadeInDown 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: var(--warning-orange);
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--unsc-blue);
    transform: scale(1.2);
}

.modal-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--unsc-blue);
    margin-bottom: 30px;
    text-transform: uppercase;
}

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

.stat-card {
    background: rgba(15, 20, 35, 0.7);
    border: 1px solid rgba(168, 212, 255, 0.3);
    padding: 20px;
    text-align: center;
}

.stat-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--unsc-blue);
    text-shadow: 0 0 20px rgba(168, 212, 255, 0.5);
}

.stat-sublabel {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.game-history {
    margin-top: 20px;
}

.game-history .stats-table {
    width: 100%;
}

.game-history .stats-table td {
    padding: 12px 10px;
}

/* Leaderboard */
.leaderboard {
    background: var(--background-medium);
    border: 2px solid var(--unsc-blue);
    overflow: hidden;
}

.leaderboard-table {
    width: 100%;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 50px 2fr 120px 80px;
    gap: 15px;
    padding: 12px 20px;
    background: linear-gradient(90deg, rgba(168, 212, 255, 0.15), rgba(168, 212, 255, 0.05));
    border-bottom: 3px solid var(--unsc-blue);
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--unsc-blue);
    text-transform: uppercase;
    align-items: center;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 50px 2fr 120px 80px;
    gap: 15px;
    padding: 8px 20px;
    border-bottom: 1px solid rgba(168, 212, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    align-items: center;
}

.leaderboard-row:hover {
    background: rgba(168, 212, 255, 0.05);
    border-left: 4px solid var(--unsc-blue);
    padding-left: 16px;
}

.lb-rank {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(168, 212, 255, 0.3));
}

.rank-icon-small {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(168, 212, 255, 0.3));
    vertical-align: middle;
    margin-right: 8px;
}

.player-with-rank {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lb-player {
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--unsc-blue);
}

.lb-record {
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    text-align: center;
}

.lb-winrate {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--shield-blue);
    text-align: center;
}

.lb-kd {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--warning-orange);
    text-align: center;
}

.lb-xp {
    text-align: center;
}

.xp-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.xp-bar {
    width: 100%;
    height: 8px;
    background: rgba(168, 212, 255, 0.1);
    border: 1px solid rgba(168, 212, 255, 0.3);
    margin-top: 5px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--unsc-blue), var(--shield-blue));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(168, 212, 255, 0.5);
}

.rank-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 5px;
}

.loading-message {
    text-align: center;
    padding: 60px 20px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 18px;
    color: var(--unsc-blue);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Twitch Section Styles */
.twitch-section {
    padding: 20px;
}

/* Medals Scoreboard Styles */
.medals-scoreboard {
    width: 100%;
    background: rgba(15, 20, 35, 0.5);
    border: 1px solid rgba(168, 212, 255, 0.2);
}

.medals-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    padding: 15px 20px;
    background: rgba(168, 212, 255, 0.1);
    border-bottom: 2px solid var(--unsc-blue);
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--unsc-blue);
    text-transform: uppercase;
}

.medals-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(168, 212, 255, 0.1);
    align-items: center;
    transition: all 0.3s ease;
}

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

.medals-row:hover {
    background: rgba(168, 212, 255, 0.05);
}

.medals-row[data-team="Red"] {
    background: rgba(220, 20, 60, 0.15);
    border-left: 4px solid #dc143c;
}

.medals-row[data-team="Blue"] {
    background: rgba(30, 80, 180, 0.25);
    border-left: 4px solid #3388ff;
}

.medals-row[data-team="Red"]:hover {
    background: rgba(220, 20, 60, 0.25);
}

.medals-row[data-team="Blue"]:hover {
    background: rgba(30, 80, 180, 0.35);
}

.medals-player-col {
    display: flex;
    align-items: center;
    gap: 10px;
}

.medals-icons-col {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.medal-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    padding: 4px 8px;
    border-radius: 4px;
    border: none;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.medal-badge:hover {
    background: rgba(168, 212, 255, 0.15);
    transform: translateY(-2px);
}

/* Custom tooltip for medals */
.medal-badge::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 20, 35, 0.95);
    color: #a8d4ff;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid rgba(168, 212, 255, 0.4);
    box-shadow: 0 0 10px rgba(168, 212, 255, 0.3);
    z-index: 100;
    pointer-events: none;
}

.medal-badge:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

.medal-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 0 2px rgba(168, 212, 255, 0.5));
}

.medal-count {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--unsc-blue);
    text-shadow: 0 0 6px rgba(168, 212, 255, 0.6);
}

.medal-unknown {
    background: rgba(100, 100, 100, 0.3);
}

.medal-placeholder {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(100, 100, 100, 0.4);
    border-radius: 4px;
}

.no-medals {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Weapons Scoreboard - like medals */
.weapons-scoreboard {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.weapons-header {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 12px 16px;
    background: rgba(0, 100, 180, 0.15);
    border-bottom: 1px solid rgba(168, 212, 255, 0.3);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--unsc-blue);
    letter-spacing: 1px;
}

.weapons-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
}

.weapons-row[data-team="Red"] {
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.15) 0%, transparent 50%);
    border-left: 3px solid rgba(220, 20, 60, 0.6);
}

.weapons-row[data-team="Blue"] {
    background: linear-gradient(90deg, rgba(50, 120, 220, 0.15) 0%, transparent 50%);
    border-left: 3px solid rgba(50, 120, 220, 0.6);
}

.weapons-player-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weapons-kills-col {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.weapon-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border-radius: 4px;
    position: relative;
    cursor: default;
}

.weapon-badge::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: rgba(10, 20, 35, 0.95);
    color: #a8d4ff;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 4px;
    border: 1px solid rgba(168, 212, 255, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
    margin-bottom: 5px;
}

.weapon-badge:hover::after {
    opacity: 1;
}

.weapon-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(168, 212, 255, 0.4));
    border-radius: 3px;
}

.weapon-placeholder {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 100, 100, 0.3);
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--text-secondary);
}

.weapon-count {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--unsc-blue);
    text-shadow: 0 0 6px rgba(168, 212, 255, 0.6);
}

.no-kills {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Accuracy Scoreboard */
.accuracy-scoreboard {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.accuracy-header {
    display: grid;
    grid-template-columns: 180px 100px 100px 120px 100px;
    gap: 15px;
    padding: 12px 16px;
    background: rgba(0, 100, 180, 0.15);
    border-bottom: 1px solid rgba(168, 212, 255, 0.3);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--unsc-blue);
    letter-spacing: 1px;
}

.accuracy-row {
    display: grid;
    grid-template-columns: 180px 100px 100px 120px 100px;
    gap: 15px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
}

.accuracy-row[data-team="Red"] {
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.15) 0%, transparent 50%);
    border-left: 3px solid rgba(220, 20, 60, 0.6);
}

.accuracy-row[data-team="Blue"] {
    background: linear-gradient(90deg, rgba(50, 120, 220, 0.15) 0%, transparent 50%);
    border-left: 3px solid rgba(50, 120, 220, 0.6);
}

.accuracy-player-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

.accuracy-total-col {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: var(--text-primary);
    text-align: center;
}

.accuracy-total-col.accuracy-percent {
    font-weight: 700;
    color: #00ff88;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

.accuracy-total-col.accuracy-headshots {
    color: #ff6b6b;
    font-weight: 600;
}

.accuracy-total-col .headshot-percent {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
}

.accuracy-stats-col {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.accuracy-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(0, 50, 100, 0.3);
    border: 1px solid rgba(168, 212, 255, 0.2);
    border-radius: 4px;
    position: relative;
    cursor: default;
}

.accuracy-badge::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: rgba(10, 20, 35, 0.95);
    color: #a8d4ff;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 4px;
    border: 1px solid rgba(168, 212, 255, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
    margin-bottom: 5px;
}

.accuracy-badge:hover::after {
    opacity: 1;
}

.weapon-icon-small {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 2px rgba(168, 212, 255, 0.3));
    border-radius: 2px;
}

.weapon-name-small {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--text-secondary);
}

.accuracy-percent {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #00ff88;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

.no-data {
    padding: 40px;
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: var(--text-secondary);
}

.twitch-header {
    text-align: center;
    margin-bottom: 25px;
}

.twitch-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.twitch-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    color: var(--unsc-blue);
    margin: 0 0 8px 0;
}

.twitch-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.twitch-info-box {
    background: rgba(145, 70, 255, 0.1);
    border: 1px solid rgba(145, 70, 255, 0.3);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    text-align: center;
}

.twitch-info-box p {
    margin: 5px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.game-time-info {
    color: var(--unsc-blue) !important;
}

.twitch-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.twitch-player-card {
    background: var(--background-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.twitch-player-card:hover {
    border-color: rgba(145, 70, 255, 0.5);
    transform: translateY(-2px);
}

.twitch-player-card.team-red {
    border-left: 3px solid rgba(220, 20, 60, 0.8);
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.1) 0%, var(--background-medium) 30%);
}

.twitch-player-card.team-blue {
    border-left: 3px solid rgba(50, 120, 220, 0.8);
    background: linear-gradient(90deg, rgba(30, 80, 180, 0.2) 0%, var(--background-medium) 30%);
}

.twitch-player-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.twitch-player-name {
    font-family: 'Overpass', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.twitch-player-status {
    margin-bottom: 12px;
}

.twitch-not-linked {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
}

.twitch-linked {
    font-size: 12px;
    color: #9146ff;
    background: rgba(145, 70, 255, 0.15);
    padding: 4px 10px;
    border-radius: 4px;
}

.twitch-player-actions {
    display: flex;
    gap: 8px;
}

.twitch-link-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    font-family: 'Overpass', sans-serif;
    font-weight: 600;
    background: rgba(145, 70, 255, 0.2);
    border: 1px solid rgba(145, 70, 255, 0.4);
    color: #9146ff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.twitch-link-btn:hover:not(:disabled) {
    background: rgba(145, 70, 255, 0.35);
    border-color: rgba(145, 70, 255, 0.7);
}

.twitch-link-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.twitch-coming-soon {
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.1) 0%, rgba(168, 212, 255, 0.1) 100%);
    border: 1px dashed rgba(145, 70, 255, 0.4);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.twitch-coming-soon p {
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.twitch-note {
    color: var(--text-muted) !important;
    font-style: italic;
}

/* Comparison Modal Styles */
.vs-text {
    color: var(--unsc-blue);
    font-size: 18px;
    margin: 0 15px;
    font-weight: 700;
}

.comparison-container {
    width: 100%;
}

.h2h-section {
    background: rgba(168, 212, 255, 0.1);
    border: 1px solid rgba(168, 212, 255, 0.3);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    text-align: center;
}

.h2h-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    color: var(--unsc-blue);
    margin-bottom: 10px;
}

.h2h-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.h2h-stat {
    color: var(--text-secondary);
    font-size: 14px;
}

.comparison-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    padding: 12px 20px;
    background: var(--background-medium);
    border-radius: 6px;
}

.comparison-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 20px;
    color: var(--text-primary);
}

.comparison-row .comparison-value:first-child {
    text-align: right;
}

.comparison-row .comparison-value:last-child {
    text-align: left;
}

.comparison-label {
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    min-width: 100px;
}

.stat-better {
    color: #00ff88 !important;
}

.stat-worse {
    color: #ff6b6b !important;
}

/* Search Results Page */
.search-results-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-results-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(168, 212, 255, 0.2);
    margin-bottom: 25px;
}

.back-btn {
    background: rgba(168, 212, 255, 0.1);
    border: 1px solid rgba(168, 212, 255, 0.3);
    color: var(--unsc-blue);
    padding: 10px 20px;
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.back-btn:hover {
    background: rgba(168, 212, 255, 0.2);
    border-color: var(--unsc-blue);
}

.search-results-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-map-icon {
    width: 60px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(168, 212, 255, 0.3);
}

.search-results-container {
    padding-bottom: 50px;
}

.player-stats-summary,
.map-info-header,
.gametype-info-header,
.medal-info-header,
.weapon-info-header {
    background: var(--background-medium);
    border: 1px solid rgba(168, 212, 255, 0.2);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.map-info-header {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.map-large-image {
    width: 300px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(168, 212, 255, 0.3);
    flex-shrink: 0;
}

.map-large-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.medal-info-header,
.weapon-info-header {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.medal-large-image,
.weapon-large-image {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.medal-large-image img,
.weapon-large-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.medal-stats,
.weapon-stats {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.title-medal-icon,
.title-weapon-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 10px;
}

.top-earners-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.top-earner-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.top-earner-item:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--primary-color);
}

.earner-rank {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: var(--primary-color);
    min-width: 30px;
}

.earner-rank-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.earner-name {
    flex: 1;
    color: var(--shield-blue);
    font-weight: 600;
}

.earner-count {
    font-family: 'Share Tech Mono', monospace;
    color: var(--kills-green);
}

/* Breakdown sections for medal/weapon search */
.breakdowns-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.breakdown-section {
    background: var(--background-medium);
    border: 1px solid rgba(168, 212, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.breakdown-section .section-header {
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(168, 212, 255, 0.2);
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(0, 217, 255, 0.03);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.breakdown-item:hover {
    background: rgba(0, 217, 255, 0.1);
}

.breakdown-rank {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 24px;
}

.breakdown-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.breakdown-icon.map-icon {
    width: 36px;
    height: 22px;
    object-fit: cover;
    border-radius: 2px;
}

.breakdown-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breakdown-count {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--kills-green);
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .breakdowns-container {
        grid-template-columns: 1fr;
    }

    .breakdown-section {
        max-height: 300px;
    }
}

.map-stats,
.gametype-stats {
    flex: 1;
}

.gametype-breakdown,
.map-breakdown {
    margin-top: 15px;
}

.gametype-stat,
.map-stat {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-stat-icon {
    width: 30px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

.search-games-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: none;
    overflow-y: visible;
}

/* Search game cards - styled like main page header bars */
.search-game-card {
    background: linear-gradient(90deg, rgba(10, 14, 23, 0.92) 0%, rgba(10, 14, 23, 0.75) 50%, rgba(10, 14, 23, 0.92) 100%);
    border: 1px solid rgba(168, 212, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.search-game-card:hover {
    border-color: var(--shield-blue);
    background: linear-gradient(90deg, rgba(168, 212, 255, 0.15) 0%, rgba(10, 14, 23, 0.65) 50%, rgba(168, 212, 255, 0.1) 100%);
}

.search-game-card.winner-blue {
    border-left: 4px solid #3388ff;
    box-shadow: inset 0 0 20px rgba(50, 120, 220, 0.2);
    background: linear-gradient(90deg, rgba(30, 80, 180, 0.3) 0%, rgba(10, 14, 23, 0.75) 50%, rgba(30, 80, 180, 0.15) 100%);
}

.search-game-card.winner-red {
    border-left: 4px solid #dc143c;
    box-shadow: inset 0 0 20px rgba(220, 20, 60, 0.2);
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.25) 0%, rgba(10, 14, 23, 0.75) 50%, rgba(220, 20, 60, 0.1) 100%);
}

.search-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
}

.search-card-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
}

.search-card-gametype {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--shield-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-card-tags {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.search-card-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-card-player-stats {
    display: flex;
    gap: 15px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(168, 212, 255, 0.1);
}

.player-stat-item {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

.card-team-scores {
    display: flex;
    gap: 8px;
    align-items: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
}

.highlight-flash {
    animation: flashHighlight 2s ease;
}

@keyframes flashHighlight {
    0%, 100% { box-shadow: none; }
    25%, 75% { box-shadow: 0 0 20px rgba(168, 212, 255, 0.5), inset 0 0 10px rgba(168, 212, 255, 0.1); }
}

/* PVP Section Styles */
.pvp-search-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--background-medium);
    border: 1px solid rgba(168, 212, 255, 0.2);
    border-radius: 8px;
}

.pvp-search-box {
    position: relative;
    flex: 1;
    max-width: 350px;
}

.pvp-vs {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--unsc-blue);
    text-shadow: 0 0 15px rgba(168, 212, 255, 0.5);
}

#pvpComparisonContent {
    min-height: 200px;
}

#pvpComparisonContent .comparison-container {
    background: var(--background-medium);
    border: 1px solid rgba(168, 212, 255, 0.2);
    border-radius: 8px;
    padding: 30px;
}

#pvpComparisonContent .comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(168, 212, 255, 0.2);
}

#pvpComparisonContent .player-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

#pvpComparisonContent .player-header-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    color: var(--text-primary);
}

/* ==================== CLICKABLE PLAYERS ==================== */
.clickable-player {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-player:hover {
    color: var(--unsc-blue);
    text-shadow: 0 0 10px rgba(168, 212, 255, 0.5);
}

.clickable-player:hover .player-name-text {
    color: var(--unsc-blue);
    text-decoration: underline;
}

.pvp-col-header.clickable-player:hover {
    background: rgba(168, 212, 255, 0.1);
}

/* ==================== SORTING CONTROLS ==================== */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sort-label {
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.sort-select {
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
    padding: 8px 12px;
    background: var(--background-dark);
    border: 1px solid rgba(168, 212, 255, 0.3);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 150px;
}

.sort-select:hover {
    border-color: var(--unsc-blue);
}

.sort-select:focus {
    outline: none;
    border-color: var(--unsc-blue);
    box-shadow: 0 0 10px rgba(168, 212, 255, 0.2);
}

.sort-select option {
    background: var(--background-dark);
    color: var(--text-primary);
}

/* Searchable Filter Boxes */
.filter-search-box {
    position: relative;
    min-width: 150px;
}

.filter-input {
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
    padding: 8px 12px;
    background: var(--background-dark);
    border: 1px solid rgba(168, 212, 255, 0.3);
    color: var(--text-primary);
    cursor: text;
    width: 100%;
    min-width: 150px;
}

.filter-input::placeholder {
    color: var(--text-secondary);
}

.filter-input:hover {
    border-color: var(--unsc-blue);
}

.filter-input:focus {
    outline: none;
    border-color: var(--unsc-blue);
    box-shadow: 0 0 10px rgba(168, 212, 255, 0.2);
}

.filter-input.has-value {
    border-color: var(--unsc-blue);
    background: rgba(168, 212, 255, 0.05);
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-dark);
    border: 1px solid rgba(168, 212, 255, 0.3);
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.filter-dropdown.active {
    display: block;
}

.filter-dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(168, 212, 255, 0.1);
}

.filter-dropdown-item:last-child {
    border-bottom: none;
}

.filter-dropdown-item:hover {
    background: rgba(168, 212, 255, 0.1);
}

.filter-dropdown-item.selected {
    background: rgba(168, 212, 255, 0.15);
    color: var(--unsc-blue);
}

.filter-dropdown-item .game-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(168, 212, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.filter-dropdown-item.clear-option {
    color: var(--text-secondary);
    font-style: italic;
}

.filter-dropdown-item.clear-option:hover {
    color: var(--text-primary);
}

.clear-filters-btn {
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 15px;
    background: transparent;
    border: 1px solid rgba(168, 212, 255, 0.3);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.clear-filters-btn:hover {
    border-color: var(--unsc-blue);
    color: var(--unsc-blue);
    background: rgba(168, 212, 255, 0.1);
}

/* ==================== PLAYER PROFILE PAGE ==================== */
.player-profile-page {
    padding: 20px 0;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px 25px;
    border-bottom: 2px solid rgba(168, 212, 255, 0.3);
}

.profile-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-rank {
    display: flex;
    align-items: center;
}

.profile-rank img {
    width: 44px;
    height: 44px;
}

.profile-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(168, 212, 255, 0.3);
    margin: 0;
}

.profile-stats-section {
    margin-bottom: 40px;
}

.profile-overall-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    gap: 15px;
}

.profile-stat-card {
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid rgba(168, 212, 255, 0.2);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.profile-stat-card:hover {
    border-color: rgba(168, 212, 255, 0.5);
    box-shadow: 0 0 20px rgba(168, 212, 255, 0.1);
}

.profile-stat-card.highlight {
    border-color: var(--unsc-blue);
    background: rgba(168, 212, 255, 0.1);
}

/* Clickable stat cards */
.profile-stat-card.clickable-stat {
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-stat-card.clickable-stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 217, 255, 0.3);
}

.profile-stat-card.stat-active {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.profile-stat-card .stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--unsc-blue);
    margin-bottom: 5px;
}

.profile-stat-card.highlight .stat-value {
    color: #00ff88;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.profile-stat-card .stat-label {
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-games-section {
    margin-top: 30px;
}

.profile-games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-games-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    color: var(--unsc-blue);
    margin: 0;
}

.profile-games-header .sort-controls {
    margin-bottom: 0;
    padding: 10px 15px;
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid rgba(168, 212, 255, 0.2);
}

.no-games {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Weapon Breakdown Modal */
.weapon-breakdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.weapon-breakdown-modal {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
}

.weapon-breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.weapon-breakdown-header h2 {
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    margin: 0;
}

.weapon-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.weapon-breakdown-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.weapon-breakdown-item:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--primary-color);
}

.player-faced-item {
    cursor: pointer;
}

.player-faced-rank {
    flex-shrink: 0;
}

.player-faced-item .weapon-breakdown-name {
    color: var(--shield-blue);
    cursor: pointer;
}

.player-faced-item .weapon-breakdown-name:hover {
    color: var(--unsc-blue);
    text-decoration: underline;
}

.weapon-breakdown-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.weapon-breakdown-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--team-red);
    border-radius: 6px;
    font-weight: bold;
    font-size: 20px;
    color: white;
}

.weapon-breakdown-info {
    flex: 1;
}

.weapon-breakdown-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.weapon-breakdown-stats {
    font-size: 14px;
    color: var(--text-secondary);
}

.weapon-breakdown-stats.pvp-stats {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.pvp-stats .pvp-kills {
    color: var(--kills-green);
    font-weight: 600;
}

.pvp-stats .pvp-deaths {
    color: var(--team-red);
    font-weight: 600;
}

.pvp-stats .pvp-kd {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== MOBILE RESPONSIVE FIXES ===== */
@media (max-width: 1200px) {
    .games-header-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }
    
    .sort-controls {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Mobile Tab Navigation - Horizontal Scroll */
@media (max-width: 768px) {
    .container {
        padding: 20px 10px;
    }

    .logo {
        max-width: 280px;
    }

    header {
        padding: 20px 10px;
        margin-bottom: 30px;
    }
    
    /* Main tab navigation */
    .main-tab-navigation {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        display: flex;
        gap: 10px;
        padding: 10px 15px;
        margin: 20px -15px 20px;
        scroll-snap-type: x mandatory;
    }
    
    .main-tab-btn {
        flex: 0 0 auto;
        min-width: 120px;
        padding: 10px 20px;
        font-size: 14px;
        letter-spacing: 1px;
        scroll-snap-align: start;
    }
    
    /* Game tab navigation inside expanded games */
    .tab-navigation {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        display: flex;
        gap: 8px;
        padding: 10px;
        margin: 0 -10px;
        scroll-snap-type: x mandatory;
    }
    
    .tab-btn {
        flex: 0 0 auto;
        min-width: 100px;
        padding: 10px 15px;
        font-size: 12px;
        letter-spacing: 0.5px;
        scroll-snap-align: start;
    }
    
    /* Hide scrollbars but keep functionality */
    .main-tab-navigation::-webkit-scrollbar,
    .tab-navigation::-webkit-scrollbar {
        display: none;
    }
    
    .main-tab-navigation,
    .tab-navigation {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .games-header-bar {
        padding: 15px 10px;
    }
    
    .games-title {
        font-size: 22px;
    }
    
    /* Profile stats grid - responsive */
    .profile-overall-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        padding: 10px;
    }
    
    .profile-stat-card {
        padding: 15px 10px;
    }
    
    .profile-stat-card .stat-value {
        font-size: 24px;
    }
    
    .profile-stat-card .stat-label {
        font-size: 11px;
    }
    
    /* Search section */
    .search-section {
        padding: 15px 10px;
    }
    
    .search-container {
        padding: 0;
    }
    
    .search-input {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    /* Sort controls */
    .sort-controls {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }
    
    .sort-label {
        font-size: 12px;
    }
    
    .sort-select,
    .filter-input {
        font-size: 13px;
        padding: 8px 12px;
        min-width: 120px;
    }
    
    .clear-filters-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    /* Game cards */
    .game-header-bar {
        padding: 12px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .game-header-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .game-header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .game-number {
        font-size: 16px;
    }
    
    .game-meta-tag {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .game-info {
        flex-wrap: wrap;
    }

    .game-date {
        font-size: 12px;
        padding: 8px;
    }

    /* Mobile Game Details Header */
    .game-details-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .map-image-container {
        width: 100%;
        min-width: unset;
        height: 140px;
    }

    .game-type-title {
        font-size: 20px;
    }

    .game-meta-info {
        flex-wrap: wrap;
        gap: 15px;
    }

    .game-final-score {
        flex-wrap: wrap;
        gap: 10px;
    }

    .final-score-team {
        font-size: 18px;
        padding: 6px 15px;
    }
    
    /* Scoreboard - make horizontal scrollable */
    .scoreboard {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .scoreboard-header,
    .scoreboard-row {
        min-width: 600px;
        grid-template-columns: 45px 35px 1fr 50px 35px 35px 35px 50px;
        gap: 5px;
        padding: 12px 8px;
        font-size: 12px;
    }

    .scoreboard-header {
        font-size: 10px;
    }

    .sb-col {
        font-size: 13px;
    }

    .sb-rank-icon {
        width: 20px;
        height: 20px;
    }

    .player-name-text {
        font-size: 13px;
    }

    .team-badge {
        display: none;
    }

    .place-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    /* PVP Matrix - scrollable */
    .pvp-matrix {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .pvp-header,
    .pvp-row {
        min-width: max-content;
    }
    
    /* Leaderboard */
    .leaderboard {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .leaderboard-header,
    .leaderboard-row {
        min-width: 500px;
        grid-template-columns: 50px 40px 1fr 70px 60px;
        gap: 8px;
        padding: 12px 8px;
    }

    .leaderboard-header {
        font-size: 10px;
    }

    .lb-rank {
        font-size: 16px;
    }

    .lb-player {
        font-size: 14px;
    }

    .lb-record {
        font-size: 12px;
    }

    .lb-kd {
        font-size: 14px;
    }
    
    /* Stats tables */
    .stats-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 12px;
    }
    
    .stats-table table {
        min-width: 600px;
    }

    .stats-table th {
        font-size: 9px;
        padding: 8px 4px;
    }

    .stats-table td {
        font-size: 11px;
        padding: 8px 4px;
    }

    .stats-category {
        font-size: 14px;
        margin: 20px 0 10px 0;
    }
    
    /* Weapon breakdown modal */
    .weapon-breakdown-modal {
        width: 95%;
        max-height: 90vh;
        padding: 20px 15px;
    }
    
    .weapon-breakdown-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .weapon-breakdown-item {
        padding: 12px;
    }
    
    .weapon-breakdown-icon,
    .weapon-breakdown-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .weapon-breakdown-header h2 {
        font-size: 18px;
    }
    
    /* PVP Comparison */
    .pvp-search-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .pvp-search-box {
        max-width: 100%;
        width: 100%;
    }
    
    .pvp-vs {
        transform: rotate(90deg);
        font-size: 20px;
    }
    
    /* Profile header */
    .profile-header {
        padding: 15px 10px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-player-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .profile-name {
        font-size: 22px;
    }

    .profile-rank img {
        width: 36px;
        height: 36px;
    }
    
    .profile-games-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Medals section */
    .medals-scoreboard {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .medals-row {
        min-width: 500px;
    }

    .medals-header,
    .medals-row {
        grid-template-columns: 140px 1fr;
        gap: 10px;
        padding: 10px 12px;
    }
    
    .medals-header {
        font-size: 10px;
    }
    
    .medal-icon {
        width: 20px;
        height: 20px;
    }
    
    .medal-badge {
        padding: 3px 6px;
        gap: 3px;
    }
    
    .medal-count {
        font-size: 10px;
    }
    
    /* Accuracy section */
    .accuracy-scoreboard {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .accuracy-row {
        min-width: 600px;
    }

    .weapons-header,
    .weapons-row,
    .accuracy-header,
    .accuracy-row {
        grid-template-columns: 140px 1fr;
        gap: 10px;
        padding: 10px 12px;
    }
    
    .weapon-icon {
        width: 28px;
        height: 28px;
    }
    
    .weapon-icon-small {
        width: 22px;
        height: 22px;
    }
    
    /* Weapons section */
    .weapons-scoreboard {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .weapons-row {
        min-width: 500px;
    }

    /* Player Modal */
    .modal-content {
        padding: 20px 15px;
        max-width: 95%;
        max-height: 85vh;
    }

    .modal-header {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Search Results */
    .search-result-item {
        padding: 12px 15px;
    }

    .search-result-type {
        font-size: 9px;
    }

    .search-result-name {
        font-size: 14px;
    }

    .search-result-meta {
        font-size: 12px;
    }

    .search-container-dual {
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        max-width: 100%;
    }

    .map-info-header {
        flex-direction: column;
    }
    
    .map-large-image {
        width: 100%;
        height: 150px;
    }
    
    .search-card-scoreboard {
        grid-template-columns: 1fr 1fr;
    }
    
    .search-results-header h2 {
        font-size: 18px;
    }

    .comparison-row {
        grid-template-columns: 1fr 80px 1fr;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .comparison-value {
        font-size: 16px;
    }
    
    .comparison-label {
        font-size: 11px;
        min-width: 60px;
    }
    
    .vs-text {
        margin: 0 8px;
        font-size: 14px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .profile-overall-stats {
        grid-template-columns: 1fr !important;
    }
    
    .main-tab-btn {
        min-width: 100px;
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .tab-btn {
        min-width: 90px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .game-meta-tag {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .profile-stat-card .stat-value {
        font-size: 20px;
    }
    
    .profile-stat-card .stat-label {
        font-size: 10px;
    }

    .game-map-thumb {
        width: 70px;
        height: 45px;
    }
    
    .game-number {
        font-size: 14px;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .profile-overall-stats {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Add smooth scrolling for all scrollable containers */
.main-tab-navigation,
.tab-navigation,
.scoreboard,
.pvp-matrix,
.leaderboard,
.stats-table,
.medals-scoreboard,
.accuracy-scoreboard,
.weapons-scoreboard {
    scroll-behavior: smooth;
}

/* ========================================= */
/* EMBLEM GENERATOR STYLES */
/* ========================================= */

#main-tab-emblem h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 30px 0;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

.emblem-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px auto 0 auto;
    max-width: 900px;
}

.emblem-preview {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

#emblemCanvas {
    width: 100%;
    max-width: 256px;
    height: auto;
    border: 3px solid #0099ff;
    border-radius: 8px;
    background: #000;
    margin-bottom: 20px;
    image-rendering: pixelated;
}

.btn-download {
    width: 100%;
    max-width: 256px;
    padding: 12px;
    background: linear-gradient(135deg, #0066cc, #0099ff);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-download:hover {
    background: linear-gradient(135deg, #0099ff, #00ccff);
    transform: translateY(-2px);
}

.emblem-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-row label {
    color: #00ccff;
    font-weight: 600;
}

.control-row select {
    padding: 10px;
    background: rgba(0, 51, 102, 0.4);
    border: 2px solid rgba(0, 153, 255, 0.4);
    border-radius: 6px;
    color: white;
    font-size: 1em;
    cursor: pointer;
}

.control-row select:hover {
    border-color: #0099ff;
    background: rgba(0, 51, 102, 0.6);
}

.control-row select:focus {
    outline: none;
    border-color: #00ccff;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0099ff;
}

/* Color Picker Grid Styles */
.color-section {
    margin-bottom: 15px;
}

.color-section h3 {
    color: #00ccff;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.color-section-stacked {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-section-stacked .color-picker-group {
    width: 100%;
}

.color-row {
    display: flex;
    gap: 20px;
}

.color-picker-group {
    flex: 1;
}

.color-picker-group label {
    display: block;
    color: #88aacc;
    font-size: 12px;
    margin-bottom: 6px;
}

.color-picker {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 2px;
    padding: 4px;
    background: rgba(0, 20, 40, 0.8);
    border: 2px solid rgba(0, 153, 255, 0.3);
    border-radius: 6px;
    max-width: 280px;
}

.color-swatch {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    background-size: 100% 200%;
    background-position: center;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: #00ccff;
    z-index: 1;
}

.color-swatch.selected {
    border-color: #00ffff;
    box-shadow: 0 0 8px #00ffff;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .emblem-layout {
        grid-template-columns: 1fr;
    }
}
