/* Modern Profile Page Styles */
#profile-page {
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
  background: transparent;
}


.stat-card {
  background: var(--card-background);
  background-image: var(--glass-gradient);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  transition: none !important;
  overflow: hidden;
  min-height: 120px;
  width: 100;
  max-width: 1800px;
  transform: none !important;
  cursor: default !important;
}

.stat-card::before {
  display: none;
}

.stat-card:hover {
  transform: none !important;
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color);
}

.stat-card:active {
  transform: none !important;
  transition: none !important;
}

/* إزالة تأثير الإضاءة المتحركة في الوضع الليلي */
.dark-theme .stat-card::before {
  display: none !important;
  opacity: 0 !important;
  animation: none !important;
}

.dark-theme .stat-card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
}

.mini-logo, .balance-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background-color: transparent;
  content: url("accessoire-app.png");
  filter: none;
  flex-shrink: 0;

}

/* إزالة الظل من اللوجو في الوضع الليلي */
.dark-theme .mini-logo,
.dark-theme .balance-logo {
  filter: none;
}

.profile-name-container {
  z-index: ;
  border-radius: 20px;
  padding: 20px 25px 15px;
  background: var(--card-background);
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  position: relative;
  transition: none !important;
  margin-bottom: 15px;
  transform: none !important;
  cursor: default !important;
  overflow: visible;
}

.profile-name-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  border-radius: 25px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.profile-name-container::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;

  background-size: 300% 300%;
  border-radius: 27px;
  z-index: -1;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.profile-name-container:hover {
  transform: none !important;

}

.profile-name-container:hover::before {
  opacity: 1;
}

.profile-name-container:active {
  transform: none !important;

  outline: none !important;
}

.profile-name-container:focus {
  transform: none !important;

  outline: none !important;
}

.profile-name-container:focus-visible {
  transform: none !important;

  outline: none !important;
}

/* Avatar Container - centered at the top */
.avatar-container {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  order: 1;
  z-index: 100;
  margin-bottom: -10px;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  -webkit-touch-callout: none;
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.avatar-container:hover .profile-avatar {
  /* No hover effect - clean look */
}

.camera-icon-badge {
  -webkit-tap-highlight-color: transparent;
  outline: none;
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(74, 144, 226, 0.4);
  z-index: 1000;
}

.camera-icon-badge i {
  color: white;
  font-size: 12px;
}

.camera-icon-badge:hover {
  background: rgba(0, 0, 0, 0.9);
}

.photo-options-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--card-background);
  border-radius: 12px;
  width: 215px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(-5px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99999;
  overflow: hidden;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}



.photo-options-menu.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.photo-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  background: transparent;
  min-height: 48px;
  touch-action: manipulation;
  white-space: nowrap;
}

.photo-option:last-child {
  border-bottom: none;
}

.photo-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(74, 144, 226, 0.1);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.photo-option:hover::before {
  opacity: 1;
}

.photo-option:hover {
  color: var(--primary-color);
  background: rgba(74, 144, 226, 0.05);
}

.photo-option:active {
  background: rgba(74, 144, 226, 0.15);
  transform: scale(0.98);
}

.photo-option:active::before {
  opacity: 1;
}

.photo-option i {
  font-size: 16px;
  width: 18px;
  text-align: center;
  color: var(--primary-color);
  flex-shrink: 0;
}

.photo-option.delete {
  color: #e53e3e;
}

.photo-option.delete i {
  color: #e53e3e;
}

.photo-option.delete:hover {
  background: rgba(229, 62, 62, 0.08);
  color: #e53e3e;
}

.photo-option.delete:active {
  background: rgba(229, 62, 62, 0.12);
}



.profile-text-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  order: 2;
  flex: 1;
  align-items: center;
  text-align: center;
  width: 100%;
  z-index: 10;
  position: relative;
}



.profile-name-display {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-color);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 4px 12px;
  border-radius: 16px;

  border: none !important;
  width: fit-content;
  max-width: auto;
  position: relative;

  letter-spacing: 0.3px;
  transition: none !important;
  top: px;
   box-shadow: none !important;
  background: none !important;
}

.profile-name-display:hover {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.profile-name-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: none !important;
  border-radius: 8px;
  opacity: 0;
  transition: none !important;
  z-index: -1;
  border: none !important;
  transform: none !important;
}

