/* Base Styles - Simpletons Redesign (Playful Mascot Era) */

/* Variables */
:root {
  /* Typography */
  --heading-font: 'Baloo 2', 'Poppins', sans-serif;
  --body-font: 'Inter', sans-serif;

  /* Colors - toy-box primaries inspired by the Simpletons mascot trio */
  --primary: #ff6b4a;        /* Playful coral-orange */
  --primary-dark: #e5502e;   /* Deeper coral for hover states */
  --secondary: #29b6f6;      /* Bright sky blue */
  --secondary-dark: #0288d1;
  --accent: #ffca3a;         /* Sunny yellow accent */
  --accent-dark: #e6a700;
  --dark: #15171d;           /* Deep charcoal background */
  --dark-light: #1f222b;     /* Slightly lighter dark background */
  --dark-medium: #1a1d24;    /* Medium dark for cards */
  --text: #f5f6f8;           /* Soft white text */
  --text-muted: #9aa1ac;     /* Muted text color */
  --border: #2a2e38;         /* Subtle borders */
  --success: #43b581;
  --danger: #f04747;
  --warning: #faa61a;
  --ssl: #9b5de5;           /* Rank S - Supersonic Legend+ */
  --ssl-dark: #7c3aed;
  --ssl-light: #c9a3ff;
}

/* Global Styles */
body {
  background-color: var(--dark);
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%232a2e38' fill-opacity='0.4'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary);
  text-decoration: none;
}

p {
  margin-bottom: 1rem;
}

code {
  font-family: 'Roboto Mono', monospace;
  padding: 0.2rem 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  border-radius: 4px;
  font-size: 0.85em;
}

img {
  max-width: 100%;
}

.container {
  max-width: 1200px;
  padding: 0 15px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* Header */
.main-header {
  padding: 2rem 0;
  background: linear-gradient(120deg, var(--dark-light) 0%, var(--dark) 100%);
  border-bottom: none;
  position: relative;
  margin-bottom: 30px;
}

/* Subtle header accent line */
.main-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--primary) 20%,
    var(--secondary) 50%,
    var(--primary) 80%,
    transparent 100%);
}

.site-title {
  font-size: 2.4rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  font-family: var(--heading-font);
}

.site-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--body-font);
}

/* Mascot logo */
.site-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #f7f7f5;
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  animation: mascotWiggle 6s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes mascotWiggle {
  0%, 92%, 100% { transform: rotate(0deg) scale(1); }
  94% { transform: rotate(-6deg) scale(1.05); }
  96% { transform: rotate(5deg) scale(1.05); }
  98% { transform: rotate(-3deg) scale(1.02); }
}

.footer-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #f7f7f5;
  border-radius: 10px;
  padding: 4px;
  margin-right: 0.6rem;
  vertical-align: middle;
}

/* Navigation */
.main-nav {
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;
  margin-top: 1rem;
  padding: 0;
}

.main-nav .navbar-toggler {
  border: none;
  color: var(--text);
  padding: 0.5rem;
}

.main-nav .nav-link {
  position: relative;
  padding: 0.6rem 1rem;
  margin: 0 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: normal;
}

.main-nav .nav-link:hover {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.05);
}

.main-nav .nav-link.active {
  color: var(--text);
  background: rgba(255, 107, 74, 0.1);
}

.main-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* Content Container */
.content-container {
  background-color: var(--dark-light);
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease-out forwards;
}

/* Subtle accent line instead of thick edge */
.content-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  opacity: 0.7;
}

.content-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.content-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
  padding-left: 0.5rem;
}

/* Cards */
.card {
  background-color: var(--dark-medium);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1.5rem;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(255, 107, 74, 0.18);
}

.card-header {
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  padding: 0.8rem 1rem;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  background-color: rgba(0, 0, 0, 0.1);
  border-top: 1px solid var(--border);
  padding: 0.8rem 1rem;
}

/* Stat Cards */
.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--dark-medium);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  margin-bottom: 1.5rem;
  text-align: center;
}

.stat-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 22px rgba(255, 202, 58, 0.18);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0 0 2px 2px;
}

.stat-card.primary::before {
  background: var(--primary);
}

.stat-card.secondary::before {
  background: var(--secondary);
}

.stat-card.accent::before {
  background: var(--accent);
}

.stat-card.gold::before {
  background: var(--ssl);
}

.stat-card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  opacity: 0.7;
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

/* Leaderboard */
.leaderboard {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 1fr 90px 80px 90px 100px 90px 120px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    align-items: center;
    gap: 1.2rem;
}

.player-row {
    display: grid;
    grid-template-columns: 60px 1fr 90px 80px 90px 100px 90px 120px;
    padding: 0.75rem 1rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 1.2rem;
    position: relative;
}

.player-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.player-row:last-child {
    border-bottom: none;
}

/* Premium glow effects for top 3 positions */
.player-row.rank-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.03) 0%, rgba(255, 215, 0, 0.01) 100%);
    border-left: 3px solid #FFD700;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.1),
        inset 0 1px 0 rgba(255, 215, 0, 0.1);
}

.player-row.rank-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.03) 0%, rgba(192, 192, 192, 0.01) 100%);
    border-left: 3px solid #C0C0C0;
    box-shadow:
        0 0 15px rgba(192, 192, 192, 0.1),
        inset 0 1px 0 rgba(192, 192, 192, 0.1);
}

.player-row.rank-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.03) 0%, rgba(205, 127, 50, 0.01) 100%);
    border-left: 3px solid #CD7F32;
    box-shadow:
        0 0 12px rgba(205, 127, 50, 0.1),
        inset 0 1px 0 rgba(205, 127, 50, 0.1);
}

