/* Card component */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-normal),
              box-shadow var(--transition-normal),
              border-color var(--transition-normal);
  will-change: transform;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}

/* Animation preview area */
.card-preview {
  position: relative;
  height: var(--card-preview-height);
  background: var(--bg-preview);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card info area */
.card-info {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.card-name {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.card-name-en {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-name-zh {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.card-category {
  display: inline-block;
  margin-top: var(--space-xs);
  padding: 1px 8px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: #f0f4f8;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Utility classes for effect targets inside cards */
.card-preview .demo-box {
  width: 60px;
  height: 60px;
  background: var(--accent-blue);
  border-radius: var(--radius-md);
}

.card-preview .demo-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-coral);
}

.card-preview .demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: var(--accent-blue);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.card-preview .demo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-preview .demo-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
}

.card-preview .demo-bar {
  width: 120px;
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.card-preview .demo-bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent-blue);
  border-radius: var(--radius-full);
}

.card-preview .demo-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  background: #cbd5e0;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.card-preview .demo-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.card-preview .demo-toggle.active {
  background: var(--accent-green);
}

.card-preview .demo-toggle.active::after {
  transform: translateX(24px);
}
