.profile-page {
  max-width: 1080px;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.profile-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.profile-sidebar {
  position: sticky;
  top: 0;
}

.profile-side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-side-nav__link {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0.65rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.profile-side-nav__link:hover,
.profile-side-nav__link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.profile-side-nav__divider {
  height: 1px;
  margin: 0.35rem 0;
  background: rgba(255, 255, 255, 0.08);
}

.profile-main {
  min-width: 0;
}

.profile-header {
  background: linear-gradient(145deg, rgba(22, 22, 30, 0.96), rgba(14, 14, 20, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.profile-header__top {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.profile-header__avatar img,
.profile-header__avatar-fallback {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.profile-header__avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.profile-header__name {
  color: #fff;
  font-family: var(--cz-font-body);
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 0.15rem;
}

.profile-header__username,
.profile-header__location {
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}

.profile-header__bio {
  color: rgba(255, 255, 255, 0.82);
  margin: 0.35rem 0 0;
  white-space: pre-wrap;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-top: 1rem;
}

.profile-stat {
  text-align: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  padding: 0.35rem 0.25rem;
  border-radius: 8px;
}

.profile-stat strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}

.profile-stat.is-active {
  background: rgba(255, 255, 255, 0.06);
}

.profile-social-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.profile-social-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.profile-social-stat strong {
  color: #fff;
}

.profile-create-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.profile-create-action {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.profile-create-action:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.profile-actions form {
  margin: 0;
}

.profile-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.profile-action--primary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}

.profile-tabs {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(7, 7, 12, 0.94);
  padding: 0.5rem 0 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

.profile-tabs::-webkit-scrollbar {
  display: none;
}

.profile-search {
  display: flex;
  gap: 0.5rem;
}

.profile-search .form-control {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.profile-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.profile-chat-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.profile-chat-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  text-decoration: none;
}

.profile-chat-row__body strong,
.profile-chat-row__body small {
  display: block;
}

.profile-chat-row__body strong {
  color: #fff;
}

.profile-chat-row__body small {
  color: rgba(255, 255, 255, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chat-row__badge {
  min-width: 22px;
  height: 22px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--cz-accent-hot);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-saved-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-modal-open {
  overflow: hidden;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.profile-modal.is-open {
  display: flex;
}

.profile-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(5px);
}

.profile-modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 2rem));
  overflow: auto;
  border-radius: 16px;
  background: #202026;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.profile-modal__header,
.profile-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
}

.profile-modal__header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-modal__footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-modal__header h2 {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.profile-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.profile-create-form {
  display: grid;
  gap: 0.85rem;
}

.profile-create-form > textarea,
.profile-create-form > .form-control {
  margin: 0 1rem;
  width: calc(100% - 2rem);
}

.profile-create-form textarea {
  min-height: 112px;
  background: transparent;
  border: none;
  color: #fff;
  resize: vertical;
}

.profile-create-form textarea:focus {
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.profile-create-form__drop {
  display: grid;
  place-items: center;
  gap: 0.6rem;
  min-height: 260px;
  margin: 1rem 1rem 0;
  padding: 1.25rem;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.profile-create-form__upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 2px dashed rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.profile-create-form__drop input[type="file"] {
  width: auto;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
}

.profile-tab {
  flex: 0 0 auto;
  text-align: center;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.55);
  padding: 0.25rem 0;
  border-radius: 0;
  white-space: nowrap;
}

.profile-tab.is-active {
  background: transparent;
  color: var(--cz-accent-hot);
}

.profile-post-grid,
.profile-episode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.profile-post-cell,
.profile-episode-cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.profile-post-cell img,
.profile-episode-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-post-cell__text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
}

.profile-post-cell__empty,
.profile-episode-cell__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
}

.profile-post-cell__likes {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.profile-episode-cell__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.35rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.profile-series-carousel {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.profile-series-carousel__item {
  flex: 0 0 84px;
  text-decoration: none;
  color: #fff;
}

.profile-series-carousel__item img,
.profile-series-carousel__empty {
  display: block;
  width: 84px;
  height: 112px;
  border-radius: 9px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-series-carousel__empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-series-carousel__item span:last-child {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.2;
}

.thought-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.thought-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.thought-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
  width: 100%;
}

.thought-card__meta strong {
  color: #fff;
}

.thought-card__meta span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.82rem;
}

.thought-card__text {
  color: rgba(255, 255, 255, 0.88);
  white-space: pre-wrap;
  margin: 0 0 0.5rem;
}

.thought-card__image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.thought-card__stats {
  display: flex;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.82rem;
  font-weight: 600;
}

.thought-compose textarea,
.thought-compose input[type="file"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.thought-card__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.thought-card__actions form {
  margin: 0;
}

.thought-card__action {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.thought-card__action.is-active {
  color: #ff6b8a;
}

.thought-card__delete {
  margin-left: auto;
}

.thought-card__delete button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  cursor: pointer;
}

.thought-comments {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.thought-comment {
  padding: 0.45rem 0;
}

.thought-comment__head {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
  margin-bottom: 0.2rem;
}

.thought-comment__head strong {
  color: #fff;
  font-size: 0.85rem;
}

.thought-comment__head span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.thought-comment__head form {
  margin-left: auto;
}

.thought-comment p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  white-space: pre-wrap;
}

.thought-comment__delete,
.thought-comment__like {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  padding: 0;
  cursor: pointer;
}

.thought-comment__like.is-active {
  color: #ff6b8a;
}

.thought-comment-form textarea {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.profile-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: rgba(255, 255, 255, 0.45);
}

.profile-empty__action {
  display: inline-block;
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  text-decoration: none;
}

.profile-empty__action:hover {
  color: #fff;
}

.post-detail-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
}

.post-detail-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.post-detail-card__header strong {
  color: #fff;
  display: block;
}

.post-detail-card__text {
  color: rgba(255, 255, 255, 0.88);
  white-space: pre-wrap;
}

.post-detail-card__image {
  width: 100%;
  border-radius: 12px;
  margin: 0.75rem 0;
}

.post-detail-card__share {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
  margin: 0.75rem 0;
}

.post-detail-card__share img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 6px;
}

.post-detail-card__share strong {
  color: #fff;
  display: block;
}

.post-detail-card__share span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

.post-detail-card__actions {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.post-detail-card__comments h2 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.post-comment {
  padding: 0.65rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.post-comment__head {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.post-comment__head strong {
  color: #fff;
}

.post-comment__head span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
}

.post-comment p {
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  white-space: pre-wrap;
}

.post-comment__delete {
  margin-top: 0.25rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  padding: 0;
  cursor: pointer;
}

.follow-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.follow-list__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.follow-list__avatar img,
.follow-list__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.follow-list__meta strong {
  display: block;
  color: #fff;
}

.post-comment__delete.is-active {
  color: #ff6b8a;
}

.chat-bubble__tools button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  margin-left: 0.35rem;
}

@media (min-width: 768px) {
  .profile-page {
    max-width: 1080px;
  }
}

@media (max-width: 767px) {
  .profile-shell {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    position: static;
  }

  .profile-side-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-side-nav__divider {
    display: none;
  }
}
