/* ==================== ARTIST PROFILE v5 — Phase 2 ==================== */
/* Make It Yours: name editing, social editor, share, deep links */

.artist-profile-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 120px;
  min-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
  animation: artist-fade-in 0.4s ease-out;
}

@keyframes artist-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.artist-profile-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}

/* ====== Top Bar (Back + Share) ====== */
.artist-profile-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
}

.artist-back-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.artist-back-btn:hover {
  border-color: rgba(0, 210, 255, 0.3);
  color: rgba(0, 210, 255, 0.7);
}

.artist-share-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.artist-share-btn:hover {
  border-color: rgba(0, 210, 255, 0.3);
  color: rgba(0, 210, 255, 0.7);
}

/* ====== Hero — horizontal: avatar left, info right ====== */
.artist-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 0 0;
  position: relative;
}

.artist-hero::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ====== Avatar ====== */
.artist-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  border: 2px solid color-mix(in srgb, var(--accent) 15%, transparent);
  box-shadow: 0 0 0 3px rgba(10, 10, 15, 1), 0 0 30px color-mix(in srgb, var(--accent) 6%, transparent);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.artist-avatar:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  box-shadow: 0 0 0 3px rgba(10, 10, 15, 1), 0 0 40px color-mix(in srgb, var(--accent) 10%, transparent);
}

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

.artist-avatar-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 36px; font-weight: 700;
  color: rgba(0, 210, 255, 0.4);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.06), rgba(10, 10, 20, 0.9));
}

.artist-avatar-edit {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  opacity: 0; transition: opacity 0.2s;
  cursor: pointer; font-size: 18px; z-index: 2;
}

.artist-avatar:hover .artist-avatar-edit { opacity: 1; }

/* ====== Info ====== */
.artist-info { flex: 1; z-index: 1; }

.artist-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.artist-name {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 26px; font-weight: 700; color: #fff;
  margin: 0; letter-spacing: -0.03em;
}

/* Editable name — subtle hover affordance */
.artist-name-editable {
  cursor: text;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.artist-name-editable:hover {
  border-bottom-color: rgba(0, 210, 255, 0.2);
}

/* Name input (inline edit) */
.artist-name-input {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 26px; font-weight: 700; color: #fff;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(0, 210, 255, 0.4);
  outline: none;
  padding: 0 0 2px;
  margin: 0;
  letter-spacing: -0.03em;
  width: auto;
  min-width: 100px;
  max-width: 300px;
}

/* ====== Tier Badges ====== */
.artist-tier-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 6px; letter-spacing: 0.5px; text-transform: uppercase;
}

.artist-tier-badge.founding {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #d4af37;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.artist-tier-badge.pro {
  background: rgba(0, 210, 255, 0.06);
  border: 1px solid rgba(0, 210, 255, 0.2);
  color: rgba(0, 210, 255, 0.7);
}

.artist-tier-badge.studio {
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: rgba(139, 92, 246, 0.7);
}

/* ====== Accent Color System ====== */
/* ====== Accent Color System + Shell Override ====== */
.artist-profile-shell {
  --accent: rgba(0, 210, 255, 1);
  width: 100%;
}

/* ====== Meta ====== */
.artist-meta { margin-top: 6px; }

.artist-bio-inline {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px; color: rgba(255, 255, 255, 0.35);
  margin: 0; line-height: 1.5;
}

.artist-bio-placeholder {
  color: rgba(255, 255, 255, 0.15) !important;
  cursor: pointer; font-style: italic;
}
.artist-bio-placeholder:hover { color: var(--accent, rgba(0, 210, 255, 0.3)) !important; opacity: 0.3; }

.artist-meta-line {
  display: flex; gap: 12px; align-items: center; margin-top: 4px;
}

.artist-joined {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px; color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
}

.artist-activity {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px; color: var(--accent, rgba(0, 210, 255, 0.5));
  opacity: 0.5; letter-spacing: 0.5px;
}

.artist-bio-counter {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px; color: rgba(255, 255, 255, 0.15);
  margin-top: 4px; text-align: right; max-width: 500px;
}

/* ====== Stats ====== */
.artist-stats-inline { display: flex; gap: 20px; margin-top: 10px; }

.artist-stat { display: flex; align-items: baseline; gap: 5px; }

.artist-stat-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px; color: var(--accent, rgba(0, 210, 255, 0.75));
  opacity: 0.75;
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 10%, transparent);
}

.artist-stat-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px; color: rgba(255, 255, 255, 0.15);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ====== Actions ====== */
.artist-actions { display: flex; gap: 10px; margin-top: 10px; }