.player-row.rank-1:hover {
    box-shadow:
        0 0 25px rgba(255, 215, 0, 0.15),
        inset 0 1px 0 rgba(255, 215, 0, 0.15);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 215, 0, 0.02) 100%);
    transform: translateY(-2px);
}

.player-row.rank-2:hover {
    box-shadow:
        0 0 20px rgba(192, 192, 192, 0.15),
        inset 0 1px 0 rgba(192, 192, 192, 0.15);
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.05) 0%, rgba(192, 192, 192, 0.02) 100%);
    transform: translateY(-2px);
}

.player-row.rank-3:hover {
    box-shadow:
        0 0 18px rgba(205, 127, 50, 0.15),
        inset 0 1px 0 rgba(205, 127, 50, 0.15);
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.05) 0%, rgba(205, 127, 50, 0.02) 100%);
    transform: translateY(-2px);
}

.rank-number {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    text-align: center;
    display: inline-block;
    min-width: 35px;
}

/* Special styling for top 3 ranks */
.player-row.rank-1 .rank-number {
    color: #FFD700; /* Gold */
    font-weight: 700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.player-row.rank-2 .rank-number {
    color: #C0C0C0; /* Silver */
    font-weight: 700;
    text-shadow: 0 0 5px rgba(192, 192, 192, 0.3);
}

.player-row.rank-3 .rank-number {
    color: #CD7F32; /* Bronze */
    font-weight: 700;
    text-shadow: 0 0 5px rgba(205, 127, 50, 0.3);
}

.rank {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    text-align: center;
    display: inline-block;
    min-width: 35px;
}

/* Medal effects for top 3 without circles */
.player-row.rank-1 .rank-number::before {
    content: '🥇 ';
    margin-right: 0.3rem;
}

.player-row.rank-2 .rank-number::before {
    content: '🥈 ';
    margin-right: 0.3rem;
}

.player-row.rank-3 .rank-number::before {
    content: '🥉 ';
    margin-right: 0.3rem;
}

/* Individual column styling for better alignment */
.rank-column {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.player-name-column {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mmr-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.games-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.games-value {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.win-rate-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.record-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.streak-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mmr-change-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mmr-change {
    font-weight: 600;
    font-size: 0.9rem;
}

.mmr-change.text-success {
    color: var(--success) !important;
}

.mmr-change.text-danger {
    color: var(--danger) !important;
}

.mmr-change.text-muted {
    color: var(--text-muted) !important;
}

/* Header column alignment */
.leaderboard-header > div:first-child {
    justify-self: start;
}

.leaderboard-header > div:nth-child(2) {
    justify-self: start;
}

.leaderboard-header > div:nth-child(3),
.leaderboard-header > div:nth-child(4),
.leaderboard-header > div:nth-child(5),
.leaderboard-header > div:nth-child(6),
.leaderboard-header > div:nth-child(7),
.leaderboard-header > div:nth-child(8) {
    justify-self: center;
}

.mmr-value {
  font-weight: 600;
  color: var(--primary);
}

.win-rate {
  font-weight: 600;
  color: var(--success);
}

/* Global stats styling to match ranked stats */
.global-stats-enhanced {
    background-color: var(--dark-medium);
    border-left: 4px solid var(--primary);
}

.global-stats-enhanced .mmr-display.global {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

.global-stats-enhanced .mmr-display.global::before {
    display: none;
}

.global-stats-enhanced .stat-item {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

.global-stats-enhanced .stat-item:hover {
    background-color: rgba(0, 0, 0, 0.25);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 74, 0.2);
}

/* Enhanced streak cards for global - NO top line */
.global-streak-card {
    background-color: var(--dark-medium);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.global-streak-card::before {
    display: none;
}

.global-streak-card .card-header {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border);
}

/* Enhanced match tables for global */
.global-match-table {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--dark-medium);
}

.global-match-table th {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border);
}

.global-match-table tr:hover {
    background-color: rgba(255, 107, 74, 0.1);
}

/* Enhanced section headers for global */
.global-section-header {
    color: var(--primary);
    position: relative;
}

.global-section-header::before {
    background: var(--primary);
}

/* Global tab styling enhancement */
#global-tab.active {
    background-color: rgba(255, 107, 74, 0.2);
    border-color: var(--primary);
}

#global-tab.active::after {
    background: var(--primary);
}

/* Global MMR value styling */
.mmr-display.global .mmr-value {
    color: var(--primary);
    font-weight: 700;
}

/* Global stats grid enhancements */
.global-stats-grid .stat-value {
    color: var(--primary);
}

/* Navigation pills enhancement */
.nav-pills .nav-link {
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    margin: 0 0.2rem;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: var(--heading-font);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--text);
    box-shadow: 0 4px 12px rgba(255, 107, 74, 0.3);
    transform: translateY(-1px);
}

.nav-pills .nav-link:hover:not(.active) {
    background: rgba(255, 107, 74, 0.1);
    transform: translateY(-1px);
}

/* Responsive adjustments for tablets */
@media (max-width: 992px) {
    .leaderboard-header,
    .player-row {
        grid-template-columns: 50px 1fr 70px 60px 80px 70px 70px 80px;
        padding: 0.6rem 0.8rem;
        gap: 0.8rem;
    }

    .rank-number {
        font-size: 0.9rem;
        min-width: 30px;
    }

    .mmr-change {
        font-size: 0.8rem;
    }
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .leaderboard-header,
    .player-row {
        grid-template-columns: 40px 1fr 60px 50px 70px 60px 60px 70px;
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
        gap: 0.6rem;
    }

    .rank-number {
        font-size: 0.8rem;
        min-width: 25px;
    }

    .mmr-change {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .leaderboard-header,
    .player-row {
        grid-template-columns: 40px 1fr 70px 60px 70px;
        font-size: 0.8rem;
    }

    /* Hide Games, W-L and MMR Change columns on very small screens */
    .games-column,
    .record-column,
    .mmr-change-column {
        display: none;
    }

    .leaderboard-header > div:nth-child(4),
    .leaderboard-header > div:nth-child(6),
    .leaderboard-header > div:nth-child(7) {
        display: none;
    }
}

/* Pagination */
.pagination-container {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.page-item .page-link {
  background-color: var(--dark-medium);
  color: var(--text-muted);
  border-color: var(--border);
  padding: 0.5rem 0.75rem;
  transition: all 0.2s ease;
}

.page-item .page-link:hover {
  background-color: rgba(255, 107, 74, 0.1);
  color: var(--text);
  border-color: var(--primary);
  z-index: 1;
}

.page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text);
  z-index: 2;
}

