/* === ENHANCED STATS PAGE === */

/* Server Overview - Enhanced Cards */
.server-overview {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.overview-card {
  position: relative;
  background: linear-gradient(145deg, rgba(18, 18, 26, 0.9) 0%, rgba(10, 10, 15, 0.95) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overview-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(201, 162, 39, 0.15);
}

.overview-card:hover::before {
  opacity: 1;
}

.overview-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  filter: grayscale(0.3);
  transition: filter 0.3s ease;
}

.overview-card:hover .overview-icon {
  filter: grayscale(0);
  transform: scale(1.1);
}

.overview-value {
  font-family: 'Cinzel', serif;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(180deg, var(--accent) 0%, #a88520 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.overview-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Stats Navigation - Enhanced */
.stats-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(18, 18, 26, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stats-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stats-nav-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), #a88520);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stats-nav-btn svg {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 1;
}

.stats-nav-btn span {
  position: relative;
  z-index: 1;
}

.stats-nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.stats-nav-btn.active {
  color: var(--bg-dark);
}

.stats-nav-btn.active::before {
  opacity: 1;
}

/* Category Selector - Enhanced */
.category-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(18, 18, 26, 0.9) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.category-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

.stats-select {
  padding: 0.875rem 1.25rem;
  padding-right: 2.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  min-width: 220px;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23c9a227' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.stats-select:hover {
  border-color: rgba(201, 162, 39, 0.5);
}

.stats-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.stats-select option {
  background: #12121a;
  color: #e8e8f0;
}

.stats-select option:checked,
.stats-select option:hover {
  background: #c9a227;
  color: #0a0a0f;
}

.stats-input {
  padding: 0.875rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  min-width: 250px;
  transition: all 0.2s ease;
}

.stats-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

/* Podium - Enhanced */
.leaderboard-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 3rem 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(201, 162, 39, 0.03) 100%);
  border-radius: 20px;
}

.podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.3s ease;
}

.podium-place:hover {
  transform: translateY(-8px);
}

.podium-crown {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(201, 162, 39, 0.4));
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

