/* ─────────────────────────────────────────────
   15. SEARCH PAGE
───────────────────────────────────────────── */
.search-page-header {
  padding: 16px;
  position: sticky;
  top: 0;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  z-index: 50;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 0 14px;
  height: 48px;
  gap: 10px;
  transition: all var(--t-base);
}

.search-input-wrap:focus-within {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.search-icon {
  color: var(--text-tertiary);
  width: 20px;
  height: 20px;
}

.search-input-wrap input {
  flex: 1;
  font-size: 15px;
  color: var(--text-primary);
}

.search-clear {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity var(--t-base);
}

.search-clear.visible {
  opacity: 1;
}

.search-clear svg {
  width: 14px;
  height: 14px;
}

.search-results {
  padding: 16px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 24px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ─────────────────────────────────────────────
   16. COLLECTIONS PAGE
───────────────────────────────────────────── */
.collections-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.collection-card {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--t-base);
}

.collection-card:active {
  transform: scale(0.98);
}

.collection-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.collection-card:hover img {
  transform: scale(1.05);
}

.collection-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.collection-title {
  font-family: 'Manrope', sans-serif;
  color: white;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.collection-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collection-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--r-full);
  width: fit-content;
}

/* ─────────────────────────────────────────────
   17. FAVORITES & PROFILE
───────────────────────────────────────────── */
.profile-header {
  text-align: center;
  padding: 32px 16px 24px;
  position: relative;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  background: var(--grad-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: white;
  box-shadow: var(--shadow-glow);
  border: 3px solid var(--bg-card);
}

.profile-name {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.profile-phone {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 14px;
}

.btn-edit-profile {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-full);
  color: var(--text-primary);
  transition: all var(--t-base);
}

.btn-edit-profile:active {
  transform: scale(0.95);
  background: var(--bg-elevated);
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 16px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  font-size: 28px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-menu {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--t-base);
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  text-align: left;
  color: var(--text-primary);
}

.profile-menu-item:active {
  transform: scale(0.98);
  background: var(--bg-elevated);
}

.profile-menu-item.danger {
  color: var(--danger);
}

.menu-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.menu-icon svg {
  width: 20px;
  height: 20px;
}

.tg-icon { background: linear-gradient(135deg, #0088cc, #006699); }
.ig-icon { background: linear-gradient(135deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); }
.yt-icon { background: linear-gradient(135deg, #ff0000, #cc0000); }
.share-icon { background: linear-gradient(135deg, var(--accent-2), #4d3eb5); }
.clear-icon { background: linear-gradient(135deg, var(--danger), #c0392b); }

.profile-menu-item span {
  flex: 1;
}

.menu-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
}

.profile-footer {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.profile-footer .version {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.6;
}

/* ─────────────────────────────────────────────
   22. IMAGE / VIDEO VIEWERS
───────────────────────────────────────────── */
.image-viewer,
.video-player {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9600;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.image-viewer img {
  max-width: 95%;
  max-height: 90%;
  object-fit: contain;
}

.video-player video {
  max-width: 100%;
  max-height: 100%;
}

.viewer-close {
  position: absolute;
  top: calc(20px + var(--safe-top));
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 5;
}

/* ─────────────────────────────────────────────
   23. PWA INSTALL PROMPT
───────────────────────────────────────────── */
.install-prompt {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px);
  left: 16px;
  right: 16px;
  max-width: 568px;
  margin: 0 auto;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 95;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s var(--t-spring);
}

.install-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.install-text {
  flex: 1;
  min-width: 0;
}

.install-text h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.install-text p {
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-install {
  background: var(--grad-accent);
  color: white;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: var(--r-md);
  flex-shrink: 0;
}

.install-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.install-close svg {
  width: 14px;
  height: 14px;
}
