html,
body.profile-page {
  width: 100%;
  height: auto !important;
  min-height: 100vh;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: #000;
  color: #fff;
}

body.profile-modal-open {
  overflow: hidden !important;
}

.profile-main {
  width: 100%;
  min-height: 100vh;
  padding-bottom: 90px;
  background: #000;
}

.profile-box {
  padding: 22px 14px 12px;
  text-align: center;
}

.profile-header img {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  display: block;
  margin: 0 auto 12px;
}

.profile-header h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.profile-header p {
  font-size: 14px;
  color: #bbb;
  line-height: 1.35;
  margin-bottom: 14px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 14px 0;
}

.profile-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-stats b {
  font-size: 17px;
}

.profile-stats span {
  font-size: 12px;
  color: #aaa;
  margin-top: 3px;
}

.profile-buttons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.profile-buttons button {
  flex: 1;
  margin: 0;
}

.profile-tabs {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #000;
  position: sticky;
  top: 0;
  z-index: 20;
}

.profile-tabs button {
  flex: 1;
  margin: 0;
  background: #222;
  color: #fff;
}

.profile-tabs button.active {
  background: #16c784;
  color: #000;
}

.profile-videos {
  width: 100%;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 0 2px 90px;
}

.profile-video-item {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #111;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.profile-video-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Keep hidden items visible only by tab, not by CSS. */
.profile-empty {
  padding: 40px 15px;
  text-align: center;
  color: #aaa;
}

.profile-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  flex-direction: column;
}

.profile-video-modal video {
  flex: 1;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.profile-video-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 28px;
  z-index: 10;
  padding: 0;
  margin: 0;
}

.profile-video-caption {
  padding: 10px 12px 0;
  background: #111;
  color: #ddd;
  font-size: 14px;
}

.profile-video-actions {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #111;
}

.profile-video-actions button {
  flex: 1;
  margin: 0;
}

.profile-edit-box {
  padding: 4px 0;
}

.profile-edit-box h2 {
  margin-bottom: 10px;
}

.profile-edit-box input,
.profile-edit-box textarea {
  background: #222;
  color: #fff;
  margin-top: 10px;
}

.profile-edit-box textarea {
  min-height: 90px;
  resize: vertical;
}

@media (min-width: 700px) {
  .profile-main {
    max-width: 620px;
    margin: 0 auto;
  }
}
