/* ============================================
   VIVID CARTOON THEME - Components
   活力卡通风 - 组件库
   ============================================ */

/* --- Icon System (SVG) --- */
.v-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  transition: fill var(--v-duration-fast) var(--v-ease-smooth);
}

.v-icon--sm { width: 14px; height: 14px; }
.v-icon--md { width: 20px; height: 20px; }
.v-icon--lg { width: 24px; height: 24px; }
.v-icon--xl { width: 32px; height: 32px; }

/* --- Cards --- */
.v-card {
  background: var(--v-bg-card);
  border-radius: var(--v-radius-md);
  box-shadow: var(--v-shadow-sm);
  overflow: hidden;
  transition: transform var(--v-duration-normal) var(--v-ease-bounce),
              box-shadow var(--v-duration-normal) var(--v-ease-smooth);
}

.v-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--v-shadow-hover);
}

/* Comic Card */
.v-card--comic {
  position: relative;
}

.v-card--comic .v-card__cover {
  position: relative;
  width: 100%;
  padding-top: 133%;
  overflow: hidden;
  border-radius: var(--v-radius-md) var(--v-radius-md) 0 0;
}

.v-card--comic .v-card__cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--v-duration-slow) var(--v-ease-smooth);
}

.v-card--comic:hover .v-card__cover img {
  transform: scale(1.05);
}

.v-card--comic .v-card__cover-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--v-bg-section) 0%, var(--v-bg-section-alt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.v-card--comic .v-card__info {
  padding: var(--v-space-sm) var(--v-space-md) var(--v-space-md);
}

.v-card--comic .v-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--v-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: var(--v-space-xs);
}

.v-card--comic .v-card__meta {
  font-size: 12px;
  color: var(--v-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v-card--comic .v-card__badge {
  position: absolute;
  top: var(--v-space-sm);
  left: var(--v-space-sm);
  z-index: 2;
}

/* Rank Card */
.v-card--rank {
  display: flex;
  align-items: center;
  padding: var(--v-space-md);
  gap: var(--v-space-md);
  border-radius: var(--v-radius-sm);
}

.v-card--rank:hover {
  transform: translateX(4px);
}

.v-card--rank .v-card__rank-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--v-radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--v-text-muted);
}

.v-card--rank .v-card__rank-num--1 { background: linear-gradient(135deg, #FFD700, #FFA500); }
.v-card--rank .v-card__rank-num--2 { background: linear-gradient(135deg, #C0C0C0, #A8A8A8); }
.v-card--rank .v-card__rank-num--3 { background: linear-gradient(135deg, #CD7F32, #B87333); }

.v-card--rank .v-card__rank-cover {
  flex-shrink: 0;
  width: 48px;
  height: 64px;
  border-radius: var(--v-radius-xs);
  overflow: hidden;
}

.v-card--rank .v-card__rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v-card--rank .v-card__rank-info {
  flex: 1;
  min-width: 0;
}

.v-card--rank .v-card__rank-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--v-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v-card--rank .v-card__rank-meta {
  font-size: 12px;
  color: var(--v-text-muted);
  margin-top: 2px;
}

/* --- Buttons --- */
.v-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v-space-sm);
  padding: 10px 24px;
  border-radius: var(--v-radius-pill);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--v-duration-normal) var(--v-ease-bounce);
  border: 2px solid transparent;
  white-space: nowrap;
  user-select: none;
}

.v-btn:hover {
  transform: scale(1.05);
}

.v-btn:active {
  transform: scale(0.97);
}

.v-btn--primary {
  background: var(--v-coral);
  color: #fff;
  border-color: var(--v-coral);
}

.v-btn--primary:hover {
  background: var(--v-coral-dark);
  border-color: var(--v-coral-dark);
  color: #fff;
}

.v-btn--secondary {
  background: var(--v-teal);
  color: #fff;
  border-color: var(--v-teal);
}

.v-btn--secondary:hover {
  background: var(--v-teal-dark);
  border-color: var(--v-teal-dark);
  color: #fff;
}

.v-btn--outline {
  background: transparent;
  color: var(--v-coral);
  border-color: var(--v-coral);
}

.v-btn--outline:hover {
  background: var(--v-coral);
  color: #fff;
}

.v-btn--ghost {
  background: transparent;
  color: var(--v-text-secondary);
  border-color: transparent;
}

.v-btn--ghost:hover {
  color: var(--v-coral);
  background: rgba(255, 107, 107, 0.08);
}

.v-btn--vip {
  background: var(--v-vip-gradient);
  color: #fff;
  border-color: transparent;
}

.v-btn--vip:hover {
  filter: brightness(1.1);
}

.v-btn--sm {
  padding: 6px 16px;
  font-size: 12px;
}

.v-btn--lg {
  padding: 14px 32px;
  font-size: 16px;
}

.v-btn--block {
  width: 100%;
}

/* --- Chips / Tags --- */
.v-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--v-radius-pill);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--v-duration-fast) var(--v-ease-bounce);
  border: none;
  background: rgba(255, 107, 107, 0.08);
  color: var(--v-coral);
}

