/* VirtuMate profile — в стиле главной и тарифов */

.profile-page .nav-profile.is-active {
  color: #fff;
}

.profile-main {
  min-height: 60vh;
  padding: 32px 0 56px;
}

.profile-loading[hidden],
.profile-guest[hidden],
.profile-app[hidden] {
  display: none !important;
}

.profile-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 360px;
  color: var(--text-muted);
}

.profile-loading__spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(6, 182, 212, 0.15);
  border-top-color: var(--brand-a);
  border-right-color: var(--brand-b);
  border-radius: 50%;
  animation: profile-spin 0.8s linear infinite;
}

@keyframes profile-spin {
  to { transform: rotate(360deg); }
}

/* --- Guest --- */
.profile-guest__card {
  max-width: 480px;
  margin: 48px auto 0;
  padding: 40px 32px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(6, 182, 212, 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.12), transparent 55%),
    linear-gradient(155deg, rgba(32, 32, 34, 0.98), rgba(18, 18, 20, 0.99));
}

.profile-guest__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--brand-a);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.28);
}

.profile-guest__error {
  margin: -8px 0 18px;
  color: #f87171;
  line-height: 1.5;
  font-size: 14px;
}

.profile-guest__error[hidden] {
  display: none !important;
}

/* --- Hero --- */
.profile-app {
  padding-top: 4px;
}

.profile-hero {
  position: relative;
  margin-bottom: 22px;
  overflow: hidden;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(6, 182, 212, 0.28);
  background:
    radial-gradient(circle at 0% 0%, rgba(6, 182, 212, 0.14), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.1), transparent 40%),
    linear-gradient(155deg, rgba(32, 32, 34, 0.98), rgba(18, 18, 20, 0.99));
}

.profile-hero__glow {
  position: absolute;
  top: -100px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18), transparent 68%);
  pointer-events: none;
}

.profile-hero__top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
}

.profile-hero__avatar {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(139, 92, 246, 0.22));
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.profile-hero__avatar-letter {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
}

.profile-hero__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.profile-hero__name {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.profile-hero__meta {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.profile-hero__since {
  margin: 6px 0 0;
  font-size: 13px;
  color: #707070;
}

.profile-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 168px;
}

.profile-hero__actions .btn {
  justify-content: center;
  text-align: center;
}

.profile-hero__stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-stat {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.profile-stat__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.profile-stat__label i {
  color: var(--brand-a);
  font-size: 13px;
}

.profile-stat__value {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.profile-stat__hint {
  margin-top: 4px;
  font-size: 11px;
  color: #707070;
}

.profile-stat--plan .profile-stat__value {
  font-size: 18px;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Panels --- */
.profile-panel {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  background: linear-gradient(155deg, rgba(32, 32, 34, 0.96), rgba(18, 18, 20, 0.98));
  margin-bottom: 18px;
}

.profile-panel--aside {
  display: block;
}

.profile-panel--muted {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(18, 18, 20, 0.72);
}

.profile-panel--soon {
  pointer-events: none;
  user-select: none;
}

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

.profile-soon-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
}

.profile-panel--soon .profile-panel__desc {
  opacity: 0.55;
}

.profile-soon-teaser {
  display: grid;
  gap: 10px;
  opacity: 0.28;
}

.profile-soon-teaser__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.profile-soon-teaser__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.profile-soon-teaser__lines {
  flex: 1;
  display: grid;
  gap: 8px;
}

.profile-soon-teaser__line {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.profile-soon-teaser__line--short {
  width: 38%;
}

.profile-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-panel__title {
  margin: 0;
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 800;
  line-height: 1.2;
}

.profile-panel__link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #d4d4d4;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.profile-panel__link:hover {
  color: #fff;
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.08);
}

.profile-panel__desc {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* --- Aside quick links --- */
.profile-quick {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-quick__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.profile-quick__item:hover {
  border-color: rgba(6, 182, 212, 0.32);
  background: rgba(6, 182, 212, 0.06);
  transform: translateY(-1px);
}

.profile-quick__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--brand-a);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.22);
  flex-shrink: 0;
}

.profile-quick__icon--violet {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.25);
}

.profile-quick__body strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.profile-quick__body span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --- Character tiles (как на главной) --- */
.profile-characters {
  margin-bottom: 18px;
}

.profile-characters__roster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.profile-characters__roster .character-tile {
  height: 100%;
}

.profile-characters__roster .character-tile__media {
  aspect-ratio: 4 / 4.2;
}

.profile-characters__roster .character-tile__name {
  font-size: 24px;
}

.profile-characters__roster .character-tile__tagline {
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Empty / custom --- */
.profile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 32px 24px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.16);
}

.profile-empty__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--brand-b);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.profile-empty__text {
  margin: 0;
  max-width: 420px;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 14px;
}

/* --- Footer --- */
.profile-foot {
  margin-top: 8px;
  padding-top: 8px;
}

.profile-logout-btn {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.profile-logout-btn:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

@media (max-width: 1024px) {
  .profile-characters__roster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-characters__roster .character-tile--featured {
    grid-column: 1 / -1;
  }

  .profile-characters__roster .character-tile--featured .character-tile__media {
    aspect-ratio: 16 / 9;
  }
}

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

  .profile-hero__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    min-width: 0;
  }

  .profile-hero__actions .btn {
    flex: 1;
  }

  .profile-hero__stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-main {
    padding-top: 20px;
  }

  .profile-hero {
    padding: 20px 18px;
  }

  .profile-hero__top {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-hero__avatar {
    margin: 0 auto;
  }

  .profile-panel {
    padding: 18px 16px;
  }

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

  .profile-panel__link {
    justify-content: center;
  }

  .profile-characters__roster {
    grid-template-columns: 1fr;
  }

  .profile-characters__roster .character-tile--featured {
    grid-column: auto;
  }

  .profile-characters__roster .character-tile--featured .character-tile__media {
    aspect-ratio: 4 / 4.2;
  }

  .profile-characters__roster .character-tile__actions {
    grid-template-columns: 1fr;
  }

  .profile-foot .profile-logout-btn {
    max-width: none;
  }
}