.profile-name-display:hover::before {
  opacity: 1;
   background: none !important;
}

.profile-name-display:active {
  background: none !important;
}

.profile-name-display .mini-logo {
  width: 20px;
  height: 20px;
  margin-right: 0;
  filter: none !important;
  transition: none !important;
   background: none !important;
  box-shadow: none !important;
}

.profile-name-edit {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  position: relative;
  top: 15px;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0;
  width: auto;
  min-width: 200px;
  max-width: 250px;
  margin-bottom: 5px;
  display: none;
  transition: all 0.3s ease;
  text-align: center;

}

.profile-name-edit.active {
  display: inline-block;
}

.profile-name-display.editing {
  display: none;
}

.profile-name-display.hidden {
  display: none;
}

.profile-name-edit:focus {
  outline: none;
  border-color: var(--primary-color);

  transform: translateY(-1px);
}

.profile-member-since {
  font-size: 0.7rem;
  color: var(--light-text);
  text-align: center;
  position: relative;
  top: -15px;
  opacity: 0.8;
  font-weight: 500;
  display: block !important;
  visibility: visible !important;
}

.dark-theme .profile-member-since {
  color: var(--light-text);
  opacity: 0.9;
  display: block !important;
  visibility: visible !important;
}

/* Profile menu container */
.profile-menu-container {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 101;
  display: block;

}


/* Three dots menu button */
.profile-menu-btn {
  background: none;
  border: 1px solid rgba(74, 144, 226, 0.3);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--primary-color);
  font-size: 10px;
  padding: 0;
}

.profile-menu-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(74, 144, 226, 0.4);
  border-color: var(--primary-color);
}

.profile-menu-btn:active {
  transform: scale(0.95);
}

/* Profile dropdown menu */
.profile-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-width: 218px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1002;
  margin-top: 4px;
  backdrop-filter: blur(10px);
}

.profile-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Profile menu option */
.profile-menu-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
  user-select: none;
}

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

.profile-menu-option:hover {
  background: rgba(74, 144, 226, 0.08);
  color: var(--primary-color);
}

.profile-menu-option:active {
  background: rgba(74, 144, 226, 0.12);
  transform: scale(0.98);
}

.profile-menu-option i {
  font-size: 12px;
  width: 14px;
  text-align: center;
  color: var(--primary-color);
  flex-shrink: 0;
}









.profile-edit-buttons {
  display: none;
  flex-direction: row;
  gap: 10px;
  margin-top: 15px;
  animation: slideInUp 0.3s ease-out;
  justify-content: center;
}

/* Hide user name label when editing - controlled by JavaScript */
#user-name-label.hidden-during-edit {
  display: none;
}


/* Hide member since date during profile editing */
.profile-name-container.editing #profile-member-since {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* إخفاء تاريخ العضوية عند تعديل الاسم */
#profile-member-since.editing-mode {
  display: none !important;
}

/* إظهار تاريخ العضوية في الوضع العادي */
#profile-member-since {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.save-changes-btn, .cancel-changes-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.save-changes-btn {
  background: #28a745;
  color: white;
}

.save-changes-btn:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.cancel-changes-btn {
  background: #6c757d;
  color: white;
}

.cancel-changes-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.save-changes-btn:active, .cancel-changes-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Hidden Input */
#profile-image-upload {
  display: none;
}




/* Profile Values - Inline with Labels */
#profile-coins {
  font-weight: 800 !important;
  font-size: 1.2rem !important;

  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  word-break: break-word;
  line-height: 1.2;
  flex-shrink: 0;
}

#profile-referral-code {
  font-weight: 600 !important;
  font-size: 1rem !important;
  font-family: 'Courier New', monospace;
  background: linear-gradient(135deg, var(--secondary-color), #f0a06b) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  word-break: break-all;
  line-height: 1.2;
  flex-shrink: 0;
}


#theme-dim {
  color: #6366f1;
}

#theme-brighten {
  color: #f59e0b;
}




.dark-theme .theme-btn {
 background: transparent;
}

.dark-theme #theme-dim {
  color: #818cf8;
}

.dark-theme #theme-brighten {
  color: #fbbf24;
}



.dark-theme .profile-name-display.hidden {
  display: none;
}







/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  z-index: 0 !important;
  position: relative;

}

.stat-cards {
  background: var(--card-background);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  min-height: 120px;
  height: 120px;
  z-index: 0 !important;
  transition: none !important;
  transform: none !important;
  cursor: default !important;
}

