/* ============================================
   AileBağı — Swipe Card System
   ============================================ */

/* ===== SWIPE ARENA ===== */
.swipe-arena {
  position: relative;
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  padding: var(--s-lg) 0;
  user-select: none;
}

/* ===== CARD STACK ===== */
.swipe-card-stack {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 380px;
}

/* Background cards (stack effect) */
.swipe-card-stack .swipe-card:nth-child(2) {
  transform: scale(0.95) translateY(8px);
  z-index: 1;
  opacity: 0.6;
  pointer-events: none;
}

.swipe-card-stack .swipe-card:nth-child(3) {
  transform: scale(0.9) translateY(16px);
  z-index: 0;
  opacity: 0.3;
  pointer-events: none;
}

/* ===== SWIPE CARD ===== */
.swipe-card {
  position: absolute;
  inset: 0;
  border-radius: var(--r-2xl);
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  z-index: 2;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  will-change: transform;
  transform-origin: bottom center;
}

.swipe-card:active { cursor: grabbing; }
.swipe-card.is-dragging { transition: none; }

/* ===== CARD INNER (Visual) ===== */
.swipe-card-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--r-2xl);
  padding: var(--s-xl);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(30,18,72,0.95) 0%, rgba(45,10,82,0.9) 100%);
  border: 1.5px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Decorative orb */
.swipe-card-inner::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.25), transparent);
  top: -50px;
  right: -50px;
  pointer-events: none;
}

.swipe-card-inner::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,114,182,0.15), transparent);
  bottom: -30px;
  left: -30px;
  pointer-events: none;
}

/* ===== CARD HEADER ===== */
.swipe-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.swipe-card-category {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-text-secondary);
}

.swipe-card-round {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-full);
  padding: 5px 10px;
}

/* ===== CARD BODY ===== */
.swipe-card-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-lg) 0;
  position: relative;
  z-index: 1;
}

.swipe-card-question {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-text-primary);
}

/* Answer card variant */
.swipe-card-answer-header {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  margin-bottom: var(--s-md);
  position: relative;
  z-index: 1;
}

.swipe-card-answerer {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--c-text-secondary);
}

.swipe-card-answer-text {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--c-text-primary);
  text-align: center;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.swipe-card-answer-text::before {
  content: '"';
  color: var(--c-brand-400);
  font-size: 2.5rem;
  line-height: 0;
  vertical-align: -0.5em;
  margin-right: 4px;
  font-style: normal;
}

.swipe-card-answer-text::after {
  content: '"';
  color: var(--c-brand-400);
  font-size: 2.5rem;
  line-height: 0;
  vertical-align: -0.5em;
  margin-left: 4px;
  font-style: normal;
}

/* ===== CARD FOOTER ===== */
.swipe-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  position: relative;
  z-index: 1;
}

