/**
 * PROFILE MODAL — стили.
 */

.profile-window {
  width: min(94vw, 440px);
  max-height: 94vh;
}

.profile-body {
  padding: 12px;
  align-items: stretch;
  gap: 10px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  flex-shrink: 0;
  min-height: 76px;
  background: linear-gradient(135deg, #1a1030 0%, #0f0818 100%);
  border: 2px solid #3a2050;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(180, 100, 255, 0.15), transparent 70%);
  pointer-events: none;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  border: 2px solid var(--outline);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}

.profile-avatar svg {
  display: block;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

.profile-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.profile-name {
  font-size: 14px;
  color: var(--text);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-league {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
  text-shadow: 0 0 8px currentColor;
}

.profile-league-progress {
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Статус сохранения */
.profile-save-status {
  text-align: center;
  padding: 4px 8px;
  font-size: 7px;
  letter-spacing: 1px;
  border: 1px solid var(--outline);
  text-transform: uppercase;
}

.profile-save-status.cloud {
  color: var(--success);
  border-color: rgba(64, 192, 96, 0.4);
  background: rgba(64, 192, 96, 0.05);
}

.profile-save-status.local {
  color: var(--text-dim);
  border-color: var(--outline-lo);
}

/* Валюты */
.profile-currencies {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.profile-currency {
  background: var(--bg-deep);
  border: 2px solid var(--outline);
  padding: 6px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.profile-currency-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
}

.profile-currency-icon svg {
  display: block;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
  filter: drop-shadow(0 0 3px rgba(232, 184, 64, 0.4));
}

.profile-currency-label {
  font-size: 7px;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.profile-currency-value {
  font-size: 11px;
  color: var(--accent);
  text-shadow: 1px 1px 0 #000;
  letter-spacing: 0.5px;
}

/* Заголовки секций */
.profile-section-title {
  font-size: 9px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--outline);
}

/* Список строк */
.profile-row-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: var(--bg-deep);
  border: 1px solid var(--outline-lo);
  font-size: 9px;
  letter-spacing: 0.5px;
}

.profile-row-label {
  color: var(--text-dim);
}

.profile-row-value {
  color: var(--text);
  text-align: right;
  font-size: 10px;
}

.profile-row-value.max {
  color: var(--accent);
  text-shadow: 0 0 4px rgba(232, 184, 64, 0.5);
}

/* Прогресс-бары */
.profile-progress-row {
  padding: 8px;
  background: var(--bg-deep);
  border: 1px solid var(--outline-lo);
  margin-bottom: 4px;
}

.profile-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.profile-progress-label span:last-child {
  color: var(--text);
}

.profile-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--outline-lo);
  border: 1px solid var(--outline);
  overflow: hidden;
}

.profile-progress-fill {
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 4px rgba(232, 184, 64, 0.4);
  transition: width 0.3s;
}

.profile-progress-fill.skin {
  background: var(--info);
  box-shadow: 0 0 4px rgba(64, 160, 224, 0.4);
}

/* Кнопки действий */
.profile-actions {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-action-btn {
  width: 100%;
  padding: 10px;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.1s, background 0.12s;
  border: 2px solid;
  text-transform: uppercase;
}

.profile-action-btn.copy {
  background: var(--bg-panel);
  color: var(--info);
  border-color: var(--info);
}

.profile-action-btn.invite {
  background: linear-gradient(135deg, rgba(232, 184, 64, 0.18), rgba(232, 184, 64, 0.04));
  color: var(--accent);
  border-color: var(--accent);
}

.profile-action-btn.stars {
  background: linear-gradient(135deg, rgba(160, 80, 200, 0.22), rgba(232, 184, 64, 0.10));
  color: #e8c890;
  border-color: #7a5aa0;
}

.profile-action-btn.invite:active,
.profile-action-btn.stars:active {
  transform: scale(0.98);
  filter: brightness(1.2);
}

.profile-action-btn.copy:active {
  transform: scale(0.97);
  background: var(--bg-panel-2);
}

.profile-action-btn.copy.copied {
  background: var(--success);
  color: var(--bg-deep);
  border-color: var(--success);
}

.profile-action-btn.copy.error {
  background: var(--crit);
  color: #fff;
  border-color: var(--crit);
}

.profile-action-btn.reset {
  background: transparent;
  color: var(--crit);
  border-color: var(--crit);
}

.profile-action-btn.reset:active {
  transform: scale(0.97);
  background: rgba(224, 64, 64, 0.15);
}

/* Разработчик */
.profile-developer {
  margin-top: 12px;
  padding: 8px;
  text-align: center;
  font-size: 7px;
  color: var(--text-mute);
  letter-spacing: 1px;
  border-top: 1px solid var(--outline-lo);
}

.profile-dev-link {
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.15s;
  border-bottom: 1px dotted var(--text-dim);
  padding-bottom: 1px;
}

.profile-dev-link:hover,
.profile-dev-link:active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}