.stat-card {
  background: var(--card-background);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  transition: none !important;
  min-height: 120px;
  height: 120px;
  z-index: 1 !important;
  transform: none !important;
  cursor: default !important;
}

.stat-card:hover {
  transform: none !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.stat-icons .share-links {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  color: #d06d34;
  background: none;
  box-shadow: none;
  left: -4px !important;
}

#profile-page .balance-card .stat-icon {
  background: #857891;
  color: white;
}

#profile-page .referral-card .stat-icon .share-links{
  background: linear-gradient(135deg, var(--secondary-color), #d06d34);
  color: white;
}


#profile-page .mini-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  filter: none;
  margin-left: -2px;
}

/* إزالة الضوء من اللوجو في الوضع الليلي */
.dark-theme #profile-page .mini-logo {
  filter: none !important;
  box-shadow: none !important;
}

.stat-content {
  flex: 1;
  z-index: 1 !important;
}

.stat-content h3 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--light-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#profile-page .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-color);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.currency {
  font-size: 1rem;
  font-weight: 500;
  color: var(--light-text);
}

#profile-page .referral-code {
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;

}

#profile-page .copy-btn {
  background: var(--primary-color);
  border: none;
  border-radius: 20%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: #9b9bc5;
  background: white;
  position: relative;
  right: 30px !important;
}

#profile-page .copy-btn:hover {
  background: white;
  transform: scale(1.1);
}





/* Settings Section */
.settings-section {
  background: var(--card-background);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  margin-top: px;
  position: relative;
  top: -30px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
}

.section-title i {
  color: var(--primary-color);
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;

}

.setting-item:hover {
  background: rgba(74, 144, 226, 0.05);
  border-color: var(--primary-color);

}

.setting-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;

}

.setting-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.setting-content h4 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
}

.setting-description {
  margin: 0;
  font-size: 0.9rem;
  color: var(--light-text);
}

.setting-value {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-email {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  color: var(--text-color);
  background: rgba(0, 0, 0, 0.05);
  padding: 8px 12px;
  border-radius: 8px;
}

.modern-select {
  width: 100%;
  padding: 12px 18px;
  font-size: 1rem;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 150px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-family: 'Poppins', 'Inter', 'Noto Sans Arabic', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;
}

.modern-select::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.3), rgba(255,255,255,0));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-select:hover::before {
  opacity: 1;
}

.modern-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1), 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.modern-select:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.modern-select option {
  font-family: 'Poppins', 'Inter', 'Noto Sans Arabic', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;
  direction: inherit;
  padding: 8px;
}

.theme-controls {
  display: flex;
  gap: 8px;
}

.theme-toggle-btn {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 18px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.theme-toggle-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.3), rgba(255,255,255,0));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-toggle-btn:hover::before {
  opacity: 1;
}

.theme-toggle-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 8px 20px rgba(74, 144, 226, 0.35);
}

.theme-toggle-btn:active {
  box-shadow: 0 3px 8px rgba(74, 144, 226, 0.3);
}

/* Social Media Item - Centered Layout */
.social-media-item {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.setting-info-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.setting-content-centered {
  text-align: center;
}

.setting-content-centered h4 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
}

.setting-content-centered .setting-description {
  margin: 0;
  font-size: 0.9rem;
  color: var(--light-text);
}

