/* ═══════════════════════════════════════════════
   PLAYER PROFILE PAGE
   ═══════════════════════════════════════════════ */

.player-profile-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

/* ── Profile Header ── */
.profile-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(27, 67, 50, 0.04);
  position: relative;
}

.profile-header-bg {
  height: 80px;
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-mid) 100%);
  opacity: 0.1;
}

.profile-header-content {
  padding: 0 1.5rem 1.25rem;
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  margin-top: -35px;
}

.profile-avatar-container {
  position: relative;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.profile-jersey {
  background: var(--bg-surface);
  border: 4px solid var(--bg-surface);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.profile-own-badge {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  border: 2px solid var(--bg-surface);
  white-space: nowrap;
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 0.25rem;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.profile-username {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-team-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.4rem;
  width: fit-content;
  transition: all 0.15s ease;
}

.profile-team-pill:hover {
  background: var(--green-wash);
  border-color: var(--green-pale);
  color: var(--green-primary);
}

.profile-team-logo {
  border-radius: 50%;
  background: #fff;
}

.profile-no-team {
  padding: 0.4rem 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-no-team:hover {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-muted);
}

.profile-stats-highlights {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 0.25rem;
  padding-right: 0.5rem;
}

.profile-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.profile-stat-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

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

/* ── Profile Grid ── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.25rem;
  align-items: start;
}

.profile-col-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-col-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Common Card Adjustments ── */
.profile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.55rem;
}

.profile-card-header .arena-card-title {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.profile-link-all {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-primary);
  text-decoration: none;
}

.profile-link-all:hover {
  text-decoration: underline;
}

/* ── Achievements Grid ── */
.profile-achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.profile-achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.15s ease;
}

.profile-achievement-badge:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.profile-achievement-icon {
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1;
}

.profile-achievement-name {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

/* ── Activity List ── */
.profile-activity-list {
  display: flex;
  flex-direction: column;
}

.profile-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--bg-card);
}

.profile-activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-activity-item:first-child {
  padding-top: 0;
}

.profile-activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-activity-icon-goal {
  background: var(--green-wash);
  color: var(--green-primary);
  border: 1px solid rgba(45, 106, 79, 0.2);
}

.profile-activity-icon-dry {
  background: rgba(220, 38, 38, 0.08);
  color: var(--red-warning);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.profile-activity-icon-transfer {
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.profile-activity-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-activity-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.profile-activity-text strong {
  font-weight: 600;
}

.profile-activity-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.profile-activity-meta a {
  color: var(--green-primary);
  text-decoration: none;
  font-weight: 500;
}

.profile-activity-meta a:hover {
  text-decoration: underline;
}

/* ── Info List ── */
.profile-info-list {
  display: flex;
  flex-direction: column;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--bg-card);
}

.profile-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-info-row:first-child {
  padding-top: 0;
}

.profile-info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-info-value {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-status-active {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

.profile-status-online {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.profile-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.profile-status-retired {
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

.profile-status-president {
  color: var(--role-president);
  background: rgba(212, 160, 23, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

.profile-status-captain {
  color: var(--role-captain);
  background: rgba(37, 99, 235, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

.profile-status-member {
  color: var(--role-member);
  background: rgba(37, 99, 235, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

.profile-retired-message {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.profile-retired-message p {
  font-size: 0.7rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ── Dark Theme Adjustments ── */
[data-theme="dark"] .profile-header-bg {
  opacity: 0.15;
}

[data-theme="dark"] .profile-team-logo {
  background: transparent;
}

[data-theme="dark"] .profile-activity-icon-goal {
  background: rgba(107, 191, 138, 0.1);
  border-color: rgba(107, 191, 138, 0.2);
}

[data-theme="dark"] .profile-activity-icon-dry {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
}

[data-theme="dark"] .profile-activity-icon-transfer {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.2);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .profile-grid {
    grid-template-columns: 1fr 280px;
    gap: 1.25rem;
  }
}

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

  .player-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .player-grid .profile-col-main,
  .player-grid .profile-col-side {
    display: contents;
  }

  .player-grid > .profile-col-main > *,
  .player-grid > .profile-col-side > * {
    width: 100%;
  }

  .player-mobile-1 { order: -1; }

  .team-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .team-grid .profile-col-main,
  .team-grid .profile-col-side {
    display: contents;
  }

  .team-grid > .profile-col-main > *,
  .team-grid > .profile-col-side > * {
    width: 100%;
  }

  .team-mobile-1 { order: -1; }

  .profile-header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
  }

  .profile-stats-highlights {
    width: 100%;
    justify-content: center;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
  }
}

/* ── TRANSFER TIMELINE ── */

.transfer-timeline {
  display: flex;
  flex-direction: column;
}

.transfer-timeline-item {
  position: relative;
  padding-left: 1.6rem;
  padding-bottom: 1rem;
}

.transfer-timeline-item:last-child {
  padding-bottom: 0;
}

.transfer-timeline-dot {
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 2px var(--border);
  z-index: 1;
}

.transfer-timeline-dot-current {
  background: var(--green-primary);
  box-shadow: 0 0 0 2px var(--green-primary);
}

.transfer-timeline-dot-first {
  background: var(--text-muted);
  box-shadow: 0 0 0 2px var(--text-muted);
}

.transfer-timeline-line {
  position: absolute;
  left: 3px;
  top: 0.8rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.transfer-timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.transfer-timeline-team {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.transfer-team-logo {
  flex-shrink: 0;
}

.transfer-team-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.transfer-current-tag {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green-primary);
  background: var(--green-wash);
  border: 1px solid var(--green-pale);
  padding: 0.08rem 0.3rem;
  border-radius: 4px;
  line-height: 1.4;
}

/* Goals bar — prominent display of goals at each club */
.transfer-goals-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  padding: 0.05rem 0;
}

.transfer-goals-bar svg {
  color: var(--text-muted);
  opacity: 0.5;
  flex-shrink: 0;
}

.transfer-goals-count {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
}

.transfer-goals-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.transfer-goals-detail {
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Footer row: badge + date */
.transfer-timeline-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.transfer-badge {
  font-family: var(--font-display);
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

.transfer-badge-reg {
  background: rgba(45, 106, 79, 0.1);
  color: var(--green-primary);
}

.transfer-badge-transfer {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.transfer-timeline-date {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 500;
}