.v-chip:hover {
  background: rgba(255, 107, 107, 0.15);
  transform: scale(1.03);
}

.v-chip--active {
  background: var(--v-coral);
  color: #fff;
}

.v-chip--active:hover {
  background: var(--v-coral-dark);
  color: #fff;
}

.v-chip--teal {
  background: rgba(78, 205, 196, 0.1);
  color: var(--v-teal);
}

.v-chip--teal.v-chip--active {
  background: var(--v-teal);
  color: #fff;
}

.v-chip--yellow {
  background: rgba(255, 230, 109, 0.2);
  color: #C5A000;
}

.v-chip--purple {
  background: rgba(167, 139, 250, 0.1);
  color: var(--v-purple);
}

.v-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--v-radius-pill);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.v-tag--vip {
  background: var(--v-vip-gradient);
  color: #fff;
}

.v-tag--free {
  background: var(--v-success);
  color: #fff;
}

.v-tag--new {
  background: var(--v-coral);
  color: #fff;
}

.v-tag--new::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: v-pulse 1.5s infinite;
}

.v-tag--hot {
  background: #FF4444;
  color: #fff;
}

.v-tag--update {
  background: var(--v-teal);
  color: #fff;
}

.v-tag--end {
  background: var(--v-text-muted);
  color: #fff;
}

/* --- Badge --- */
.v-badge {
  position: relative;
}

.v-badge__dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--v-coral);
  border: 2px solid var(--v-bg-card);
}

.v-badge__num {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--v-radius-pill);
  background: var(--v-coral);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--v-bg-card);
}

/* --- Search Input --- */
.v-search {
  position: relative;
  display: flex;
  align-items: center;
}

.v-search__input {
  width: 100%;
  padding: 10px 44px 10px 20px;
  border-radius: var(--v-radius-pill);
  border: 2px solid var(--v-border);
  background: var(--v-bg-card);
  color: var(--v-text);
  font-size: 14px;
  transition: all var(--v-duration-normal) var(--v-ease-smooth);
}

.v-search__input::placeholder {
  color: var(--v-text-muted);
}

.v-search__input:focus {
  border-color: var(--v-coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

.v-search__btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--v-coral);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--v-duration-fast) var(--v-ease-smooth);
}

.v-search__btn:hover {
  background: var(--v-coral-dark);
}

/* --- Pagination --- */
.v-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--v-space-sm);
  padding: var(--v-space-xl) 0;
}

.v-pagination a,
.v-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--v-radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--v-text-secondary);
  background: var(--v-bg-card);
  border: 1px solid var(--v-border);
  transition: all var(--v-duration-fast) var(--v-ease-smooth);
}

.v-pagination a:hover {
  background: rgba(255, 107, 107, 0.08);
  border-color: var(--v-coral);
  color: var(--v-coral);
}

.v-pagination .active {
  background: var(--v-coral);
  border-color: var(--v-coral);
  color: #fff;
}

/* --- Avatar --- */
.v-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--v-bg-section);
  border: 2px solid var(--v-border);
  transition: border-color var(--v-duration-fast) var(--v-ease-smooth);
}

.v-avatar:hover {
  border-color: var(--v-coral);
}

.v-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v-avatar--sm { width: 32px; height: 32px; }
.v-avatar--md { width: 40px; height: 40px; }
.v-avatar--lg { width: 56px; height: 56px; }
.v-avatar--xl { width: 80px; height: 80px; }

/* --- Rating Stars --- */
.v-rating {
  display: inline-flex;
  gap: 2px;
}

.v-rating__star {
  color: var(--v-border);
  font-size: 14px;
}

.v-rating__star--filled {
  color: var(--v-yellow);
}

.v-rating__score {
  font-size: 13px;
  font-weight: 600;
  color: var(--v-coral);
  margin-left: 4px;
}

/* --- Wave Divider --- */
.v-wave-divider {
  width: 100%;
  height: 40px;
  overflow: hidden;
  line-height: 0;
}

.v-wave-divider svg {
  width: 100%;
  height: 100%;
}

/* --- Empty State --- */
.v-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--v-space-3xl) var(--v-space-xl);
  text-align: center;
}