/* Social Media Controls - Vertical Layout */
.social-media-controls-centered {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

.social-media-controls {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.social-media-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 18px;
  box-shadow: none;
  position: relative;
  overflow: visible;
  text-decoration: none;
}

.social-media-btn::before {
  display: none !important;
}

.social-media-btn:hover::before {
  display: none !important;
}

/* X (Twitter) Button - Updated Brand Colors */
.x-btn {
  color: #ffffff !important;
  background: #000000 !important;
}

.x-btn svg {
  fill: #ffffff !important;
  width: 28px;
  height: 28px;
}

.x-btn svg path {
  fill: #ffffff !important;
  stroke: #000000 !important;
  stroke-width: 0;
}

.x-btn:hover {
  background: linear-gradient(135deg, #000000, #14171a) !important;
  border-color: #000000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.x-btn:hover svg path {
  fill: #ffffff !important;
}

/* Telegram Button - خلفية زرقاء مع أيقونة بيضاء */
.telegram-btn {
  background: #0088cc !important;
  border: none !important;
  box-shadow: none !important;
}

.telegram-btn i {
  color: #ffffff !important;
  font-size: 24px !important;
}

/* أيقونة Telegram الجديدة - سيتم وضعها في HTML */
.telegram-btn i {
  display: none !important;
}

.telegram-btn svg {
  width: 44px;
  height: 44px;
}

.telegram-btn:hover {
  background: #006699 !important;
  box-shadow: 0 8px 20px rgba(0, 136, 204, 0.35);
  transform: translateY(-2px);
}

.telegram-btn:hover::before {
  transform: scale(1.05);
}

.social-media-btn:active {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  transform: translateY(0);
}

/* Dark Theme Adjustments */
.dark-theme .profile-header-card {
  background: linear-gradient(135deg, #3a56cc 0%, #2c3e50 100%);
}

.dark-theme .setting-item {
  background: rgba(255, 255, 255, 0.05);
}

.dark-theme .setting-item:hover {
  background: rgba(107, 165, 231, 0.1);
}

.dark-theme .email-display {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

.dark-theme .modern-select {
  background: linear-gradient(135deg, #2a2a2a 0%, #333333 50%, #2a2a2a 100%);
  border-color: var(--border-color);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.dark-theme .modern-select::before {
  background: linear-gradient(120deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
}

.dark-theme .modern-select:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.dark-theme .theme-toggle-btn {
  background: linear-gradient(135deg, #2a2a2a 0%, #333333 50%, #2a2a2a 100%);
  border-color: var(--border-color);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.dark-theme .theme-toggle-btn::before {
  background: linear-gradient(120deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
}

.dark-theme .theme-toggle-btn:hover {
  background: linear-gradient(135deg, var(--primary-color), #3a7bc8);
  box-shadow: 0 8px 20px rgba(107, 165, 231, 0.4);
}

/* Dark Theme Adjustments for Social Media */
.dark-theme .social-media-btn {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 50%;
}

.dark-theme .social-media-btn::before {
  display: none !important;
}

.dark-theme .x-btn {
  background: #000000 !important;
  color: #ffffff !important;
}

.dark-theme .x-btn svg path {
  fill: #ffffff !important;
}

.dark-theme .x-btn:hover {
  background: linear-gradient(135deg, #000000, #14171a) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.dark-theme .x-btn:hover svg path {
  fill: #ffffff !important;
}

.dark-theme .telegram-btn {
  background: #0088cc !important;
  border: none !important;
  box-shadow: none !important;
}

.dark-theme .telegram-btn:hover {
  background: #006699 !important;
  box-shadow: 0 8px 20px rgba(0, 136, 204, 0.4);
}

/* Dark theme styles for premium profile elements */
.dark-theme .profile-name-display {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-color);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 4px 12px;
  border-radius: 16px;

  border: none !important;
  width: fit-content;
  max-width: auto;
  position: relative;
  transform: none !important;
  letter-spacing: 0.3px;
  transition: none !important;
  top: px;
   box-shadow: none !important;
  background: none !important;

}

.dark-theme .profile-name-display::before {
  box-shadow: none !important;
  background: none !important;
  border: none !important;
  transform: none !important;
  transition: none !important;
}

.dark-theme .profile-name-display:hover {
  box-shadow: none !important;
  background: none !important;
  border: none !important;
  transform: none !important;
  transition: none !important;
}

.dark-theme .profile-name-display:active {
  box-shadow: none !important;
  background: none !important;
  border: none !important;
  transform: none !important;
  transition: none !important;
}

/* Dark theme styles for profile menu */
.dark-theme .profile-menu-btn {
  border-color: rgba(107, 165, 231, 0.4);
  color: var(--primary-color);
}

.dark-theme .profile-menu-btn:hover {
  background: var(--primary-color);
  box-shadow: 0 3px 10px rgba(107, 165, 231, 0.5);
}

.dark-theme .profile-dropdown-menu {
  background: var(--card-background);
  border-color: var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dark-theme .profile-menu-option {
  color: var(--text-color);
  border-bottom-color: var(--border-color);
}

.dark-theme .profile-menu-option:hover {
  background: rgba(107, 165, 231, 0.12);
  color: var(--primary-color);
}

.dark-theme .profile-name-display:hover {
  background: rgba(107, 165, 231, 0.08);
  border-color: rgba(107, 165, 231, 0.3);
}

/* Dark theme styles for photo options menu */
.dark-theme .camera-icon-badge {
  background: rgba(0, 0, 0, 0.8);
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.dark-theme .camera-icon-badge:hover {
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.dark-theme .photo-options-menu {
  background: var(--card-background);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}

.dark-theme .photo-option {
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
}

.dark-theme .photo-option:hover {
  background: rgba(107, 165, 231, 0.12);
  color: var(--primary-color);
}

.dark-theme .photo-option.delete:hover {
  background: rgba(255, 71, 87, 0.12);
}

/* Dark theme copy button styling for profile page - Enhanced specificity */
.dark-theme #profile-page .copy-btn,
#profile-page.dark-theme .copy-btn,
body.dark-theme #profile-page .copy-btn {
  background: #333 !important;
  color: white !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

.dark-theme #profile-page .copy-btn:hover,
#profile-page.dark-theme .copy-btn:hover,
body.dark-theme #profile-page .copy-btn:hover {
  background: #444 !important;
  transform: scale(1.1) !important;
}

.dark-theme .stat-icons .share-links {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  border: none !important;
  color: #d06d34 !important;
  background: none !important;
  box-shadow: none !important;
  left: -4px !important;
}


/* Delete warning modal title alignment */
#deleteWarningModal .modal-content h3 {
  text-align: left !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Dark mode for delete account modals */
.dark-theme .delete-warning-box,
.dark-theme .delete-warning-box-2 {
  background: rgba(107, 165, 231, 0.15) !important;
  border-color: rgba(107, 165, 231, 0.4) !important;
}

.dark-theme .delete-warning-box p,
.dark-theme .delete-warning-box-2 p,
.dark-theme .delete-warning-box-2 ul,
.dark-theme .delete-warning-box-2 li {
  color: #ffffff !important;
}

.dark-theme .delete-question-text {
  color: #ffffff !important;
}

.dark-theme .delete-reason-select {
  background: var(--card-background) !important;
  color: var(--text-color) !important;
  border-color: var(--border-color) !important;
}

.dark-theme .delete-final-text {
  color: #ffffff !important;
}

.dark-theme .delete-reason-textarea {
  background: var(--card-background) !important;
  color: var(--text-color) !important;
  border-color: var(--border-color) !important;
}

.dark-theme .delete-reason-textarea::placeholder {
  color: #a0aec0 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #profile-page {
    padding: 15px;
  }

  .profile-cover {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
    gap: 20px;
  }

  .profile-name {
    font-size: 1.6rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    z-index: 1 !important;
  }

  .stat-card {
    padding: 20px;
    z-index: 1 !important;
  }

  .settings-section {
    padding: 20px;
  }

  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 16px;
  }

  .setting-value {
    width: 100%;
    justify-content: flex-start;
  }

  .modern-select {
    width: 100%;
  }

  .theme-controls {
    width: 100%;
    justify-content: center;
  }
}

/* Enhanced animations and effects */
@media (max-width: 768px) {
  .balance-item,
  .referral-item,
  .profile-item,
  .username-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
  }

  .balance-item:active,
  .referral-item:active,
  .profile-item:active {
    transform: translateY(2px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  }

  .profile-avatar {
    transition: all 0.3s ease;
  }

  .avatar-container:hover .profile-avatar {
    /* No hover effect on mobile */
  }

  /* Staggered animation for cards */
  .balance-item {
    animation: slideInUp 0.6s ease-out 0.1s both;
  }

  .referral-item {
    animation: slideInUp 0.6s ease-out 0.2s both;
  }

  .profile-item:nth-child(1) {
    animation: slideInUp 0.6s ease-out 0.3s both;
  }

  .profile-item:nth-child(2) {
    animation: slideInUp 0.6s ease-out 0.4s both;
  }

  .profile-item:nth-child(3) {
    animation: slideInUp 0.6s ease-out 0.5s both;
  }

  .profile-item:nth-child(4) {
    animation: slideInUp 0.6s ease-out 0.6s both;
  }

  @keyframes slideInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 480px) {
  #profile-page {
    padding: 0;
  }

  .profile-name-container {
    padding: 25px 16px 20px;
  }

  .profile-balance-section,
  .profile-settings-section {
    padding-left: 12px;
    padding-right: 12px;
    z-index: 1 !important;
  }

  .balance-item,
  .referral-item,
  .profile-item,
  .username-item {
    padding: 16px;
    border-radius: 14px;
  }

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

  .profile-name-display {
    font-size: 1.2rem;
    padding: 10px 18px;
  }

  #profile-coins,
  #profile-referral-code {
    font-size: 1.3rem !important;
  }

  .theme-controls {
    gap: 8px !important;
  }

  .theme-btn {
    height: 42px;
    font-size: 15px;
  }
}/* ===== PIN Lock Screen ===== */
.pin-lock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #0f0f1e 0%, #1a1a3e 50%, #0d0d2b 100%);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  touch-action: manipulation;
}

.pin-lock-overlay.active {
  opacity: 1;
}

.pin-lock-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 360px;
  padding: 40px 20px;
}

.pin-lock-logo {
  margin-bottom: 24px;
}

.pin-lock-logo img {
  border-radius: 0;
  box-shadow: none;
}

.pin-lock-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.pin-lock-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin: 0 0 32px 0;
}

/* ===== PIN Dots ===== */
.pin-dots-container {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  transition: transform 0.1s;
}

.pin-dots-container.shake {
  animation: pinShake 0.5s ease;
}

@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(8px); }
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background: #4a90e2;
  border-color: #4a90e2;
  box-shadow: 0 0 12px rgba(74, 144, 226, 0.5);
  transform: scale(1.1);
}

/* ===== PIN Error Message ===== */
.pin-error-msg {
  color: #ef4444;
  font-size: 14px;
  margin: 8px 0 16px 0;
  text-align: center;
}

/* ===== PIN Keypad ===== */
.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 280px;
  margin-top: 16px;
}

.pin-key {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 28px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

.pin-key:hover {
  background: rgba(255, 255, 255, 0.15);
}

.pin-key:active {
  background: rgba(74, 144, 226, 0.3);
  transform: scale(0.92);
}

.pin-key-delete {
  font-size: 22px;
  background: transparent;
}

.pin-key-delete:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pin-key-biometric {
  font-size: 28px;
  color: #10b981;
  background: transparent;
}

.pin-key-biometric:hover {
  background: rgba(16, 185, 129, 0.15);
}

.pin-key-biometric:active {
  background: rgba(16, 185, 129, 0.3);
}

/* ===== PIN Setup/Change Modal ===== */
.pin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  touch-action: manipulation;
}

.pin-modal-overlay.active {
  opacity: 1;
}

.pin-modal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 360px;
  padding: 40px 20px;
  position: relative;
}

.pin-modal-close {
  position: absolute;
  top: -20px;
  right: 0px;
  background: none;
  border: none;
  box-shadow: none;
  outline: none;
  color: rgba(255, 255, 255, 0.7);
  width: 40px;
  height: 40px;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: color 0.2s ease;
  z-index: 10;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}
}

.pin-modal-close:hover {
  color: #fff;
}

.pin-modal-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #4a90e2, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.pin-modal-icon i {
  color: #fff;
  font-size: 32px;
}

