/* Visitor Return Experience — "Since You Were Last Here..." */

.cv-catchup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
  padding: 16px;
}

.cv-catchup-overlay.cv-catchup-visible {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.cv-catchup-overlay.cv-catchup-hiding {
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
}

.cv-catchup-card {
  background: #1a1a2e;
  border: 1px solid #333;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cv-catchup-visible .cv-catchup-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cv-catchup-hiding .cv-catchup-card {
  transform: translateY(-20px) scale(0.95);
  opacity: 0;
}

.cv-catchup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.cv-catchup-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Header */
.cv-catchup-header {
  text-align: center;
  margin-bottom: 20px;
}

.cv-catchup-emoji {
  font-size: 48px;
  margin-bottom: 8px;
  animation: cv-bounce 0.6s ease;
}

@keyframes cv-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.cv-catchup-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
}

.cv-catchup-away {
  font-size: 14px;
  color: #aaa;
}

.cv-catchup-away strong {
  color: #FFD700;
}

/* Drama Bar */
.cv-catchup-drama {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.cv-drama-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #FFD700;
  min-width: 70px;
}

.cv-drama-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.cv-drama-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #FFD700, #FF6B35, #F44336);
  border-radius: 3px;
  transition: width 0.8s ease;
}

.cv-drama-emoji {
  font-size: 18px;
}

/* Headline */
.cv-catchup-headline {
  font-size: 16px;
  font-weight: 600;
  color: #e0e0e0;
  text-align: center;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 215, 0, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.15);
}

/* Events */
.cv-catchup-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.cv-catchup-event {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: background 0.2s;
}

.cv-catchup-event:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cv-event-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.cv-event-content {
  flex: 1;
  min-width: 0;
}

.cv-event-headline {
  font-size: 13px;
  font-weight: 500;
  color: #ddd;
  line-height: 1.4;
}

.cv-event-detail {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
  line-height: 1.3;
}

.cv-event-hot {
  font-size: 14px;
  flex-shrink: 0;
  animation: cv-pulse 1.5s infinite;
}

@keyframes cv-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.cv-catchup-empty {
  text-align: center;
  color: #666;
  font-size: 14px;
  padding: 20px;
}

.cv-catchup-welcome {
  text-align: center;
  color: #bbb;
  font-size: 14px;
  line-height: 2;
}

.cv-catchup-welcome p {
  margin: 0;
}

/* Footer */
.cv-catchup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cv-visit-count {
  font-size: 11px;
  color: #555;
}

.cv-catchup-btn {
  background: linear-gradient(135deg, #FFD700, #FF6B35);
  color: #000;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cv-catchup-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.cv-catchup-btn:active {
  transform: translateY(0);
}

/* Light mode */
.light-mode .cv-catchup-card,
:root:not(.dark-mode) .cv-catchup-card {
  /* Keep dark for overlay regardless of page theme */
}

/* Mobile */
@media (max-width: 768px) {
  .cv-catchup-overlay {
    align-items: flex-end;
    padding: 0;
  }
  
  .cv-catchup-card {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    padding: 20px;
  }

  .cv-catchup-title {
    font-size: 18px;
  }

  .cv-catchup-emoji {
    font-size: 36px;
  }

  .cv-catchup-event {
    padding: 8px 10px;
  }

  .cv-event-headline {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .cv-catchup-card {
    padding: 16px;
  }

  .cv-catchup-drama {
    flex-wrap: wrap;
    gap: 6px;
  }

  .cv-drama-label {
    width: 100%;
    text-align: center;
  }
}
