/* ==========================================================================
   DateMeet - Profile / My Page CSS
   User profile display, settings menu, detail page, templates
   ========================================================================== */

/* --------------------------------------------------------------------------
   Profile / "Me" Page Header
   -------------------------------------------------------------------------- */
.profile-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 24px;
  background: linear-gradient(160deg, #ff4757 0%, #ff6b7a 40%, #ffb3ba 100%);
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.profile-header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
  background: #f0f0f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.profile-header-avatar-wrap {
  position: relative;
  margin-bottom: 12px;
}

.profile-header-edit-avatar {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

.profile-header-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.profile-header-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.profile-header-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
}

.profile-header-id {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.profile-header-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.profile-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.profile-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

/* Activation badge in header */
.profile-activation-badge {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.profile-activation-badge.activated {
  background: rgba(46, 213, 115, 0.2);
  color: #fff;
  border: 1px solid rgba(46, 213, 115, 0.5);
}

.profile-activation-badge.not-activated {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Settings Menu List
   -------------------------------------------------------------------------- */
.menu-section {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin: 12px 12px 0;
  box-shadow: var(--shadow-sm);
}

.menu-section-title {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  padding: 10px 16px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg);
}

.menu-list {
  background: var(--card-bg);
}

.menu-item {
  height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: var(--text);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:active {
  background: var(--bg);
}

.menu-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  background: rgba(255, 71, 87, 0.08);
}

.menu-item-icon.icon-blue   { background: rgba(30, 144, 255, 0.1); }
.menu-item-icon.icon-green  { background: rgba(46, 213, 115, 0.1); }
.menu-item-icon.icon-yellow { background: rgba(255, 165, 0, 0.1); }
.menu-item-icon.icon-purple { background: rgba(147, 112, 219, 0.1); }
.menu-item-icon.icon-red    { background: rgba(255, 71, 87, 0.1); }
.menu-item-icon.icon-gray   { background: rgba(153, 153, 153, 0.1); }

.menu-item-text {
  flex: 1;
  margin-left: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.menu-item-value {
  font-size: 13px;
  color: var(--text-light);
  margin-right: 6px;
}

.menu-item-badge {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-right: 6px;
}

.menu-item-arrow {
  color: #ccc;
  font-size: 16px;
  flex-shrink: 0;
}

/* Danger item */
.menu-item.danger .menu-item-text {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   User Detail Page
   -------------------------------------------------------------------------- */
.user-detail-page {
  background: var(--bg);
  min-height: 100vh;
}

/* Photo slider */
.photo-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #1a1a1a;
  height: 100vw;
  max-height: 480px;
}

.photo-slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
  will-change: transform;
}

.photo-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}

.photo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.2s ease;
}

.slider-dot.active {
  width: 18px;
  background: #fff;
}

.photo-slider-count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

/* Profile detail info */
.profile-detail-card {
  background: #fff;
  margin: -16px 12px 0;
  border-radius: 16px;
  padding: 20px 16px 16px;
  position: relative;
  z-index: 10;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
}

.profile-detail-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.profile-detail-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.profile-detail-age {
  font-size: 18px;
  color: var(--text-medium);
  font-weight: 400;
}

.profile-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  font-size: 13px;
  flex-wrap: wrap;
}

.profile-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-detail-bio {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.6;
}

.profile-detail-interests {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-detail-section {
  margin: 0 12px 12px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.profile-detail-section-title {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Action bar (like + chat buttons) */
.action-bar {
  position: sticky;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
  z-index: 50;
}

.action-like-btn {
  flex: 1;
  height: 48px;
  border: 2px solid var(--primary);
  border-radius: 24px;
  background: #fff;
  color: var(--primary);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-like-btn.liked {
  background: var(--primary);
  color: #fff;
}

.action-like-btn:active {
  transform: scale(0.96);
}

.action-chat-btn {
  flex: 3;
  height: 48px;
  background: var(--primary);
  border: none;
  border-radius: 24px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-chat-btn:active {
  background: var(--primary-dark);
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   Edit Profile Page
   -------------------------------------------------------------------------- */
.edit-profile-page {
  background: var(--bg);
  min-height: 100vh;
}

.edit-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: #fff;
  margin-bottom: 12px;
}

.edit-avatar-preview {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  background: var(--bg);
  margin-bottom: 12px;
}

.edit-avatar-btn {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  background: rgba(255, 71, 87, 0.06);
  padding: 7px 16px;
  border-radius: 16px;
  border: none;
  transition: background 0.2s;
}

.edit-avatar-btn:active {
  background: rgba(255, 71, 87, 0.12);
}

.edit-form-section {
  background: #fff;
  margin-bottom: 12px;
  padding: 8px 16px;
}

.edit-field {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.edit-field:last-child {
  border-bottom: none;
}

.edit-field-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  min-width: 64px;
  flex-shrink: 0;
}

.edit-field-value {
  flex: 1;
  font-size: 14px;
  color: var(--text-medium);
  text-align: right;
}

.edit-field-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  text-align: right;
  outline: none;
  min-width: 0;
}

.edit-field-input::placeholder {
  color: #ccc;
}

.edit-field-arrow {
  color: #ccc;
  font-size: 14px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Profile Templates / Decoration
   -------------------------------------------------------------------------- */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}

.template-card {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.template-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.15);
}

.template-card-preview {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.template-card-name {
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
}

.template-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.template-card.selected .template-check {
  display: flex;
}

/* Template: Classic */
.template-classic {
  background: #fff;
  font-family: 'Georgia', 'Times New Roman', serif;
}

.template-classic .profile-card-name {
  color: #2c2c2c;
  font-size: 24px;
  text-align: center;
}

.template-classic .profile-card-divider {
  width: 40px;
  height: 2px;
  background: #c8a96e;
  margin: 8px auto;
}

/* Template: Magazine */
.template-magazine {
  background: #0d0d0d;
  color: #fff;
}

.template-magazine .profile-card-name {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.template-magazine .profile-card-accent {
  color: var(--primary);
}

/* Template: Minimal */
.template-minimal {
  background: #fafafa;
}

.template-minimal .profile-card-name {
  color: #1a1a1a;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 2px;
}

.template-minimal .profile-card-line {
  width: 1px;
  height: 40px;
  background: #ddd;
  margin: 8px auto;
}

/* Template: Sporty */
.template-sporty {
  background: linear-gradient(135deg, #ff4757 0%, #ff6348 100%);
  color: #fff;
}

.template-sporty .profile-card-name {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
}

.template-sporty .profile-card-tag {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}
