/* Users Search Page Styles - Enhanced Design */

/* Page Header – realistic leather (like home Discover / How it works) */
.page-header {
  margin-bottom: 2rem;
  padding: 2rem;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 3px solid #8b7355;
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12), inset 1px 0 0 rgba(255,255,255,0.2), inset -1px 0 0 rgba(0,0,0,0.08);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 25%, transparent 50%), linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%);
  border: 2px solid #4d7c0f;
  border-radius: 20px;
  box-shadow: 0 7px 0 0 #166534, 0 9px 20px rgba(0,0,0,0.35), inset 0 -2px 4px rgba(0,0,0,0.2);
  color: #0f0f0f;
}

.header-text h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: #2d2520;
  text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

.header-subtitle {
  margin: 0;
  font-size: 1.1rem;
  color: #3d352c;
  line-height: 1.5;
}

/* Search and Filter Section – realistic leather */
.search-filter-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 3px solid #8b7355;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12), inset 1px 0 0 rgba(255,255,255,0.2), inset -1px 0 0 rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: #4CAF50;
  font-size: 1.5rem;
  pointer-events: none;
  z-index: 1;
}

#users-search {
  width: 100%;
  padding: 14px 16px 14px 50px;
  font-size: 1rem;
  font-family: var(--default-font-family, 'Shrikhand');
  border-radius: 16px;
  border: 2px solid #8b7355;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  flex: 1;
  color: #2d2520;
}

#users-search::placeholder {
  color: #5c4d3d;
}

#users-search:focus {
  outline: none;
  border-color: #6d5a45;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.35), 0 0 0 3px rgba(139,115,85,0.3);
}

.clear-search-btn {
  position: absolute;
  right: 60px;
  background: transparent;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.clear-search-btn:hover {
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sort-label {
  font-family: var(--default-font-family, 'Shrikhand');
  font-weight: 600;
  color: #495057;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-select {
  padding: 10px 16px;
  font-size: 0.95rem;
  font-family: var(--default-font-family, 'Shrikhand');
  border-radius: 14px;
  border: 2px solid #8b7355;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.1);
  transition: all 0.2s ease;
  cursor: pointer;
  color: #2d2520;
  min-width: 180px;
}

.sort-select:focus {
  outline: none;
  border-color: #6d5a45;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.35), 0 0 0 3px rgba(139,115,85,0.3);
}

.sort-select:hover {
  border-color: #6d5a45;
}

/* Tiny skeuomorphic button – leather */
.tiny-skeu-btn {
  padding: 8px 12px;
  font-size: 0.75rem;
  font-family: var(--default-font-family, 'Shrikhand');
  border-radius: 10px;
  border: 2px solid #8b7355;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -1px 0 rgba(0,0,0,0.08);
  cursor: pointer;
  color: #2d2520;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tiny-skeu-btn:active {
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.15);
  transform: translateY(1px);
}

/* Users Grid */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  grid-auto-rows: auto;
  align-items: start;
}

.user-card {
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 3px solid #8b7355;
  border-radius: 24px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12), inset 1px 0 0 rgba(255,255,255,0.2), inset -1px 0 0 rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.user-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 32px rgba(0,0,0,0.3), inset 0 2px 0 rgba(255,255,255,0.35), inset 0 -2px 0 rgba(0,0,0,0.15);
  border-color: #6d5a45;
}

.user-avatar-container {
  position: relative;
  margin-bottom: 0.5rem;
}

.user-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #4CAF50;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.25),
    0 0 0 4px rgba(76, 175, 80, 0.15);
  transition: all 0.3s ease;
}

.user-card:hover .user-avatar {
  transform: scale(1.1);
  border-color: #2e7d32;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.3),
    0 0 0 5px rgba(76, 175, 80, 0.2);
}

.user-card-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.user-username {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c3e50;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
  position: relative;
  flex-shrink: 0;
  animation: verifiedPulse 2s ease-in-out infinite;
}

.verified-badge::before {
  content: '✓';
  font-size: 12px;
  line-height: 1;
}

@keyframes verifiedPulse {

  0%,
  100% {
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.6);
    transform: scale(1.05);
  }
}

.verified-badge:hover {
  animation: none;
  transform: scale(1.1);
  box-shadow: 0 3px 14px rgba(102, 126, 234, 0.6);
}

.user-quote {
  margin: 0;
  font-size: 0.95rem;
  color: #6c757d;
  font-style: italic;
  line-height: 1.5;
  max-height: 3em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.user-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: #495057;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid #e9ecef;
  width: 100%;
}

.user-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.user-stat::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  display: inline-block;
}

.presence-dot {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .15);
  z-index: 1;
}

.presence-online {
  background: #2ecc71;
}

.presence-offline {
  background: #bdc3c7;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 3px solid #8b7355;
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
  margin-top: 2rem;
}

.empty-icon {
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  margin: 0 0 0.75rem 0;
  color: #495057;
  font-size: 1.75rem;
  font-weight: 700;
}

.empty-state p {
  margin: 0;
  color: #6c757d;
  font-size: 1.1rem;
}

/* Error State */
.error-state {
  text-align: center;
  padding: 3rem 2rem;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 50%, #c4a574 100%);
  border: 3px solid #8b7355;
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
  margin-top: 2rem;
}

.error-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1.5rem;
}

.error-state h3 {
  margin: 0 0 0.75rem 0;
  color: #dc2626;
  font-size: 1.75rem;
  font-weight: 700;
}

.error-state p {
  margin: 0 0 1.5rem 0;
  color: #991b1b;
  font-size: 1.1rem;
}

.retry-button {
  padding: 12px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 25%, transparent 50%), linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%);
  color: #0f0f0f;
  border: 2px solid #4d7c0f;
  border-radius: 16px;
  font-family: var(--default-font-family, 'Shrikhand');
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 7px 0 0 #166534, 0 9px 20px rgba(0,0,0,0.35), inset 0 -2px 4px rgba(0,0,0,0.2);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  transition: all 0.2s ease;
  box-shadow:
    0 6px 12px rgba(220, 38, 38, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.retry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 0 #166534, 0 10px 22px rgba(0,0,0,0.4), inset 0 -2px 4px rgba(0,0,0,0.2);
}

.retry-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 0 #166534, 0 4px 10px rgba(0,0,0,0.35), inset 0 3px 10px rgba(0,0,0,0.25);
}

/* Loading placeholder styles */
.loading-placeholder {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.placeholder-card {
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 3px solid #8b7355;
  border-radius: 24px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.placeholder-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.placeholder-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.placeholder-line {
  height: 18px;
  border-radius: 9px;
  background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.placeholder-title {
  width: 60%;
  margin: 0 auto;
  height: 20px;
}

.placeholder-quote {
  width: 80%;
  margin: 0 auto;
  height: 16px;
}

.placeholder-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.placeholder-stat {
  width: 80px;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .page-header {
    padding: 1.5rem;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .header-text h1 {
    font-size: 2rem;
  }

  .users-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }

  .search-filter-section {
    padding: 1rem;
  }

  .search-wrapper {
    flex-wrap: wrap;
  }

  .clear-search-btn {
    right: 70px;
  }
}