.swipe-hint {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== SWIPE INDICATORS ===== */
.swipe-indicator {
  position: absolute;
  top: var(--s-lg);
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  border: 3px solid;
  opacity: 0;
  transition: opacity 0.1s ease;
  pointer-events: none;
  z-index: 10;
}

.swipe-indicator-right {
  left: var(--s-lg);
  color: var(--c-success);
  border-color: var(--c-success);
  background: rgba(16,185,129,0.1);
  transform: rotate(-15deg);
  box-shadow: var(--glow-success);
}

.swipe-indicator-left {
  right: var(--s-lg);
  color: var(--c-danger);
  border-color: var(--c-danger);
  background: rgba(239,68,68,0.1);
  transform: rotate(15deg);
  box-shadow: var(--glow-danger);
}

/* Show indicators during drag */
.swipe-card.dragging-right .swipe-indicator-right { opacity: 1; }
.swipe-card.dragging-left .swipe-indicator-left { opacity: 1; }

/* Card tint during drag */
.swipe-card.dragging-right .swipe-card-inner {
  border-color: rgba(16,185,129,0.4);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(16,185,129,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
  background: linear-gradient(145deg, rgba(10,50,30,0.95), rgba(30,18,72,0.9));
}

.swipe-card.dragging-left .swipe-card-inner {
  border-color: rgba(239,68,68,0.4);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(239,68,68,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
  background: linear-gradient(145deg, rgba(50,10,20,0.95), rgba(30,18,72,0.9));
}

/* ===== SWIPE RESULT OVERLAY ===== */
.swipe-result-overlay {
  position: absolute;
  inset: 0;
  border-radius: var(--r-2xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-md);
  z-index: 20;
  animation: fadeInScale 0.35s var(--t-spring);
}

.swipe-result-right { background: rgba(16,185,129,0.15); border: 2px solid var(--c-success); }
.swipe-result-left  { background: rgba(239,68,68,0.15);  border: 2px solid var(--c-danger); }

.swipe-result-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  animation: popIn 0.5s var(--t-bounce);
}

.swipe-result-right .swipe-result-icon { background: rgba(16,185,129,0.2); border: 2px solid var(--c-success); }
.swipe-result-left  .swipe-result-icon { background: rgba(239,68,68,0.2); border: 2px solid var(--c-danger); }

.swipe-result-text {
  font-size: 1rem;
  font-weight: 700;
  animation: fadeInUp 0.3s ease;
}

.swipe-result-right .swipe-result-text { color: var(--c-success); }
.swipe-result-left  .swipe-result-text { color: var(--c-danger); }

.swipe-result-points {
  font-size: 1.5rem;
  font-weight: 900;
  animation: count-up 0.4s ease 0.1s both;
}

/* ===== SWIPE ACTION BUTTONS ===== */
.swipe-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-xl);
  padding: var(--s-md) 0;
}

.swipe-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  cursor: pointer;
  transition: all var(--t-spring);
  border: 3px solid;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.swipe-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--t-fast);
}

.swipe-btn:hover::after { opacity: 1; }
.swipe-btn:active { transform: scale(0.9); }
.swipe-btn:hover { transform: scale(1.1); }

.swipe-btn-left {
  background: rgba(239,68,68,0.1);
  border-color: var(--c-danger);
  color: var(--c-danger);
}
.swipe-btn-left:hover { box-shadow: var(--glow-danger); }

.swipe-btn-right {
  background: rgba(16,185,129,0.1);
  border-color: var(--c-success);
  color: var(--c-success);
}
.swipe-btn-right:hover { box-shadow: var(--glow-success); }

.swipe-btn-lg {
  width: 84px;
  height: 84px;
  font-size: 2.25rem;
}

/* ===== CARD GONE (exiting card) ===== */
.swipe-card.swiping-right {
  animation: swipe-right-anim 0.4s ease forwards;
  pointer-events: none;
}

.swipe-card.swiping-left {
  animation: swipe-left-anim 0.4s ease forwards;
  pointer-events: none;
}

/* ===== ROUND PROGRESS ===== */
.round-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.round-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all var(--t-base);
}

.round-dot.active {
  background: var(--c-brand-400);
  box-shadow: 0 0 8px var(--c-brand-500);
  transform: scale(1.2);
}

.round-dot.completed { background: rgba(255,255,255,0.5); }

/* ===== QUESTION SELECT LIST ===== */
.question-list-item {
  padding: var(--s-md);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--glass-border);
  background: var(--glass-bg);
  cursor: pointer;
  transition: all var(--t-base);
  display: flex;
  gap: var(--s-md);
  align-items: flex-start;
}

.question-list-item:hover {
  border-color: var(--c-brand-600);
  background: rgba(124,58,237,0.08);
}

.question-list-item.selected {
  border-color: var(--c-brand-500);
  background: rgba(124,58,237,0.15);
  box-shadow: 0 0 0 1px var(--c-brand-700);
}

.question-list-text {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  flex: 1;
}

.question-list-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--c-text-muted);
  flex-shrink: 0;
}