.page-item.disabled .page-link {
  color: var(--text-muted);
  background-color: var(--dark-medium);
  border-color: var(--border);
  opacity: 0.5;
}

/* Search */
#searchContainer {
  margin-bottom: 1.5rem;
}

.search-input {
  background-color: var(--dark-medium);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px 0 0 8px;
  padding: 0.6rem 1rem;
}

.search-input:focus {
  background-color: var(--dark-medium);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: none;
}

.search-button {
  background: var(--primary);
  color: var(--text);
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 0.6rem 1.25rem;
  transition: all 0.2s ease;
}

.search-button:hover {
  background: var(--primary-dark);
  color: var(--text);
}

#searchResults {
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.3s ease-out;
}

#searchResults .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#searchResults .list-group-item {
  background-color: var(--dark-medium);
  color: var(--text);
  border-color: var(--border);
  transition: background-color 0.2s ease;
}

#searchResults .list-group-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Match Cards */
.match-card {
  background-color: var(--dark-medium);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.match-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.match-header {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.match-id {
  font-size: 0.8rem;
  color: var(--text-muted);
  background-color: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Roboto Mono', monospace;
}

.match-body {
  padding: 1rem;
}

.team {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.team-header {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.team-members {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.team1 {
  background-color: rgba(255, 107, 74, 0.1);
  border-left: 3px solid var(--primary);
}

.team2 {
  background-color: rgba(41, 182, 246, 0.1);
  border-left: 3px solid var(--secondary);
}

.team-winner {
  position: relative;
}

.team-winner::after {
  content: '👑';
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
}

.badge {
  padding: 0.4em 0.8em;
  font-size: 0.75em;
  font-weight: 700;
  border-radius: 50px;
  letter-spacing: 0.02em;
}

.bg-info {
  background-color: var(--primary) !important;
}

.bg-success {
  background-color: var(--success) !important;
}

/* Enhanced Featured Players Styles */
.featured-player {
    background-color: var(--dark-medium);
    border-radius: 18px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 2px solid var(--border);
    cursor: pointer;
    position: relative;
}

.featured-player:hover {
    transform: translateY(-5px) rotate(-1deg);
    box-shadow: 0 10px 24px rgba(255, 107, 74, 0.25);
    border-color: var(--primary);
}

.featured-player-header {
    background: linear-gradient(135deg, var(--dark-medium) 0%, var(--dark) 100%);
    padding: 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.featured-player-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary) 20%,
        var(--secondary) 50%,
        var(--primary) 80%,
        transparent 100%);
}

.featured-player-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-left: 10px;
}

.featured-player-body {
    padding: 20px;
    position: relative;
}

.featured-player-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0.7;
}

.featured-player-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.stat {
    text-align: center;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.stat:hover {
    background-color: rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.stat-value {
    font-weight: 700;
    font-size: 1.3rem;
    display: block;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Modals */
.modal-content {
  background-color: var(--dark-light);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
  border-bottom: 1px solid var(--border);
  background-color: var(--dark-medium);
  border-radius: 12px 12px 0 0;
  padding: 1rem 1.25rem;
}

.modal-footer {
  border-top: 1px solid var(--border);
  background-color: var(--dark-medium);
  border-radius: 0 0 12px 12px;
  padding: 1rem 1.25rem;
}

.modal-title {
  font-weight: 600;
  font-size: 1.2rem;
}

.modal-body {
  padding: 1.25rem;
}

.btn-close {
  filter: invert(1) brightness(200%);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.btn-close:hover {
  opacity: 1;
}

/* Tables */
.table {
    color: var(--text);
    background-color: var(--dark-medium);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0;
}

.table-dark {
    background-color: var(--dark-medium);
}

.table th {
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 12px 15px;
}

.table td {
    padding: 12px 15px;
    border-color: var(--border);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.1);
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Forms */
.form-control, .form-select {
  background-color: var(--dark-medium);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
  background-color: var(--dark-medium);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 74, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-label {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.input-group-text {
  background-color: var(--dark-medium);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Buttons */
.btn {
  font-family: var(--heading-font);
  font-weight: 600;
  padding: 0.55rem 1.4rem;
  border-radius: 50px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.96) !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 0 var(--primary-dark), 0 6px 14px rgba(255, 107, 74, 0.25);
}

.btn-primary:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--primary-dark), 0 10px 18px rgba(255, 107, 74, 0.35);
  color: #fff;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 0 var(--secondary-dark), 0 6px 14px rgba(41, 182, 246, 0.25);
}

.btn-secondary:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--secondary-dark), 0 10px 18px rgba(41, 182, 246, 0.35);
  color: #fff;
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  font-weight: 600;
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255, 107, 74, 0.3);
}

/* Footer */
.main-footer {
  background-color: var(--dark-medium);
  color: var(--text-muted);
  padding: 3rem 0 0;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  position: relative;
}

.main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--primary) 20%,
    var(--secondary) 50%,
    var(--primary) 80%,
    transparent 100%);
  opacity: 0.5;
}

