body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
}

.wrapper {
  display: block;
  min-height: 100vh;
}

.page-content {
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.site-header {
  text-align: center;
  margin-bottom: 40px;
}

.team-social,
.player-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.player-social {
  justify-content: flex-start;
  gap: 15px;
  margin-top: 15px;
}

.site-logo {
  max-width: 200px;
  height: auto;
}

h1, h2, h3, h4 {
  color: #ffffff;
}

a {
  color: #4da6ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.social-links {
  list-style: none;
  padding: 0;
}

.social-links li {
  margin-bottom: 10px;
}

hr {
  border: 0;
  border-top: 1px solid #333;
  margin: 40px 0;
}

/* Player Card Styles */
.player-card {
  background-color: #1e1e1e;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #333;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

/* Compact Tile Styles */
.player-card-tile {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  gap: 20px;
}

.tile-photo-container {
  flex: 0 0 60px;
  height: 60px;
}

.tile-photo, .tile-photo-placeholder {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #4da6ff;
}

.tile-photo-placeholder {
  background-color: #2a2a2a;
}

.tile-info {
  flex: 1;
}

.tile-name {
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}

.tile-stats-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.tile-stat {
  display: flex;
  flex-direction: column;
}

.tile-stat-label {
  font-size: 0.7em;
  color: #888;
  text-transform: uppercase;
}

.tile-stat-value {
  font-size: 0.9em;
  font-weight: bold;
  color: #4da6ff;
}

.tile-stat-value.missing {
  color: #555;
}

.tile-expand-icon {
  color: #888;
  transition: transform 0.3s ease;
}

.player-card.expanded .tile-expand-icon {
  transform: rotate(180deg);
}

.player-card.expanded .tile-photo {
  filter: grayscale(100%);
}

.player-card.expanded .tile-stat-value {
  opacity: 0.5;
}

.player-card.expanded .tile-stats-row > .tile-stat:nth-child(4) .tile-stat-value {
  opacity: 1;
}

.player-card.expanded .tile-stat-value.mtga-rank {
  filter: grayscale(100%);
  opacity: 0.5;
}

.player-card-expanded-content {
  display: none;
  padding: 0 20px 20px 20px;
  border-top: 1px solid #333;
}

.player-card.expanded .player-card-expanded-content {
  display: block;
}

.player-card.expanded {
  cursor: default;
}

.player-card.expanded .player-card-tile {
  cursor: pointer;
  border-bottom: none;
  background-color: #252525;
}

.player-card-header {
  display: flex;
  align-items: flex-start;
  margin-top: 20px;
  margin-bottom: 20px;
  gap: 20px;
}

.player-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #4da6ff;
}

.player-main-info {
  flex: 1;
}

.player-info-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.player-primary-details {
  flex: 0 1 250px;
}

.player-bio-container {
  flex: 1;
  min-width: 250px;
  display: flex;
  align-items: center;
}


.player-general-data {
  list-style: none;
  padding: 0;
  margin: 0;
}

.player-general-data li {
  font-size: 0.9em;
  color: #bbb;
}

.player-details-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.player-country-flag img {
  display: block;
  height: 24px;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}


.player-stats h3 {
  font-size: 1.2em;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
  margin-top: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item,
.record-item {
  background-color: #2a2a2a;
  padding: 10px;
  border-radius: 4px;
  display: block;
  text-decoration: none;
  color: #e0e0e0;
  transition: background-color 0.2s ease, transform 0.2s ease;
  font-size: 1.1em;
  font-weight: bold;
}

.stat-item {
  border-left: 3px solid #4da6ff;
}

.record-item {
  background-color: #252525;
}

.stat-item:hover,
.record-item:hover {
  background-color: #353535;
  transform: translateY(-2px);
  text-decoration: none;
}

.record-item:hover {
  background-color: #303030;
}

.stat-label,
.record-label {
  display: block;
  font-size: 0.73em; /* 0.8em * 1.1em is approx original look relative to parent */
  color: #888;
  text-transform: uppercase;
  font-weight: normal;
}

.stat-value {
  color: #fff;
}

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

.player-bio {
  font-size: 1em;
  color: #ccc;
  font-style: italic;
  margin: 0;
  line-height: 1.5;
  border-left: 2px solid #333;
  padding-left: 20px;
}


.social-icon {
  width: 20px;
  height: 20px;
  filter: invert(70%) sepia(50%) saturate(1000%) hue-rotate(180deg) brightness(100%) contrast(100%);
  transition: filter 0.3s ease;
}

.team-social .social-icon {
  width: 40px;
  height: 40px;
}

.social-icon:hover {
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.info-icon {
  cursor: help;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.info-icon:hover {
  opacity: 1;
  transform: scale(1.2);
}

.footer-text {
  font-size: 0.625rem;
  color: #666;
}

/* MTGA Rank Color Styling */
.mtga-rank {
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
  display: inline-block;
  background-size: 200% 200%;
  animation: shimmer 3s ease-in-out infinite;
  line-height: 1.2;
  vertical-align: middle;
}

@keyframes shimmer {
  0%, 100% {
    background-position: 200% 0;
  }
  50% {
    background-position: 0 0;
  }
}

.mtga-rank-bronze {
  background: linear-gradient(135deg, #cd7f32, #a0613a, #cd7f32);
  color: #1a1a1a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.mtga-rank-silver {
  background: linear-gradient(135deg, #e8e8e8, #b0b0b0, #e8e8e8);
  color: #1a1a1a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 8px rgba(200, 200, 200, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.mtga-rank-gold {
  background: linear-gradient(135deg, #ffd700, #daa520, #ffd700);
  color: #1a1a1a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.mtga-rank-platinum {
  background: linear-gradient(135deg, #e5e4e2, #c0c0c0, #e5e4e2);
  color: #1a1a1a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 8px rgba(200, 200, 200, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 0 15px rgba(150, 150, 150, 0.3);
}

.mtga-rank-diamond {
  background: linear-gradient(135deg, #b9f2ff, #00d4ff, #b9f2ff);
  color: #1a1a1a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.mtga-rank-mythic {
  background: linear-gradient(135deg, #ff8c00, #ffa500, #ff8c00);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  box-shadow: 0 2px 8px rgba(255, 140, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* Mobile Responsive - Small Screens */
@media (max-width: 768px) {
  .player-card-header {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
  }

  .player-photo {
    width: 120px;
    height: 120px;
  }

  .player-main-info {
    width: 100%;
  }

  .player-info-content {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .player-primary-details {
    flex: 1;
    width: 100%;
    min-width: unset;
  }

  .player-details-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .player-bio-container {
    flex: 1;
    width: 100%;
    min-width: unset;
    justify-content: flex-start;
  }

  .player-social {
    justify-content: flex-start;
    width: 100%;
  }

  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

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

  .player-card-tile {
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
  }

  .tile-info {
    flex-basis: 100%;
  }

  .tile-stats-row {
    gap: 10px;
  }
}

