/* ===== TERMS & PRIVACY PAGES ===== */

.terms-privacy-page {
  min-height: 100vh;
  padding: 16px;
  background: var(--bg-primary);
}

.terms-privacy-header {
  margin-bottom: 24px;
}

.terms-privacy-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.15s ease;
}

.terms-privacy-back:hover {
  background: var(--bg-tertiary);
  transform: translateX(-2px);
}

.terms-privacy-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.terms-updated {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.terms-privacy-content {
  max-width: 800px;
  margin: 0 auto;
}

.terms-privacy-content section {
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.terms-privacy-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text-primary);
}

.terms-privacy-content p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 12px 0;
}

.terms-privacy-content ul {
  list-style: disc;
  padding-left: 24px;
  margin: 0;
}

.terms-privacy-content li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ===== MESSAGE REACTIONS & THEME ===== */

/* Reactions on messages */
.msg-reactions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.msg-reaction {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.msg-reaction:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}

.msg-reaction.active {
  background: rgba(254, 60, 114, 0.3);
  border-color: var(--primary);
}

.msg-reaction-count {
  font-size: 11px;
  font-weight: 600;
  min-width: 8px;
  text-align: center;
}

/* Reaction picker popup */
.reaction-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: pickerPopIn 0.2s ease;
}

@keyframes pickerPopIn {
  from { opacity: 0; transform: translateX(-50%) scale(0.9); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

.reaction-option {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reaction-option:hover {
  background: var(--bg-tertiary);
  transform: scale(1.2);
}

/* ===== GIF PICKER ===== */
.gif-picker-container {
  position: absolute;
  bottom: 70px;
  right: 16px;
  width: 280px;
  max-height: 350px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 1000;
  display: none;
}

.gif-picker-container.active {
  display: block;
  animation: pickerPopIn 0.2s ease;
}

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

.gif-search-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: none;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.gif-search-input::placeholder {
  color: var(--text-tertiary);
}

.gif-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.gif-item {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.gif-item:hover {
  transform: scale(1.05);
}

/* Match popup animation */
.match-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: matchFadeIn 0.5s ease;
}

.match-popup-overlay.active {
  display: flex;
}

@keyframes matchFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.match-popup-content {
  text-align: center;
  color: white;
  animation: matchBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes matchBounce {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.match-popup-title {
  font-size: 42px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}

.match-popup-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.match-popup-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
}

.match-popup-heart {
  font-size: 48px;
  animation: heartPulse 1s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.match-popup-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.match-popup-btn {
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.match-popup-btn-primary {
  background: var(--primary-gradient);
  color: white;
  border: none;
}

.match-popup-btn-primary:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.match-popup-btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.match-popup-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -10px;
  z-index: 10001;
  pointer-events: none;
  animation: confettiDrop 3s ease-out forwards;
}

@keyframes confettiDrop {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Swipe Note */
.swipe-note-container {
  position: absolute;
  bottom: 70px;
  left: 16px;
  right: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  z-index: 50;
  box-shadow: var(--shadow-md);
  display: none;
}

.swipe-note-container.active {
  display: block;
  animation: slideUp 0.3s ease;
}

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

.swipe-note-textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  color: var(--text-primary);
  font-size: 14px;
  resize: none;
  outline: none;
}

.swipe-note-textarea:focus {
  border-color: var(--primary);
}

.swipe-note-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

.swipe-note-btn {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.swipe-note-btn-send {
  background: var(--primary-gradient);
  color: white;
  border: none;
}

.swipe-note-btn-skip {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* Lifestyle badges */
.lifestyle-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  margin: 2px;
}

.lifestyle-section {
  margin: 16px 0;
}

.lifestyle-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* Dark mode toggle */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.dark-mode-label {
  font-size: 15px;
  color: var(--text-primary);
}

.toggle-switch {
  width: 48px;
  height: 26px;
  background: var(--bg-tertiary);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle-switch.active {
  background: var(--primary);
}

.toggle-switch-thumb {
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch.active .toggle-switch-thumb {
  transform: translateX(22px);
}

/* Typing indicator enhancement */
.typing-status {
  font-size: 12px;
  color: var(--primary);
  font-style: italic;
  padding: 4px 16px;
  display: none;
}

.typing-status.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* Read receipts */
.read-status {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.7;
}

.read-status.read {
  color: var(--superlike-blue);
  opacity: 1;
}

/* Passport location indicator */
.passport-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--boost-purple);
  color: white;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