.footer-title {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 1.25rem;
  position: relative;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  width: 40px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: all 0.2s ease;
  position: relative;
  padding-left: 1rem;
}

.footer-links a::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration: none;
  transform: translateX(3px);
}

.footer-bottom {
  background-color: var(--dark);
  padding: 1rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
}

/* How It Works */
.how-it-works {
  margin-bottom: 3rem;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.step-card {
  position: relative;
  background: var(--dark-medium);
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
  border: 1px solid var(--border);
}

.step-card:hover {
  transform: translateY(-5px);
}

.step-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.step-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-right: 1rem;
  font-size: 1.5rem;
}

.step-icon.blue {
  background: rgba(255, 107, 74, 0.1);
  color: var(--primary);
}

.step-icon.orange {
  background: rgba(41, 182, 246, 0.1);
  color: var(--secondary);
}

.step-icon.purple {
  background: rgba(255, 202, 58, 0.1);
  color: var(--accent);
}

.step-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
}

.step-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Features */
.feature-group {
  margin-bottom: 2rem;
}

.feature-group h4 {
  position: relative;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
}

.feature-group h4::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 3px;
  background: var(--primary);
  border-radius: 3px;
}

.feature-list {
  list-style: none;
  padding-left: 0.5rem;
  margin-bottom: 1.5rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.7;
}

.feature-list.orange li::before {
  background: var(--secondary);
}

.feature-list.purple li::before {
  background: var(--accent);
}

/* Command Table */
.command-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
}