.artist-follow-btn {
  padding: 6px 20px; border-radius: 6px;
  font-family: 'Press Start 2P', monospace; font-size: 8px;
  cursor: pointer; transition: all 0.2s;
  background: rgba(0, 210, 255, 0.1);
  color: rgba(0, 210, 255, 0.9);
  border: 1px solid rgba(0, 210, 255, 0.2);
  text-transform: uppercase; letter-spacing: 1px;
}

.artist-follow-btn:hover {
  background: rgba(0, 210, 255, 0.18);
  border-color: rgba(0, 210, 255, 0.35);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.08);
  transform: translateY(-1px);
}

.artist-follow-btn.is-following {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
}

.artist-follow-btn.is-following:hover {
  border-color: rgba(255, 60, 60, 0.3);
  color: rgba(255, 60, 60, 0.7);
  background: rgba(255, 60, 60, 0.04);
}

.artist-edit-btn,
.artist-cancel-btn {
  padding: 6px 16px; border-radius: 6px;
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  cursor: pointer; background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.35);
  transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.5px;
}

.artist-edit-btn:hover { border-color: rgba(0, 210, 255, 0.2); color: rgba(0, 210, 255, 0.5); }
.artist-cancel-btn:hover { border-color: rgba(255, 60, 60, 0.2); color: rgba(255, 60, 60, 0.5); }

/* ====== Social Links (view mode) ====== */
.artist-social-links {
  display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}

.artist-social-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.25);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px; text-decoration: none; transition: all 0.2s;
}

.artist-social-link:hover {
  background: rgba(0, 210, 255, 0.04);
  border-color: rgba(0, 210, 255, 0.15);
  color: rgba(0, 210, 255, 0.6);
}

/* ====== Accent Color Picker ====== */
.accent-color-picker {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.accent-swatch {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.accent-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 0 10px currentColor;
}

.accent-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 12px currentColor;
  transform: scale(1.1);
}

.social-editor-section-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px; color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 6px;
}

/* ====== Social Links Editor (edit mode) ====== */
.artist-social-editor {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 500px;
}

.social-editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-editor-icon {
  width: 24px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.social-editor-input {
  flex: 1;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.social-editor-input:focus {
  border-color: rgba(0, 210, 255, 0.25);
}

.social-editor-input::placeholder {
  color: rgba(255, 255, 255, 0.12);
}

/* ====== Bio Edit ====== */
.artist-bio-edit {
  display: none;
  width: 100%; max-width: 500px; min-height: 50px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px; line-height: 1.5;
  resize: vertical; outline: none; margin-top: 6px;
}

.artist-bio-edit:focus { border-color: rgba(0, 210, 255, 0.35); }
.artist-bio-edit.active { display: block; }

/* ====== Divider ====== */
.artist-divider {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 80%);
  margin: 20px 0 16px;
}

/* ====== Tracks Header (title + sort) ====== */
.artist-tracks-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}

.artist-section-header {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px; color: rgba(255, 255, 255, 0.15);
  text-transform: uppercase; letter-spacing: 2px;
  margin: 0;
}

.artist-track-sort {
  display: flex; gap: 4px;
}

.track-sort-btn {
  background: none; border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px; padding: 4px 10px;
  font-family: 'Press Start 2P', monospace; font-size: 6px;
  color: rgba(255, 255, 255, 0.15); cursor: pointer;
  transition: all 0.2s; text-transform: uppercase;
}

.track-sort-btn:hover {
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
}

.track-sort-btn.active {
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent, rgba(0, 210, 255, 0.6));
  opacity: 0.6;
}

/* ====== Tracks ====== */
.artist-tracks { padding-top: 0; }
.artist-tracks.ygo-card-grid { justify-content: start; }

/* ====== Empty State ====== */
.artist-empty {
  text-align: center; padding: 40px 20px;
  color: rgba(255, 255, 255, 0.12);
  font-family: 'Press Start 2P', monospace; font-size: 8px;
}

/* Own card: hide report + redundant artist name */
.profile-own-card .ygo-card-report,
.profile-own-card .ygo-card-artist {
  display: none !important;
}

/* Pull card-space up when profile is active — override discover layout */
.card-space.profile-active {
  top: 64px !important;
  padding-top: 8px !important;
}

/* ====== Header Dropdown Avatar Overlay ====== */
.dropdown-avatar-wrapper {
  position: relative;
}

.dropdown-avatar-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
  font-size: 16px;
  z-index: 2;
}

.dropdown-avatar-wrapper:hover .dropdown-avatar-overlay {
  opacity: 1;
}

/* Player artist name link */
#player-track-artist:hover {
  color: var(--accent, rgba(0, 210, 255, 0.8)) !important;
  text-decoration: underline;
}

.artist-avatar-input { display: none; }