.podium-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--border);
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.podium-place.first .podium-avatar {
  width: 110px;
  height: 110px;
  border-color: var(--accent);
  box-shadow:
    0 0 40px var(--accent-glow),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.podium-place.second .podium-avatar {
  border-color: #c0c0c0;
  box-shadow:
    0 0 30px rgba(192, 192, 192, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.podium-place.third .podium-avatar {
  border-color: #cd7f32;
  box-shadow:
    0 0 30px rgba(205, 127, 50, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.podium-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podium-info {
  text-align: center;
  margin-bottom: 1rem;
}

.podium-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 0.5rem;
}

.podium-place.first .podium-rank {
  background: linear-gradient(135deg, var(--accent), #a88520);
  color: var(--bg-dark);
}

.podium-place.second .podium-rank {
  background: linear-gradient(135deg, #e0e0e0, #a0a0a0);
  color: var(--bg-dark);
}

.podium-place.third .podium-rank {
  background: linear-gradient(135deg, #cd7f32, #8b5a2b);
  color: var(--bg-dark);
}

.podium-name {
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.podium-score {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
}

.podium-bar {
  width: 120px;
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(18, 18, 26, 0.5) 100%);
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}

.podium-place.first .podium-bar {
  height: 120px;
  width: 140px;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.15) 0%, var(--bg-card) 50%);
  border-color: rgba(201, 162, 39, 0.3);
}

.podium-place.second .podium-bar {
  height: 90px;
  background: linear-gradient(180deg, rgba(192, 192, 192, 0.1) 0%, var(--bg-card) 50%);
}

.podium-place.third .podium-bar {
  height: 70px;
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.1) 0%, var(--bg-card) 50%);
}

/* Leaderboard List - Enhanced */
.leaderboard-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.lb-row {
  display: grid;
  grid-template-columns: 70px 1fr 130px 120px;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
}

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

.lb-row:not(.header):hover {
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.05) 0%, transparent 100%);
}

.lb-row.header {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: sticky;
  top: 0;
  z-index: 1;
}

.lb-rank {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.lb-row:not(.header):nth-child(2) .lb-rank { color: var(--accent); }
.lb-row:not(.header):nth-child(3) .lb-rank { color: #c0c0c0; }
.lb-row:not(.header):nth-child(4) .lb-rank { color: #cd7f32; }

.lb-player {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.lb-player img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid var(--border);
  transition: border-color 0.2s ease;
}

.lb-row:hover .lb-player img {
  border-color: var(--accent);
}


.lb-score {
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  font-size: 1rem;
}

/* Items Table - Enhanced */
.items-table-container {
  max-height: 650px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.stats-table th {
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(18, 18, 26, 0.98) 100%);
  border-bottom: 2px solid var(--accent);
}

.stats-table th:last-child {
  text-align: right;
}

.stats-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.15s ease;
}

.stats-table tr {
  background: var(--bg-card);
  transition: all 0.15s ease;
}

.stats-table tr:hover td {
  background: rgba(201, 162, 39, 0.05);
}

.stats-table tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.15);
}

.stats-table .rank {
  width: 70px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stats-table tr:nth-child(1) .rank { color: var(--accent); }
.stats-table tr:nth-child(2) .rank { color: #c0c0c0; }
.stats-table tr:nth-child(3) .rank { color: #cd7f32; }

.stats-table .item-name {
  color: var(--text);
  font-weight: 500;
}

.stats-table .item-count {
  text-align: right;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}

/* Progress bar for items */
.item-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.item-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a88520);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Mobs Grid - Enhanced */
.mobs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.mobs-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(18, 18, 26, 0.9) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.mobs-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(201, 162, 39, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobs-card h3::before {
  content: '🗡️';
  font-size: 1.5rem;
}

.mobs-card:last-child h3::before {
  content: '💀';
}

.mobs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mob-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.mob-item:hover {
  background: rgba(201, 162, 39, 0.1);
  transform: translateX(4px);
}

.mob-name {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.mob-count {
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
  padding: 0.25rem 0.75rem;
  background: rgba(201, 162, 39, 0.15);
  border-radius: 6px;
}

/* Player Profile - Enhanced */
.player-profile {
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(18, 18, 26, 0.95) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid rgba(201, 162, 39, 0.15);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  border: 4px solid var(--accent);
  box-shadow:
    0 0 40px var(--accent-glow),
    0 12px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.05) rotate(2deg);
}

.profile-info h3 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(180deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* Enhanced Profile Header */
.profile-header-enhanced {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid rgba(201, 162, 39, 0.15);
}

.profile-skin-container {
  flex-shrink: 0;
}

.profile-body {
  width: 150px;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.profile-body:hover {
  transform: scale(1.05) rotate(2deg);
}

.profile-info-enhanced {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-avatar-small {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 3px solid var(--accent);
}

.profile-info-enhanced h3 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(180deg, var(--accent) 0%, #a88520 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.profile-uuid {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  display: inline-block;
  max-width: fit-content;
}

.profile-account-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.profile-account-link:hover {
  color: var(--text);
}

/* Profile Sections Enhanced */
.profile-sections-enhanced {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.profile-combat-section,
.profile-exploration-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
}

.profile-combat-section h4,
.profile-exploration-section h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.combat-stats,
.exploration-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.stat-row span:first-child {
  color: var(--text-muted);
}

.stat-row span:last-child {
  font-weight: 600;
  color: var(--text);
}

/* Profile section icons */
.profile-section h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-stat {
  text-align: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

.profile-stat:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.profile-stat .value {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.profile-stat .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.profile-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.profile-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mini-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.mini-item .name {
  color: var(--text-muted);
}

.mini-item .count {
  font-weight: 600;
  color: var(--text);
}

/* Stats Notice - Enhanced */
.stats-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding: 1.25rem;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.1) 0%, rgba(201, 162, 39, 0.05) 50%, rgba(201, 162, 39, 0.1) 100%);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stats-notice svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  animation: pulse-opacity 2s ease-in-out infinite;
}

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

/* View Toggle Buttons */
.view-toggle {
  display: flex;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem;
  border-radius: 8px;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
  background: var(--accent);
  color: var(--bg-dark);
}

.view-btn svg {
  width: 20px;
  height: 20px;
}

/* Items Gallery */
.items-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  max-height: 700px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
}

.item-card::before {
  content: attr(data-rank);
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: var(--text-muted);
}

.item-card:nth-child(1)::before {
  background: linear-gradient(135deg, var(--accent), #a88520);
  color: var(--bg-dark);
}

.item-card:nth-child(2)::before {
  background: linear-gradient(135deg, #e0e0e0, #a0a0a0);
  color: var(--bg-dark);
}

.item-card:nth-child(3)::before {
  background: linear-gradient(135deg, #cd7f32, #8b5a2b);
  color: var(--bg-dark);
}

.item-image {
  width: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.item-image img {
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.item-card:hover .item-image img {
  transform: scale(1.15);
}

.item-fallback {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(201, 162, 39, 0.2), rgba(201, 162, 39, 0.05));
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.item-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.15);
}

.item-card.top-1 {
  background: linear-gradient(145deg, rgba(201, 162, 39, 0.2) 0%, rgba(201, 162, 39, 0.05) 100%);
  border-color: var(--accent);
}

.item-card.top-2 {
  background: linear-gradient(145deg, rgba(192, 192, 192, 0.15) 0%, rgba(192, 192, 192, 0.03) 100%);
  border-color: rgba(192, 192, 192, 0.3);
}

.item-card.top-3 {
  background: linear-gradient(145deg, rgba(205, 127, 50, 0.15) 0%, rgba(205, 127, 50, 0.03) 100%);
  border-color: rgba(205, 127, 50, 0.3);
}

.item-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.item-card:hover .item-icon {
  transform: scale(1.15);
}

.item-card .rank-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  background: var(--bg-dark);
  color: var(--text-muted);
}

.item-card.top-1 .rank-badge {
  background: linear-gradient(135deg, var(--accent), #a88520);
  color: var(--bg-dark);
}

.item-card.top-2 .rank-badge {
  background: linear-gradient(135deg, #e0e0e0, #a0a0a0);
  color: var(--bg-dark);
}

.item-card.top-3 .rank-badge {
  background: linear-gradient(135deg, #cd7f32, #8b5a2b);
  color: var(--bg-dark);
}

/* Gallery item name and count */
.items-gallery .item-name {
  font-size: 0.8rem;
  color: var(--text);
  text-align: center;
  font-weight: 500;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  max-height: 2.4em;
  overflow: hidden;
}

.items-gallery .item-count {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

/* Player Count Header Animation */
#nav-server-status {
  transition: all 0.3s ease;
}

#nav-server-status.updating {
  opacity: 0.7;
}

#player-count {
  font-weight: 600;
  min-width: 80px;
  text-align: center;
}

/* Connected Players List in Header Dropdown */
.players-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

#nav-server-status:hover .players-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(8px);
}

.players-dropdown h4 {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.player-item,
.player-online {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  transition: background 0.2s ease;
}

.player-item:hover,
.player-online:hover {
  background: rgba(201, 162, 39, 0.1);
}

.player-item img,
.player-online img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.player-item span,
.player-online span {
  font-size: 0.9rem;
  color: var(--text);
}

.no-players {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

/* Responsive Enhancements */
@media (max-width: 1200px) {
  .server-overview {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .profile-details {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .server-overview {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-nav-btn span {
    display: none;
  }

  .leaderboard-podium {
    flex-wrap: wrap;
    padding: 2rem 1rem;
  }

  .lb-row {
    grid-template-columns: 50px 1fr 100px;
  }

  .mobs-grid {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

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

  .profile-details {
    grid-template-columns: 1fr;
  }
}
