/* ==========================================================================
   Profile Selection Page Styles
   ========================================================================== */

.profile-page {
  background-color: var(--color-netflix-black);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.profile-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1570579984753-dcd01e4cd92e?w=1920&h=1080&fit=crop') no-repeat 50% 42%/cover;
  transform-origin: 50% 40%;
  transform: scale(1.08);
  animation: couple-bg-drift 28s ease-in-out infinite alternate;
  will-change: transform;
  z-index: 0;
  pointer-events: none;
}

.profile-page::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    var(--color-netflix-black) 100%
  );
  z-index: 0;
  pointer-events: none;
}

@keyframes couple-bg-drift {
  0% {
    transform: scale(1.08) translate3d(-0.8%, -0.5%, 0);
  }
  50% {
    transform: scale(1.12) translate3d(0.6%, 0.4%, 0);
  }
  100% {
    transform: scale(1.1) translate3d(-0.2%, -0.6%, 0);
  }
}

.profile-header,
.profile-main,
.profile-footer {
  position: relative;
  z-index: 1;
}

/* Header */
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-xl) var(--spacing-lg);
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.25) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

.profile-icon-btn {
  padding: var(--spacing-sm);
  color: var(--color-netflix-white);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
  opacity: 1;
}

.profile-icon-btn:hover {
  transform: scale(1.1);
}

.profile-icon {
  width: 24px;
  height: 24px;
  display: block;
  color: var(--color-netflix-white);
  fill: currentColor;
}

.logo-link {
  display: inline-block;
}

.logo {
  width: 100px;
  height: auto;
}

/* Main Content */
.profile-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
}

.profile-title {
  font-size: var(--font-size-3xl);
  font-weight: 500;
  margin-bottom: var(--spacing-3xl);
  text-align: center;
}

/* Profile List */
.profile-list {
  display: flex;
  gap: var(--spacing-xl);
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--spacing-3xl);
}

/* Profile Item */
.profile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-link,
.profile-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  cursor: pointer;
  transition: transform var(--transition-normal);
}

.profile-link:hover,
.profile-add:hover {
  transform: scale(1.05);
}

.profile-link:hover .profile-avatar,
.profile-add:hover .profile-avatar {
  box-shadow: 0 0 0 3px var(--color-netflix-white);
}

/* Profile Avatar */
.profile-avatar {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 3px solid transparent;
  transition: box-shadow var(--transition-normal);
}

.profile-avatar--inner-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0) 48%,
    rgba(0, 0, 0, 0.2) 76%,
    rgba(0, 0, 0, 0.45) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.profile-avatar--inner-gradient .profile-image {
  position: relative;
  z-index: 0;
}

.profile-avatar--inner-gradient .profile-edit {
  z-index: 2;
}

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

.profile-avatar--kids .profile-image {
  object-fit: cover;
  filter: saturate(1.2);
}

.profile-avatar--add {
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.plus-icon {
  width: 50px;
  height: 50px;
  color: var(--color-netflix-gray);
}

.profile-edit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-sm);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.profile-link:hover .profile-edit {
  opacity: 1;
}

.edit-icon {
  width: 20px;
  height: 20px;
  color: var(--color-netflix-white);
}

/* Profile Name */
.profile-name {
  font-size: var(--font-size-base);
  color: var(--color-netflix-gray);
  transition: color var(--transition-normal);
}

.profile-link:hover .profile-name,
.profile-add:hover .profile-name {
  color: var(--color-netflix-white);
}

/* Manage Profiles Button */
.manage-profiles-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 1px solid var(--color-netflix-gray);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-netflix-light-gray);
  font-size: var(--font-size-base);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all var(--transition-normal);
}

.manage-profiles-btn:hover {
  border-color: var(--color-netflix-white);
  color: var(--color-netflix-white);
}

/* Footer */
.profile-footer {
  padding: var(--spacing-2xl);
  text-align: center;
}

.footer-content {
  max-width: 500px;
  margin: 0 auto;
}

.footer-text {
  color: var(--color-netflix-gray);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-sm);
}

.footer-link {
  color: var(--color-netflix-light-gray);
  font-size: var(--font-size-sm);
  text-decoration: underline;
  transition: color var(--transition-normal);
}

.footer-link:hover {
  color: var(--color-netflix-white);
}

/* Responsive */
@media (max-width: 768px) {
  .profile-page::before {
    background-position: 72% 42%;
    transform-origin: 72% 40%;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
  }
  
  .profile-title {
    font-size: var(--font-size-2xl);
  }
  
  .profile-list {
    gap: var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  .profile-page::before {
    background-position: 82% 42%;
    transform-origin: 82% 40%;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }
  
  .profile-name {
    font-size: var(--font-size-sm);
  }
}
