/* ================================================
   Cards
   ================================================ */

/* Project Card */
.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
}

.project-card-cover {
  height: 140px;
  background: var(--gradient-card);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card-cover .cover-emoji {
  font-size: 3rem;
  opacity: 0.6;
}

.project-card-cover .cover-gradient {
  position: absolute;
  inset: 0;
  opacity: 0.4;
}

.project-card-body {
  padding: var(--space-4);
}

.project-card-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.project-card-progress {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Character Card */
.character-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.character-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.character-card .char-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: var(--space-3);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent-warm);
}

.character-card .char-name {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
}

.character-card .char-role {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.character-card .char-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
}

.character-card .char-actions {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.character-card:hover .char-actions {
  opacity: 1;
}

/* Scene Card */
.scene-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  min-width: 260px;
  transition: all var(--transition-base);
  cursor: grab;
  position: relative;
}

.scene-card:active { cursor: grabbing; }

.scene-card:hover {
  border-color: var(--accent-secondary);
  box-shadow: var(--shadow-md);
}

.scene-card.dragging {
  opacity: 0.6;
  transform: rotate(2deg);
  box-shadow: var(--shadow-xl);
}

.scene-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.scene-card-number {
  font-size: var(--text-xs);
  color: var(--accent-secondary);
  font-weight: var(--weight-semibold);
}

.scene-card-title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-2);
}

.scene-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.scene-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.scene-card-meta .meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Material Card */
.material-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: all var(--transition-base);
  cursor: pointer;
}

.material-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.material-card-content {
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.material-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.material-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.material-card-refs {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Worldbuilding Entry Card */
.world-entry {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: all var(--transition-base);
}

.world-entry:hover {
  border-color: var(--accent-secondary);
}

.world-entry-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.world-entry-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.world-entry-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.world-entry-category {
  font-size: var(--text-xs);
  color: var(--accent-secondary);
}

.world-entry-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* New project card (add button) */
.project-card-new {
  background: transparent;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 220px;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-muted);
}

.project-card-new:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-primary-light);
}

.project-card-new .add-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px dashed currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Timeline Event Card */
.timeline-event {
  display: flex;
  gap: var(--space-4);
  position: relative;
  padding-bottom: var(--space-6);
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-event:last-child::before {
  display: none;
}

.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary-light);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  flex-shrink: 0;
  z-index: 1;
}

.timeline-content {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.timeline-time {
  font-size: var(--text-xs);
  color: var(--accent-primary);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
}

.timeline-title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-2);
}

.timeline-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