.v-empty__icon {
  width: 200px;
  height: 200px;
  margin-bottom: var(--v-space-lg);
}

.v-empty__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--v-text);
  margin-bottom: var(--v-space-sm);
}

.v-empty__text {
  font-size: 14px;
  color: var(--v-text-secondary);
  max-width: 320px;
  margin-bottom: var(--v-space-lg);
}

.v-empty__action {
  margin-top: var(--v-space-sm);
}

/* --- Skeleton Loading --- */
.v-skeleton {
  background: linear-gradient(90deg, var(--v-bg-section) 25%, var(--v-bg-section-alt) 50%, var(--v-bg-section) 75%);
  background-size: 200% 100%;
  animation: v-shimmer 1.5s infinite;
  border-radius: var(--v-radius-sm);
}

.v-skeleton--text {
  height: 16px;
  margin-bottom: 8px;
}

.v-skeleton--title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

.v-skeleton--cover {
  width: 100%;
  padding-top: 133%;
}

.v-skeleton--circle {
  border-radius: 50%;
}

/* --- Section Header --- */
.v-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--v-space-lg);
}

.v-section__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--v-text);
  display: flex;
  align-items: center;
  gap: var(--v-space-sm);
}

.v-section__title-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--v-radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v-section__title-icon--coral { background: rgba(255, 107, 107, 0.12); color: var(--v-coral); }
.v-section__title-icon--teal { background: rgba(78, 205, 196, 0.12); color: var(--v-teal); }
.v-section__title-icon--yellow { background: rgba(255, 230, 109, 0.2); color: #C5A000; }
.v-section__title-icon--purple { background: rgba(167, 139, 250, 0.12); color: var(--v-purple); }

.v-section__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--v-text-secondary);
  font-weight: 500;
  transition: color var(--v-duration-fast) var(--v-ease-smooth);
}

.v-section__more:hover {
  color: var(--v-coral);
}

.v-section__more:hover .v-icon {
  transform: translateX(3px);
}

.v-section__more .v-icon {
  transition: transform var(--v-duration-fast) var(--v-ease-bounce);
}

/* --- Form Inputs --- */
.v-input {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--v-radius-sm);
  border: 2px solid var(--v-border);
  background: var(--v-bg-card);
  color: var(--v-text);
  font-size: 14px;
  transition: all var(--v-duration-normal) var(--v-ease-smooth);
}

.v-input:focus {
  border-color: var(--v-coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

.v-input::placeholder {
  color: var(--v-text-muted);
}

.v-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--v-radius-sm);
  border: 2px solid var(--v-border);
  background: var(--v-bg-card);
  color: var(--v-text);
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  transition: all var(--v-duration-normal) var(--v-ease-smooth);
}

.v-textarea:focus {
  border-color: var(--v-coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

/* --- Tabs --- */
.v-tabs {
  display: flex;
  gap: var(--v-space-xs);
  border-bottom: 2px solid var(--v-border-light);
  padding-bottom: 0;
  margin-bottom: var(--v-space-lg);
}

.v-tabs__item {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--v-text-secondary);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--v-duration-fast) var(--v-ease-smooth);
  border-radius: var(--v-radius-xs) var(--v-radius-xs) 0 0;
}

.v-tabs__item:hover {
  color: var(--v-coral);
  background: rgba(255, 107, 107, 0.05);
}

.v-tabs__item--active {
  color: var(--v-coral);
  border-bottom-color: var(--v-coral);
  font-weight: 600;
}

/* --- Tooltip --- */
.v-tooltip {
  position: relative;
}

.v-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 6px 12px;
  border-radius: var(--v-radius-xs);
  background: var(--v-bg-dark);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--v-duration-fast) var(--v-ease-smooth);
}

.v-tooltip:hover::after {
  opacity: 1;
}

/* --- Dialog/Modal --- */
.v-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v-dialog {
  background: var(--v-bg-card);
  border-radius: var(--v-radius-lg);
  box-shadow: var(--v-shadow-lg);
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.v-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--v-space-lg);
  border-bottom: 1px solid var(--v-border-light);
}

.v-dialog__title {
  font-size: 18px;
  font-weight: 700;
}

.v-dialog__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v-text-muted);
  transition: all var(--v-duration-fast) var(--v-ease-smooth);
}

.v-dialog__close:hover {
  background: rgba(255, 107, 107, 0.08);
  color: var(--v-coral);
}

.v-dialog__body {
  padding: var(--v-space-lg);
}

.v-dialog__footer {
  padding: var(--v-space-md) var(--v-space-lg);
  border-top: 1px solid var(--v-border-light);
  display: flex;
  justify-content: flex-end;
  gap: var(--v-space-sm);
}
