/**
 * Profile Card & Photo Upload Styles
 * Enhanced profile card design with gamified esports aesthetic
 */

/* ============================================================================
   PROFILE CARD
   ============================================================================ */

.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
}

.ui-icon svg {
  width: 100%;
  height: 100%;
}

.profile-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.profile-card__main {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Photo Section */
.profile-card__photo-wrapper {
  flex-shrink: 0;
}

.profile-card__photo-container {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.profile-card__photo-container:hover {
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 4px 25px rgba(102, 126, 234, 0.3);
}

.profile-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card__initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

/* Photo Hover Overlay */
.profile-card__photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-card__photo-container:hover .profile-card__photo-overlay {
  opacity: 1;
}

.profile-card__photo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.profile-card__photo-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.profile-card__seeking-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 32px;
  height: 32px;
  background: #4CAF50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 3px solid #1a1a2e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: help;
}

/* Profile Info */
.profile-card__info {
  flex: 1;
  min-width: 0;
}

.profile-card__header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.profile-card__name {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Achievement Badges */
.profile-card__badges {
  display: flex;
  gap: 6px;
  align-items: center;
}

.profile-card__badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: help;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.profile-card__badge .ui-icon {
  width: 16px;
  height: 16px;
}

.profile-card__badge::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.profile-card__badge:hover {
  transform: scale(1.15) translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-card__badge--platinum {
  background: linear-gradient(135deg, #e0e0e0 0%, #a0a0a0 50%, #e0e0e0 100%);
  box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.profile-card__badge--platinum::after {
  border-color: rgba(192, 192, 192, 0.5);
}

.profile-card__badge--gold {
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 50%, #ffd700 100%);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.profile-card__badge--gold::after {
  border-color: rgba(255, 215, 0, 0.5);
}

.profile-card__badge--silver {
  background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 50%, #c0c0c0 100%);
  box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.profile-card__badge--silver::after {
  border-color: rgba(192, 192, 192, 0.5);
}

.profile-card__badge--bronze {
  background: linear-gradient(135deg, #cd7f32 0%, #a0522d 50%, #cd7f32 100%);
  box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

.profile-card__badge--bronze::after {
  border-color: rgba(205, 127, 50, 0.5);
}

/* Rating Display */
.profile-card__rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-card__score {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.profile-card__tier {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-card__tier--platinum {
  background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%);
  color: #333;
}

.profile-card__tier--gold {
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  color: #333;
}

.profile-card__tier--silver {
  background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
  color: #333;
}

.profile-card__tier--elite,
.profile-card__tier--silver-elite {
  background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
  color: #fff;
}

.profile-card__tier--bronze {
  background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
  color: #fff;
}

.profile-card__tier--lower-bronze {
  background: linear-gradient(135deg, #8d6e63 0%, #6d4c41 100%);
  color: #fff;
}

.profile-card__provisional {
  font-size: 12px;
  color: #9e9e9e;
  background: rgba(158, 158, 158, 0.15);
  padding: 2px 8px;
  border-radius: 12px;
  cursor: help;
}

/* Simplified Rating Display - Phase 1 */
.profile-card__rating-simple {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.profile-card__score-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-card__score {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
  line-height: 1;
}

.profile-card__tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
}

.profile-card__tier-badge .ui-icon {
  width: 20px;
  height: 20px;
}

/* Rank Confidence Meter */
.profile-card__confidence-meter {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.confidence-meter__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.confidence-meter__level {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 12px;
}

.confidence-meter__level--building {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.confidence-meter__level--unranked,
.confidence-meter__level--placement {
  color: #f97316;
  background: rgba(249, 115, 22, 0.16);
}

.confidence-meter__level--stable {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

.confidence-meter__level--proven {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
}

.confidence-meter__level--good {
  color: #eab308;
  background: rgba(234, 179, 8, 0.15);
}

.confidence-meter__level--great {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
}

.confidence-meter__bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.confidence-meter__bar-bg {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.confidence-meter__bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s ease, background-color 0.3s ease;
  position: relative;
}

.confidence-meter__bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.confidence-meter__bar-fill--building {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.confidence-meter__bar-fill--unranked,
.confidence-meter__bar-fill--placement {
  background: linear-gradient(90deg, #f97316 0%, #fb923c 100%);
}

.confidence-meter__bar-fill--stable {
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 100%);
}

.confidence-meter__bar-fill--proven {
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
}

.confidence-meter__bar-fill--good {
  background: linear-gradient(90deg, #eab308 0%, #facc15 100%);
}

.confidence-meter__bar-fill--great {
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
}

.confidence-meter__count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  white-space: nowrap;
  min-width: 65px;
  text-align: right;
}

.confidence-meter__hint {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.confidence-meter__hint:has(✓) {
  color: #22c55e;
}

.profile-card__verified-note {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.profile-card__recent-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.recent-form-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.recent-form-results {
  display: flex;
  gap: 4px;
}

.form-result {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.form-result.win {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.form-result.loss {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.form-result.draw {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.4);
}

/* Meta Info */
.profile-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.profile-card__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-card__meta-item svg {
  opacity: 0.7;
}

.profile-card__meta-item--link {
  color: #667eea;
  text-decoration: none;
  transition: color 0.2s ease;
}

.profile-card__meta-item--link:hover {
  color: #8b9dc3;
  text-decoration: underline;
}

.profile-card__bio {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}

/* Action Buttons */
.profile-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 100px;
}

.profile-card__btn svg {
  flex-shrink: 0;
}

.profile-card__btn--follow {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.profile-card__btn--follow:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.profile-card__btn--follow.following {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-card__btn--message {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-card__btn--message:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.profile-card__btn--partner {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
  text-decoration: none;
}

.profile-card__btn--partner:hover {
  background: rgba(76, 175, 80, 0.3);
}

.profile-card__btn--edit {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.profile-card__btn--edit:hover {
  background: rgba(255, 255, 255, 0.15);
}

.profile-card__btn--share {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-card__btn--share:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Compact Mode */
.profile-card--compact .profile-card__main {
  gap: 16px;
}

.profile-card--compact .profile-card__photo-container {
  width: 80px;
  height: 80px;
}

.profile-card--compact .profile-card__initials {
  font-size: 24px;
}

.profile-card--compact .profile-card__name {
  font-size: 20px;
}

.profile-card--compact .profile-card__score {
  font-size: 24px;
}

.profile-card--compact .profile-card__actions {
  flex-direction: row;
  flex-wrap: wrap;
}

.profile-card--compact .profile-card__btn {
  padding: 8px 12px;
  min-width: auto;
}

/* ============================================================================
   PHOTO UPLOAD MODAL
   ============================================================================ */

.photo-upload-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-upload-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.photo-upload-modal__content {
  position: relative;
  background: #1a1a2e;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.photo-upload-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-upload-modal__header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.photo-upload-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-upload-modal__close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.photo-upload-modal__body {
  padding: 24px;
}

/* Dropzone */
.photo-upload__dropzone {
  position: relative;
  border: 2px dashed rgba(102, 126, 234, 0.4);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.2s ease;
  background: rgba(102, 126, 234, 0.05);
}

.photo-upload__dropzone:hover,
.photo-upload__dropzone--dragover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.photo-upload__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.photo-upload__placeholder {
  pointer-events: none;
}

.photo-upload__placeholder svg {
  color: #667eea;
  margin-bottom: 12px;
}

.photo-upload__placeholder p {
  margin: 4px 0;
  color: #fff;
  font-size: 14px;
}

.photo-upload__hint {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 12px !important;
}

/* Preview */
.photo-upload__preview {
  text-align: center;
}

.photo-upload__preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 50%;
  border: 4px solid rgba(102, 126, 234, 0.3);
  margin-bottom: 20px;
  object-fit: cover;
}

.photo-upload__preview-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Buttons */
.photo-upload__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.photo-upload__btn--primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.photo-upload__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.photo-upload__btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.photo-upload__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.photo-upload__btn--danger {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.photo-upload__btn--danger:hover {
  background: rgba(244, 67, 54, 0.2);
}

/* Error Message */
.photo-upload__error {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 8px;
  color: #f44336;
  font-size: 13px;
}

.photo-upload__current {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

/* Spinner */
.photo-upload__spinner {
  display: inline-flex;
}

.photo-upload__spinner svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================================================
   TRUESKILL DETAILS SECTION
   ============================================================================ */

.trueskill-details {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.trueskill-details h4 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trueskill-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.trueskill-stat__label {
  width: 120px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.trueskill-stat__value {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trueskill-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.trueskill-bar__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.trueskill-bar__fill--skill {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.trueskill-bar__fill--certainty {
  background: linear-gradient(90deg, #4caf50 0%, #8bc34a 100%);
}

.trueskill-stat__number {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  min-width: 60px;
  text-align: right;
}

.trueskill-mu-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.trueskill-mu-display .mu-value {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.trueskill-confidence {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.trueskill-confidence strong {
  color: #fff;
}

.trueskill-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  cursor: help;
  position: relative;
}

.trueskill-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: #333;
  color: #fff;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 10;
  margin-bottom: 4px;
}

/* ============================================================================
   RESPONSIVE STYLES
   ============================================================================ */

@media (max-width: 768px) {
  .profile-card {
    padding: 16px;
  }
  
  .profile-card__main {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  
  .profile-card__photo-wrapper {
    margin: 0 auto;
  }
  
  .profile-card__info {
    width: 100%;
    text-align: center;
  }
  
  .profile-card__header-row {
    justify-content: center;
  }
  
  .profile-card__rating {
    justify-content: center;
  }

  .profile-card__score-row {
    justify-content: center;
  }

  .profile-card__confidence-meter {
    width: min(100%, 320px);
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .confidence-meter__label,
  .confidence-meter__bar-container {
    gap: 10px;
  }
  
  .profile-card__meta {
    justify-content: center;
  }
  
  .profile-card__actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }
  
  .profile-card__name {
    font-size: 24px;
  }
  
  .profile-card__score {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .profile-card {
    border-radius: 12px;
    padding: 18px 14px;
  }

  .profile-card__photo-container {
    width: 100px;
    height: 100px;
  }
  
  .profile-card__initials {
    font-size: 28px;
  }
  
  .profile-card__badge {
    width: 28px;
    height: 28px;
  }

  .profile-card__name {
    font-size: 23px;
    line-height: 1.25;
  }

  .profile-card__score {
    font-size: 30px;
  }

  .profile-card__confidence-meter {
    width: 100%;
  }

  .confidence-meter__label {
    align-items: center;
  }

  .profile-card__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-card__btn {
    width: 100%;
  }
  
  .photo-upload-modal__content {
    margin: 10px;
  }
  
  .photo-upload-modal__body {
    padding: 16px;
  }
  
  .photo-upload__dropzone {
    padding: 30px 16px;
  }
}

/* Player/team redesign containment overrides */
.profile-card {
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem),
    linear-gradient(135deg, #111827 0%, #151827 58%, #0b0f17 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  padding: clamp(1rem, 2.2vw, 1.4rem);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  max-width: 100%;
}
.profile-card::before {
  background: linear-gradient(90deg, var(--accent, #22d3ee), rgba(249, 115, 22, 0.9), transparent);
}
.profile-card__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(0.9rem, 2.2vw, 1.4rem);
  align-items: start;
  min-width: 0;
}
.profile-card__photo-container {
  width: clamp(82px, 12vw, 116px);
  height: clamp(82px, 12vw, 116px);
  border-width: 2px;
  border-color: rgba(34, 211, 238, 0.28);
}
.profile-card__info,
.profile-card__header-row,
.profile-card__rating-simple,
.profile-card__score-row,
.profile-card__confidence-meter,
.confidence-meter__label,
.confidence-meter__bar-container,
.profile-card__meta,
.profile-card__bio,
.profile-card__actions {
  min-width: 0;
  max-width: 100%;
}
.profile-card__name {
  font-size: clamp(1.35rem, 3.2vw, 2.15rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-shadow: none;
}
.profile-card__badges { flex: 0 0 auto; }
.profile-card__score-row {
  flex-wrap: wrap;
  gap: 0.55rem;
}
.profile-card__score {
  font-size: clamp(2rem, 5vw, 3.05rem);
  line-height: 0.95;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.profile-card__tier-badge {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.profile-card__confidence-meter {
  padding: 0.75rem 0.85rem;
  background: rgba(2, 6, 23, 0.34);
}
.confidence-meter__label {
  gap: 0.75rem;
  flex-wrap: wrap;
  line-height: 1.25;
}
.confidence-meter__level {
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: right;
  max-width: 100%;
}
.confidence-meter__bar-container { flex-wrap: nowrap; }
.confidence-meter__count {
  min-width: auto;
  flex: 0 0 auto;
}
.confidence-meter__hint,
.profile-card__verified-note {
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.profile-card__meta-item {
  min-width: 0;
  overflow-wrap: anywhere;
}
.profile-card__actions {
  align-self: start;
  flex-direction: row;
  flex-wrap: wrap;
}
.profile-card__btn {
  min-width: 0;
  white-space: nowrap;
  border-radius: 999px;
}
.profile-card__btn--share {
  background: rgba(34, 211, 238, 0.12);
  color: #e6faff;
  border: 1px solid rgba(34, 211, 238, 0.26);
}
.profile-card__btn--share:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.46);
}
.trueskill-details {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.trueskill-stat,
.trueskill-stat__value { min-width: 0; }
.trueskill-stat__label {
  flex: 0 0 min(120px, 38%);
  overflow-wrap: anywhere;
}
.trueskill-stat__number {
  flex: 0 0 auto;
  min-width: 3rem;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .profile-card__main {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .profile-card__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
@media (max-width: 520px) {
  .profile-card { padding: 1rem; border-radius: 18px; }
  .profile-card__main {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .profile-card__photo-wrapper { justify-self: start; }
  .profile-card__header-row { gap: 0.55rem; }
  .profile-card__name { font-size: clamp(1.45rem, 9vw, 2rem); }
  .profile-card__score { font-size: clamp(2.15rem, 14vw, 2.9rem); }
  .confidence-meter__bar-container { flex-wrap: wrap; }
  .confidence-meter__count { width: 100%; text-align: left; }
  .trueskill-stat { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .trueskill-stat__label { width: auto; flex-basis: auto; }
  .trueskill-stat__value { width: 100%; }
}

@media (max-width: 520px) {
  .profile-card__confidence-meter { overflow: visible; }
  .confidence-meter__label {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .confidence-meter__level {
    text-align: left;
    max-width: 100%;
  }
  .profile-card__verified-note {
    display: none;
  }
}

/* UltraQA density pass: desktop profile hero should feel premium, not billboard-sized. */
@media (min-width: 761px) {
  .profile-card {
    padding: clamp(0.95rem, 1.55vw, 1.15rem);
  }
  .profile-card__main {
    gap: clamp(0.85rem, 1.6vw, 1.15rem);
    align-items: center;
  }
  .profile-card__photo-container {
    width: clamp(78px, 8vw, 98px);
    height: clamp(78px, 8vw, 98px);
  }
  .profile-card__name {
    font-size: clamp(1.55rem, 2.45vw, 2rem);
  }
  .profile-card__rating-simple {
    gap: 0.35rem;
    margin-bottom: 0.45rem;
  }
  .profile-card__score {
    font-size: clamp(2.05rem, 3.5vw, 2.75rem);
  }
  .profile-card__confidence-meter {
    padding: 0.6rem 0.75rem;
    margin: 0.35rem 0;
  }
  .confidence-meter__hint,
  .profile-card__verified-note {
    font-size: 0.74rem;
  }
}
