.profiles-page {
  min-height: 100dvh;
  background: #17171B;
  color: #fff;
  overflow: hidden;
}

.profiles-header {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 2;
}

.profiles-logo {
  display: block;
  width: 84px;
  height: auto;
}

.profiles-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-4vh);
}

.profiles-title {
  margin: 0 0 52px;
  font-size: clamp(28px, 2.4vw, 42px);
  line-height: 1.1;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
  text-align: center;
}

.profiles-list {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(28px, 4vw, 56px);
}

.profile-card {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-avatar-wrap {
  width: clamp(104px, 9vw, 148px);
  aspect-ratio: 1;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
  border: none;
  position: relative;
  transition: transform 0.05s ease;
}

.profile-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 4px #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.12s ease;
}

.profile-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.profile-name {
  margin-top: 18px;
  font-size: clamp(18px, 1.35vw, 24px);
  line-height: 1.15;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  transition: color 0.12s ease;
}

.profile-card:hover .profile-avatar-wrap,
.profile-card:focus-visible .profile-avatar-wrap {
  transform: scale(1.08);
}

.profile-card:hover .profile-avatar-wrap::after,
.profile-card:focus-visible .profile-avatar-wrap::after {
  opacity: 1;
}

.profile-card:hover .profile-name,
.profile-card:focus-visible .profile-name {
  color: #fff;
}

.profile-card:focus-visible {
  outline: none;
}

.profile-login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(10px);
}

.profile-login-backdrop[hidden] {
  display: none;
}

.profile-login-modal {
  position: relative;
  width: min(360px, 100%);
  padding: 34px 30px 30px;
  border-radius: 24px;
  background: rgba(28, 28, 34, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.profile-login-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.profile-login-close:hover {
  color: #fff;
}

.profile-login-avatar-wrap {
  width: 92px;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border-radius: 999px;
  overflow: hidden;
  border: 3px solid #fff;
  background: rgba(255, 255, 255, 0.08);
}

.profile-login-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-login-title {
  margin: 0 0 24px;
  text-align: center;
  font-size: 24px;
  line-height: 1.15;
  color: #fff;
}

.profile-login-label {
  margin: 0 0 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.profile-login-input {
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
}

.profile-login-input:focus {
  border-color: rgba(255, 255, 255, 0.72);
}

.profile-login-error {
  margin: 10px 0 0;
  font-size: 13px;
  color: #ff7a7a;
}

.profile-login-submit {
  height: 46px;
  margin-top: 22px;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.profile-login-submit:hover {
  background: rgba(255, 255, 255, 0.88);
}

@media (max-width: 720px) {
  .profiles-header {
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
  }

  .profiles-logo {
    width: 80px;
  }

  .profiles-content {
    transform: translateY(-2vh);
    padding: 0 24px;
  }

  .profiles-title {
    margin-bottom: 42px;
  }

  .profiles-list {
    gap: 28px;
    flex-wrap: wrap;
  }

  .profile-avatar-wrap {
    width: 112px;
  }
}