.command-table th {
  background-color: rgba(0, 0, 0, 0.2);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.command-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.command-table tr:last-child td {
  border-bottom: none;
}

.command-name {
  font-family: 'Roboto Mono', monospace;
  color: var(--primary);
  background-color: rgba(255, 107, 74, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  display: inline-block;
}

.command-description {
  color: var(--text-muted);
}

/* Player Modal Styling */
.modal-title {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

/* MMR Display */
.mmr-display {
    text-align: center;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 15px;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

.mmr-display::before,
.mmr-display.global::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.mmr-label {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

.mmr-display.global .mmr-value {
    color: var(--primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    height: 100%;
}

.stat-item {
    text-align: center;
    padding: 15px 10px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-item:hover {
    background-color: rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.stat-item h5 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-item .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

/* Section headers */
.section-header {
    margin: 1.5rem 0 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    padding-left: 0.8rem;
    color: var(--text);
}

.section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Match tables */
.match-table {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.match-table th {
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
}

.match-table td {
    padding: 0.8rem 1rem;
    vertical-align: middle;
}

.match-table .text-success {
    color: var(--success) !important;
    font-weight: 600;
}

.match-table .text-danger {
    color: var(--danger) !important;
    font-weight: 600;
}

/* Tabs styling */
#playerStatsTabs {
    border-bottom: 1px solid var(--border);
    margin-top: -0.5rem;
}

#playerStatsTabs .nav-link {
    color: var(--text-muted);
    padding: 0.75rem 1.25rem;
    border: none;
    margin-right: 0.5rem;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
}

#playerStatsTabs .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

#playerStatsTabs .nav-link.active {
    color: var(--primary);
    background-color: var(--dark-medium);
    border: 1px solid var(--border);
    border-bottom-color: var(--dark-medium);
    position: relative;
}

#playerStatsTabs .nav-link.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 2px 2px;
}

.tab-content {
    padding-top: 1.5rem;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background Splash Effects */
.bg-splash {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.07;
  z-index: -1;
  pointer-events: none;
}

.bg-splash-1 {
  top: 10%;
  right: 10%;
  width: 300px;
  height: 300px;
  background: var(--primary);
  animation: float 15s ease-in-out infinite;
}

.bg-splash-2 {
  bottom: 20%;
  left: 5%;
  width: 250px;
  height: 250px;
  background: var(--accent);
  animation: float 18s ease-in-out infinite reverse;
}

.bg-splash-3 {
  top: 60%;
  right: 15%;
  width: 200px;
  height: 200px;
  background: var(--secondary);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(30px, 20px);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* Dropdown Menu Enhancements */
.dropdown-menu {
    background-color: var(--dark-medium);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    margin-top: 0.5rem;
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 0.125rem 0;
    display: flex;
    align-items: center;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(255, 107, 74, 0.15);
    color: var(--primary);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    margin-right: 0.5rem;
}

/* Alert Enhancements */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background-color: rgba(67, 181, 129, 0.04) !important;
    border-color: rgba(67, 181, 129, 0.15) !important;
    color: #2d5a3d !important;
}

.alert-warning {
    background: rgba(250, 166, 26, 0.15);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: rgba(255, 107, 74, 0.15);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

.alert-danger {
    background: rgba(240, 71, 71, 0.15);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

/* Profile System Enhancements */
.auth-section {
    min-width: 200px;
}

.user-info {
    color: var(--text);
}

.user-name {
    font-size: 0.9rem;
    line-height: 1.2;
}

.user-actions .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.default-avatar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.user-indicator {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-avatar {
    border: 3px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.guild-info {
    background: rgba(255, 107, 74, 0.1);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.feature-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.step-indicator {
    text-align: center;
}

.step-number {
    font-weight: 700;
    font-size: 1rem;
}

.getting-started-card {
    transition: all 0.3s ease;
}

.getting-started-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 74, 0.2);
}

.verification-info {
    transition: all 0.3s ease;
}

.verification-info:hover {
    transform: translateY(-2px);
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

#mmrChart,
#rankedChart,
#globalChart {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 1rem;
}

#statsTabsNav .nav-link {
    color: var(--text-muted);
    border: none;
    padding: 0.75rem 1.25rem;
    margin-right: 0.5rem;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    background: transparent;
}

#statsTabsNav .nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

#statsTabsNav .nav-link.active {
    background: var(--dark-medium);
    color: var(--primary);
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--dark-medium);
    position: relative;
}

#statsTabsNav .nav-link.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
}

/* Utility Classes */
.section-title {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary);
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary);
    color: white;
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.bg-success {
    background-color: var(--success) !important;
}

.bg-danger {
    background-color: var(--danger) !important;
}

.bg-warning {
    background-color: var(--warning) !important;
}

.bg-dark {
    background-color: var(--dark) !important;
}

.bg-dark-light {
    background-color: var(--dark-light) !important;
}

.bg-dark-medium {
    background-color: var(--dark-medium) !important;
}

/* Win-Loss record styling */
.win-loss-record {
    font-weight: 500;
    color: var(--text);
}

/* Streak styling */
.streak-display {
    font-weight: 500;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-header {
        padding: 15px 0;
        margin-bottom: 20px;
    }

    .stat-card-value {
        font-size: 2rem;
    }

    .content-container {
        padding: 20px;
    }

    .site-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 10px 0;
        margin-bottom: 15px;
    }

    .site-title {
        font-size: 1.8rem;
    }

    .site-subtitle {
        font-size: 1rem;
    }

    .content-container {
        border-radius: 10px;
    }

    .player-row {
        padding: 10px;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-header button,
    .content-header .btn {
        margin-top: 1rem;
        align-self: flex-start;
    }

    .leaderboard-header,
    .player-row {
        grid-template-columns: 40px 1fr 60px 50px 70px 60px 60px 70px;
    }

    .hide-on-mobile {
        display: none;
    }

    .team {
        padding: 0.6rem 0.75rem;
    }

    .search-button {
        padding: 0.6rem 1rem;
    }

    .command-name {
        word-break: break-all;
    }

    .mmr-display {
        min-height: auto;
        margin-bottom: 15px;
    }

    .mmr-value {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-item {
        padding: 10px 5px;
    }

    .stat-item h5 {
        font-size: 0.7rem;
        margin-bottom: 5px;
    }

    .stat-item .stat-value {
        font-size: 1rem;
    }

    #playerStatsTabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .auth-section {
        min-width: auto;
    }

    .user-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem !important;
    }

    .user-details {
        text-align: center;
    }

    .profile-avatar img,
    .default-avatar {
        width: 100px !important;
        height: 100px !important;
    }

    .step-indicator {
        margin-bottom: 1rem;
    }

    #statsTabsNav .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    .chart-container {
        height: 250px;
    }

    .header .d-flex {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .auth-section {
        order: -1;
    }
}

@media (max-width: 576px) {
    .site-title {
        font-size: 1.6rem;
    }

    .content-container {
        padding: 1rem;
        border-radius: 8px;
    }

    .leaderboard-header,
    .player-row {
        grid-template-columns: 40px 1fr 70px 60px 70px;
        font-size: 0.8rem;
        padding: 0.6rem 0.75rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .command-table th,
    .command-table td {
        padding: 0.6rem 0.75rem;
    }

    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .step-title {
        font-size: 1rem;
    }

    .user-info {
        gap: 0.5rem !important;
    }

    .user-avatar img,
    .default-avatar {
        width: 32px !important;
        height: 32px !important;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .site-subtitle {
        font-size: 0.85rem;
    }

    .dropdown-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .main-header .container .d-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .auth-section {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

/* Profile-specific enhancements */
.profile-avatar {
    border: 3px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.profile-avatar:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(255, 107, 74, 0.3);
}

.rank-badge {
    transition: all 0.3s ease;
}

.rank-badge:hover {
    transform: translateY(-2px);
}

.rank-badge.rank-a {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    border-radius: 8px;
    padding: 0.5rem;
}

.rank-badge.rank-b {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
    border-radius: 8px;
    padding: 0.5rem;
}

.rank-badge.rank-c {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.1) 0%, rgba(25, 135, 84, 0.05) 100%);
    border-radius: 8px;
    padding: 0.5rem;
}

/* Enhanced stat displays */
.stat-item {
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Enhanced step indicators */
.step-indicator {
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 8px;
}

.step-indicator:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.step-number {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.step-number:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* MMR display enhancements */
.display-4 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Progress bar customization */
.progress {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Enhanced badges */
.badge {
    font-weight: 500;
    letter-spacing: 0.25px;
}

.badge.bg-success {
    background: linear-gradient(135deg, var(--success) 0%, #28a745 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc3545 100%) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #e0a800 100%) !important;
    color: var(--dark) !important;
}

.badge.bg-gold {
    background: linear-gradient(135deg, var(--ssl) 0%, var(--ssl-dark) 100%) !important;
    color: #fff !important;
}

.text-purple {
    color: var(--ssl) !important;
}

.border-purple {
    border-color: var(--ssl) !important;
}

.bg-purple {
    background-color: var(--ssl) !important;
    color: #fff !important;
}

/* Table enhancements */
.table-dark {
    background-color: transparent;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02);
}

.table-striped tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Card enhancements */
.card.h-100 {
    transition: all 0.3s ease;
}

.card.h-100:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Command code styling */
code {
    background: rgba(255, 107, 74, 0.1);
    color: var(--primary);
    border: 1px solid rgba(255, 107, 74, 0.2);
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-size: 0.85em;
    font-weight: 500;
}

/* Welcome section enhancements */
.fa-rocket {
    animation: rocketFloat 3s ease-in-out infinite;
}

@keyframes rocketFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* Error icon animations for 404/500 pages */
.error-icon-container {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.error-icon-container i:first-child {
    animation: errorPulse 2s ease-in-out infinite;
}

.error-icon-container i:last-child {
    animation: errorRotate 3s linear infinite;
}

@keyframes errorPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes errorRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments for profile */
@media (max-width: 768px) {
    .profile-avatar {
        width: 100px !important;
        height: 100px !important;
    }

    .display-4 {
        font-size: 2rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .step-number {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }

    .card.h-100:hover {
        transform: none;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced Tabs */
.enhanced-tabs {
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}

.enhanced-tabs .nav-link {
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    border: none;
    margin-right: 0.5rem;
    font-weight: 500;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
}

.enhanced-tabs .nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    transform: translateY(-2px);
}

.enhanced-tabs .nav-link.active {
    color: var(--primary);
    background: var(--dark-medium);
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--dark-medium);
    transform: translateY(-2px);
}

.enhanced-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 2px 2px 0 0;
}

.enhanced-tab-content {
    animation: fadeInUp 0.4s ease-out;
}

/* Performance Cards */
.performance-card {
    background: var(--dark-medium);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.performance-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.ranked-card {
    border-left: 4px solid var(--warning);
}

.global-card {
    border-left: 4px solid var(--primary);
}

.card-header-enhanced {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.card-header-enhanced::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
    opacity: 0.3;
}

.card-body-enhanced {
    padding: 1.5rem;
}

/* Enhanced MMR Display */
.mmr-display-large {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.mmr-display-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.mmr-value {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mmr-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Enhanced Stats Grid */
.stats-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.stat-box:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-box .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-box .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Enhanced Progress Section */
.progress-section {
    margin-bottom: 1.5rem;
}

.progress-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.enhanced-progress {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.bg-gradient-success {
    background: linear-gradient(90deg, var(--success) 0%, #28a745 100%) !important;
}

.bg-gradient-primary {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%) !important;
}

/* Enhanced Streak Display */
.streak-display {
    text-align: center;
}

.streak-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid;
    transition: all 0.3s ease;
}

.streak-win {
    background: linear-gradient(135deg, rgba(67, 181, 129, 0.2) 0%, rgba(67, 181, 129, 0.1) 100%);
    color: var(--success);
    border-color: var(--success);
}

.streak-loss {
    background: linear-gradient(135deg, rgba(240, 71, 71, 0.2) 0%, rgba(240, 71, 71, 0.1) 100%);
    color: var(--danger);
    border-color: var(--danger);
}

.streak-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Chart Enhancements */
.chart-card {
    background: var(--dark-medium);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 2rem;
}

.chart-container-enhanced {
    position: relative;
    height: 400px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Activity Timeline */
.activity-card {
    background: var(--dark-medium);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.activity-timeline {
    position: relative;
    padding-left: 2rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.timeline-item:hover {
    background: rgba(0, 0, 0, 0.2);
    border-left-color: var(--primary);
    transform: translateX(4px);
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 1.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--dark-medium);
    z-index: 2;
}

.timeline-marker.success {
    background: var(--success);
}

.timeline-marker.danger {
    background: var(--danger);
}

.match-result {
    margin-bottom: 0.5rem;
}

.match-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mmr-change-display {
    text-align: right;
}

.mmr-change {
    font-weight: 700;
    font-size: 1rem;
}

.mmr-change.positive {
    color: var(--success);
}

.mmr-change.negative {
    color: var(--danger);
}

/* Summary Card */
.summary-card {
    background: var(--dark-medium);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    height: fit-content;
}

.summary-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.summary-item:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: translateX(4px);
}

.summary-item.highlight {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.summary-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.summary-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

/* Enhanced Tables */
.enhanced-table {
    background: transparent;
}

.enhanced-table thead th {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
}

.enhanced-table tbody tr {
    transition: all 0.2s ease;
}

.enhanced-table tbody tr:hover {
    background: rgba(255, 107, 74, 0.1);
    transform: translateX(4px);
}

.enhanced-table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(42, 46, 56, 0.5);
}

/* Match Filters */
.match-filters {
    display: flex;
    gap: 0.5rem;
}

.match-filters .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.match-filters .btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text);
}

/* Analytics Card */
.analytics-card {
    background: var(--dark-medium);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    height: fit-content;
}

.analytics-section {
    margin-bottom: 1.5rem;
}

.analytics-section:last-child {
    margin-bottom: 0;
}

.analytics-title {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comparison-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.comparison-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comparison-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

/* Form Indicator */
.form-indicator {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.form-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
    cursor: help;
}

.form-dot.win {
    background: var(--success);
    color: white;
}

.form-dot.loss {
    background: var(--danger);
    color: white;
}

.form-dot:hover {
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    animation: fadeInUp 0.5s ease-out;
}

.empty-state-icon {
    opacity: 0.3;
}

.getting-started-enhanced {
    background: linear-gradient(135deg, rgba(255, 107, 74, 0.1) 0%, rgba(255, 202, 58, 0.1) 100%);
    border: 1px solid rgba(255, 107, 74, 0.2);
    border-radius: 12px;
}

.step-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(255, 107, 74, 0.3);
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.btn-floating {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: none;
}

.btn-floating:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Responsive Enhancements */
@media (max-width: 992px) {
    .stats-grid-enhanced {
        gap: 0.75rem;
    }

    .stat-box {
        padding: 0.75rem;
    }

    .mmr-value {
        font-size: 2.5rem;
    }

    .chart-container-enhanced {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .enhanced-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .performance-card:hover {
        transform: none;
    }

    .stats-grid-enhanced {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-box {
        padding: 0.5rem;
    }

    .stat-box .stat-value {
        font-size: 1.2rem;
    }

    .mmr-value {
        font-size: 2rem;
    }

    .chart-container-enhanced {
        height: 250px;
        padding: 0.5rem;
    }

    .floating-actions {
        bottom: 1rem;
        right: 1rem;
    }

    .btn-floating {
        width: 48px;
        height: 48px;
    }

    .timeline-item {
        padding: 0.75rem;
    }

    .activity-timeline {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
    }

    .form-indicator {
        gap: 0.25rem;
    }

    .form-dot {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .match-filters {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .match-filters .btn {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .enhanced-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .card-header-enhanced,
    .card-body-enhanced {
        padding: 1rem;
    }

    .stats-grid-enhanced {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .summary-stats {
        gap: 0.5rem;
    }

    .summary-item {
        padding: 0.5rem;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Additional CSS fixes for profile stats page */

/* Fix performance breakdown styling */
.performance-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.performance-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.performance-label {
    min-width: 60px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.performance-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.performance-value {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: var(--text);
}

/* Enhanced analytics styling */
.analytics-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.analytics-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.analytics-title {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-chart,
.activity-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comparison-item,
.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.comparison-item:hover,
.activity-item:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: translateX(2px);
}

.comparison-label,
.activity-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comparison-value,
.activity-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

/* Form indicator styling */
.form-indicator {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.form-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
    cursor: help;
}

.form-dot.win {
    background: var(--success);
    color: white;
}

.form-dot.loss {
    background: var(--danger);
    color: white;
}

.form-dot:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.form-summary {
    text-align: center;
}

/* Trend indicators */
.trend-indicators {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.trend-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.trend-value {
    font-size: 0.9rem;
    font-weight: 700;
}

/* Match filters enhancement */
.match-filters {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.match-filters .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.match-filters .btn.active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Enhanced table styling */
.enhanced-table {
    margin-bottom: 0;
    background: transparent;
}

.enhanced-table thead th {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.enhanced-table tbody tr {
    transition: all 0.2s ease;
}

.enhanced-table tbody tr:hover {
    background: rgba(255, 107, 74, 0.1);
    transform: translateX(4px);
}

.enhanced-table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(42, 46, 56, 0.5);
}

/* Match row data styling */
.match-date-display {
    font-size: 0.9rem;
    color: var(--text);
}

.streak-indicator {
    font-weight: 500;
    font-size: 0.85rem;
}

/* Empty state styling */
.empty-matches-state {
    padding: 2rem;
    text-align: center;
}

.empty-state-icon {
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* Quick action buttons in sidebar */
.card-body .d-grid .btn {
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.card-body .d-grid .btn:hover {
    transform: translateY(-2px);
}

/* Responsive fixes */
@media (max-width: 992px) {
    .content-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .stats-actions {
        align-self: stretch;
    }

    .stats-actions .btn {
        width: 100%;
    }

    .match-filters {
        justify-content: center;
        margin-top: 1rem;
    }

    .chart-container-enhanced {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .performance-card:hover {
        transform: none;
    }

    .stats-grid-enhanced {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-box {
        padding: 0.75rem;
    }

    .mmr-value {
        font-size: 2rem;
    }

    .summary-stats {
        gap: 0.5rem;
    }

    .summary-item {
        padding: 0.5rem;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }

    .analytics-section {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .comparison-item,
    .activity-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .trend-item {
        padding: 0.4rem 0.6rem;
    }
}

/* Animation enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced hover effects */
.performance-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.performance-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Enhanced button styling */
.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.btn:focus,
.nav-link:focus,
.form-control:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text);
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .performance-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }
}rem;
    }

    .form-indicator {
        gap: 0.25rem;
    }

    .form-dot {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .match-filters .btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .enhanced-table {
        font-size: 0.85rem;
    }

    .enhanced-table th,
    .enhanced-table td {
        padding: 0.5rem 0.25rem;
    }

    /* Stack the advanced tab layout on mobile */
    .advanced .row > .col-lg-8,
    .advanced .row > .col-lg-4 {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .content-header h2 {
        font-size: 1.5rem;
    }

    .user-indicator {
        font-size: 0.85rem;
    }

    .enhanced-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .stat-card-value {
        font-size: 1.8rem;
    }

    .card-header-enhanced {
        padding: 1rem;
    }

    .card-body-enhanced {
        padding: 1rem;
    }

    .mmr-display-large {
        padding: 1rem;
    }

    .mmr-value {
        font-size: 2

/* ===== PROFILE STATS PAGE LAYOUT FIXES ===== */

/* Fix chart container sizing */
canvas {
    max-width: 100% !important;
    height: auto !important;
}

/* Ensure proper card heights and spacing */
.card.h-100 {
    height: 100% !important;
}

/* Fix the overview performance cards */
.overview .row .col-lg-6 {
    display: flex;
    flex-direction: column;
}

.overview .card {
    flex: 1;
    min-height: 400px;
}

/* Enhanced tab styling */
.enhanced-tabs {
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}

.enhanced-tabs .nav-link {
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    border: none;
    margin-right: 0.5rem;
    font-weight: 500;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
}

.enhanced-tabs .nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    transform: translateY(-2px);
}

.enhanced-tabs .nav-link.active {
    color: var(--primary);
    background: var(--dark-medium);
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--dark-medium);
    transform: translateY(-2px);
}

.enhanced-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 2px 2px 0 0;
}

/* Match filter buttons */
.match-filters {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.match-filters .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.match-filters .btn.active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-color: currentColor;
}

/* Performance cards in overview */
.card.border-start {
    position: relative;
}

.card.border-start.border-3 {
    border-left-width: 4px !important;
}

.card.border-warning {
    border-left-color: var(--warning) !important;
}

.card.border-primary {
    border-left-color: var(--primary) !important;
}

/* Better spacing for stats grid */
.overview .card-body .row.text-center {
    margin: 0;
}

.overview .card-body .row.text-center .col-4 {
    padding: 0.5rem;
}

.overview .card-body .row.text-center .col-4 .p-2 {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 1rem !important;
    transition: all 0.2s ease;
}

.overview .card-body .row.text-center .col-4 .p-2:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Fix progress bar styling */
.progress {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    height: 8px;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Career summary card improvements */
.career-summary .d-flex {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.career-summary .d-flex:last-child {
    border-bottom: none;
}

/* Table enhancements */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table-dark {
    background: transparent;
    margin-bottom: 0;
}

.table-dark thead th {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-dark tbody tr {
    transition: all 0.2s ease;
}

.table-dark tbody tr:hover {
    background: rgba(255, 107, 74, 0.1);
    transform: translateX(4px);
}

.table-dark td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(42, 46, 56, 0.5);
}

/* Badge enhancements */
.badge {
    font-weight: 500;
    letter-spacing: 0.25px;
    padding: 0.5em 0.75em;
}

.badge.fs-6 {
    font-size: 0.9rem !important;
    padding: 0.6em 1em;
}

/* Advanced analytics styling */
.advanced-analytics .card-body h6 {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.advanced-analytics .bg-dark {
    background: rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease;
}

.advanced-analytics .bg-dark:hover {
    background: rgba(0, 0, 0, 0.3) !important;
    transform: translateX(2px);
}

/* Form indicators (recent performance) */
.form-indicators .badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: help;
    transition: all 0.2s ease;
}

.form-indicators .badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Empty state styling */
.empty-state {
    animation: fadeInUp 0.5s ease-out;
}

.empty-state-icon {
    opacity: 0.3;
}

/* Quick actions in sidebar */
.quick-actions .btn {
    transition: all 0.2s ease;
}

.quick-actions .btn:hover {
    transform: translateY(-2px);
}

/* Responsive improvements */
@media (max-width: 992px) {
    .content-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .stats-actions {
        align-self: stretch;
    }

    .stats-actions .btn {
        width: 100%;
    }

    .match-filters {
        justify-content: center;
        margin-top: 1rem;
    }

    .enhanced-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .overview .card {
        min-height: auto;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .content-header h2 {
        font-size: 1.5rem;
    }

    .user-indicator {
        font-size: 0.85rem;
    }

    .enhanced-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .overview .card-body .row.text-center .col-4 .p-2 {
        padding: 0.75rem !important;
    }

    .overview .card-body .display-4 {
        font-size: 2rem;
    }

    .match-filters .btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .table-dark {
        font-size: 0.85rem;
    }

    .table-dark th,
    .table-dark td {
        padding: 0.5rem 0.25rem;
    }

    .form-indicators .badge {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .overview .card-body .row.text-center {
        margin: 0 -0.25rem;
    }

    .overview .card-body .row.text-center .col-4 {
        padding: 0.25rem;
    }

    .overview .card-body .row.text-center .col-4 .p-2 {
        padding: 0.5rem !important;
    }

    .advanced-analytics .d-flex {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }

    .career-summary .d-flex {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
        padding: 0.5rem 0;
    }
}

/* Animation enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Focus states for accessibility */
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text);
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .card:hover,
    .btn:hover {
        transform: none;
    }
}

/* Compact Rank Card Styles - Fixed for Sidebar */
.compact-rank-card {
    background: var(--dark-medium);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    width: 100%; /* Ensure it takes full width of its container */
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto; /* Center it within the card */
}

.compact-rank-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.rank-card-header {
    padding: 0.75rem;
    text-align: center;
    position: relative;
}

.rank-letter-small {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.25rem;
    font-weight: 900;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.rank-card-body {
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.rank-info-compact {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.rank-title-small {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
    font-family: var(--heading-font);
    line-height: 1.2;
}

.rank-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.2;
}

.mmr-display-compact {
    text-align: center;
    flex-shrink: 0;
    min-width: 50px;
}

.mmr-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 0.125rem;
}

.mmr-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    line-height: 1;
}

.verify-action-compact {
    flex-shrink: 0;
}

.verify-action-compact .btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.global-mmr-compact {
    padding: 0.4rem 0.75rem;
    background: rgba(255, 107, 74, 0.1);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    border-top: 1px solid var(--border);
}

/* Hover effects for different ranks */
.compact-rank-card:has(.bg-danger):hover {
    box-shadow: 0 8px 16px rgba(220, 53, 69, 0.3);
}

.compact-rank-card:has(.bg-primary):hover {
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.3);
}

.compact-rank-card:has(.bg-success):hover {
    box-shadow: 0 8px 16px rgba(25, 135, 84, 0.3);
}

.compact-rank-card:has(.bg-secondary):hover {
    box-shadow: 0 8px 16px rgba(108, 117, 125, 0.3);
}

/* Ensure proper layout in profile sidebar */
.card-body .compact-rank-card {
    margin-left: 0;
    margin-right: 0;
}

/* Mobile responsiveness */
@media (max-width: 992px) {
    .rank-card-body {
        padding: 0.6rem;
    }

    .rank-info-compact {
        text-align: center;
    }

    .mmr-display-compact {
        min-width: 60px;
    }
}

@media (max-width: 768px) {
    .compact-rank-card:hover {
        transform: none;
    }

    .rank-card-header {
        padding: 0.6rem;
    }

    .rank-letter-small {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    .mmr-value {
        font-size: 1rem;
    }
}

/* Leaderboard-specific MMR styling - keeps modals big.
   Anchored to #leaderboardContent (an ID) so this reliably wins over every
   other .mmr-value rule in this stylesheet regardless of source order. */
#leaderboardContent .mmr-value {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    text-shadow: none !important;
}

/* Players with fewer than 25 total games show their MMR in red as a
   "small sample size" indicator */
#leaderboardContent .mmr-value.mmr-low-games {
    color: var(--danger) !important;
}