/* Profile Page Styles */

/* Profile Header Bar */
.profile-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 60px;
}

.profile-header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-header-bar h1 {
  font-size: 1.5rem;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
  cursor: pointer;
  margin: 0;
}

.close-profile-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.close-profile-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

.profile-container {
  margin-top: 80px;
  padding: 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 60px;
}

/* Profile Card */
.profile-card {
  position: relative;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(30, 30, 30, 0.95));
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
}

.btn-share-corner {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.btn-share-corner:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

.profile-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Avatar Section */
.avatar-section {
  flex-shrink: 0;
}

.avatar-wrapper {
  position: relative;
}

.avatar-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1a1a;
  border: 3px solid #000;
}

.avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  border: 3px solid #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.avatar-edit-btn:hover {
  transform: scale(1.1);
}

/* Profile Info */
.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.profile-username {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
}

.verified-badge {
  flex-shrink: 0;
}

.profile-display-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 20px 0;
}

/* Stats Row */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.2s;
}

.stat-item:hover {
  transform: translateY(-2px);
}

.stat-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border-2);
}

/* Bio */
.profile-bio {
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 15px 0;
  text-align: center;
}

.profile-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 20px;
  justify-content: center;
}

/* Action Buttons */
.profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-edit,
.btn-settings,
.btn-follow,
.btn-message,
.btn-more {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.btn-edit,
.btn-settings {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-2);
  color: #fff;
}

.btn-edit:hover,
.btn-settings:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-follow {
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  color: #fff;
  min-width: 140px;
}

.btn-follow:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.btn-follow.following {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-2);
}

.btn-message {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-2);
  color: #fff;
  padding: 12px 16px;
}

.btn-message:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-more {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-2);
  color: #fff;
  padding: 12px;
}

.btn-more:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Content Tabs */
.content-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 30px;
}

.content-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.content-tab:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.03);
}

.content-tab.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.content-tab svg {
  width: 22px;
  height: 22px;
}

.tab-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin-bottom: 40px;
}

.video-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: var(--border-2);
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-card:hover .video-overlay {
  opacity: 1;
}

.video-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.video-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-stat svg {
  width: 16px;
  height: 16px;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.empty-description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Edit Profile Modal */
.profile-edit-modal {
  max-width: 540px;
  width: 90%;
}

.profile-edit-modal h2 {
  color: var(--accent);
  margin-bottom: 24px;
  font-size: 1.8rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s;
}

.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 16px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  pointer-events: none;
}

.input-with-prefix input {
  padding-left: 32px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.btn-cancel,
.btn-save {
  flex: 1;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-2);
  color: #fff;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-save {
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  color: #fff;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

/* Responsive */
@media (max-width: 640px) {
  .profile-container {
    padding: 15px;
    margin-top: 70px;
  }

  .profile-card {
    padding: 30px 20px;
  }

  .avatar-ring {
    width: 110px;
    height: 110px;
  }

  .profile-avatar {
    width: 102px;
    height: 102px;
  }

  .profile-username {
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 6px;
  }

  .hide-mobile {
    display: none;
  }

  .content-tab {
    padding: 14px 12px;
  }

  .profile-actions {
    width: 100%;
  }

  .btn-edit,
  .btn-settings,
  .btn-follow {
    flex: 1 1 100%;
  }

  .btn-share-corner {
    width: 38px;
    height: 38px;
    top: 15px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .content-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .profile-card {
    padding: 20px 15px;
  }

  .stats-row {
    gap: 15px;
  }

  .profile-header-bar h1 {
    font-size: 1.3rem;
  }
}
