/* Player Info Styles */
.player-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.player-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

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

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-placeholder .material-icons {
    font-size: 32px;
    color: var(--text-primary);
}

.player-details {
    flex-grow: 1;
}

.player-details h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.platform-info {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.rank-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
}

.rank-image {
    width: 60px;
    height: 60px;
    margin-bottom: 4px;
}

.mmr-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* Rank Info Grid */
.rank-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.rank-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.rank-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.rank-icon {
    width: 40px;
    height: 40px;
}

.rank-name {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

.rank-value {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Matches List */
.matches-list {
    max-height: 500px;
    overflow-y: auto;
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin-top: 24px;
}

.match-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--divider-color);
    transition: background-color 0.2s;
}

.match-item:hover {
    background-color: var(--background-secondary);
}

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

.match-rank {
    margin-right: 16px;
}

.match-rank-icon {
    width: 50px;
    height: 50px;
    padding: 4px;
}

.match-info {
    flex: 1;
}

.match-rank-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.match-timestamp {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.match-mmr {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.match-mmr-value {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.match-mmr-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.match-mmr-change.positive {
    color: var(--success-color);
}

.match-mmr-change.negative {
    color: var(--error-color);
}

/* Card Styles */
.card {
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-content {
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.card-header .material-icons {
    color: var(--primary-color);
}

.card-header h3 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-primary);
}

/* Loading Styles */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--background-secondary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Player Actions Styles */
.player-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.refresh-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

.refresh-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.refresh-btn .material-icons {
    color: var(--text-primary);
    font-size: 24px;
}

.refresh-btn .rotating {
    animation: spin 1s linear infinite;
}

/* Map Cards */
.map-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--surface-color);
}

.map-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.map-card .map-image-container {
  position: relative;
  overflow: hidden;
}

.map-card .map-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

.map-card .card-content {
  padding: 20px;
  background-color: var(--surface-color);
}

.map-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.map-card .chip {
  background-color: var(--primary-color);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.map-card .chip-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

/* Responsive adjustments for map cards */
@media (max-width: 768px) {
  .map-card {
    margin-bottom: 16px;
  }
  
  .map-card h3 {
    font-size: 1.2rem;
  }
  
  .map-card .map-image-container {
    height: 160px !important;
  }
  
  .map-card .card-content {
    padding: 16px;
  }
}