.pin-modal-title {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.pin-modal-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin: 0 0 28px 0;
  text-align: center;
}

/* ===== PIN Toggle Switch ===== */
.pin-toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.pin-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pin-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.pin-toggle-slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pin-toggle-switch input:checked + .pin-toggle-slider {
  background: linear-gradient(135deg, #10b981, #059669);
}

.pin-toggle-switch input:checked + .pin-toggle-slider::before {
  transform: translateX(24px);
}

/* ===== Dark Theme Overrides ===== */
.dark-theme .pin-toggle-slider {
  background-color: #444;
}

.dark-theme .pin-change-btn:hover {
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.6);
}

/* ===== Light Theme Lock Screen ===== */
/* Lock screen always stays dark for professional look */

/* ===== Responsive ===== */
@media (max-height: 600px) {
  .pin-lock-container {
    padding: 20px;
  }
  .pin-lock-logo img {
    width: 56px;
    height: 56px;
  }
  .pin-lock-title {
    font-size: 20px;
  }
  .pin-key {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  .pin-keypad {
    gap: 8px;
  }
  .pin-dots-container {
    margin-bottom: 12px;
  }
}

@media (max-width: 340px) {
  .pin-key {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  .pin-keypad {
    gap: 8px;
    max-width: 240px;
  }
}