/* versevid Shared Components */

/* ===================== TopNav ===================== */
.vv-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-default);
}
.vv-nav__inner {
  max-width: var(--container-full);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.vv-logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-semibold);
  color: var(--brand-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.vv-logo__mark {
  color: var(--brand-secondary);
  font-size: 1.1em;
  line-height: 0;
  transform: translateY(0.1em);
}
.vv-nav__links {
  display: flex;
  gap: var(--space-6);
  flex: 1;
}
.vv-nav__link {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--space-2) 0;
  position: relative;
  transition: color var(--duration-fast) var(--easing-out);
}
.vv-nav__link:hover { color: var(--text-primary); }
.vv-nav__link--active { color: var(--text-primary); font-weight: var(--fw-medium); }
.vv-nav__link--active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -19px;
  height: 2px;
  background: var(--brand-primary);
  border-radius: 2px;
}
.vv-nav__actions { display: flex; gap: var(--space-3); align-items: center; }

/* ===================== Search ===================== */
.vv-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  height: 36px;
  background: var(--surface-muted);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  width: 260px;
  transition: border-color var(--duration-fast) var(--easing-out);
}
.vv-search:focus-within { border-color: var(--brand-primary); background: var(--surface); }
.vv-search input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.vv-search input::placeholder { color: var(--text-muted); }
.vv-search__icon {
  width: 16px; height: 16px;
  color: var(--text-muted);
}

/* ===================== Buttons ===================== */
.vv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
  height: 40px;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--easing-out);
  white-space: nowrap;
  cursor: pointer;
}
.vv-btn--sm  { height: 32px; padding: 0 var(--space-4); font-size: var(--text-xs); }
.vv-btn--lg  { height: 48px; padding: 0 var(--space-6); font-size: var(--text-base); border-radius: var(--radius-lg); }
.vv-btn--xl  { height: 56px; padding: 0 var(--space-8); font-size: var(--text-lg); border-radius: var(--radius-lg); }

.vv-btn--primary   { background: var(--brand-primary); color: var(--text-inverse); }
.vv-btn--primary:hover   { background: var(--brand-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.vv-btn--secondary { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-strong); }
.vv-btn--secondary:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.vv-btn--brand-outline { background: transparent; color: var(--brand-primary); border: 1px solid var(--brand-primary); }
.vv-btn--brand-outline:hover { background: var(--brand-primary); color: var(--text-inverse); }
.vv-btn--ghost { background: transparent; color: var(--text-primary); }
.vv-btn--ghost:hover { background: var(--surface-strong); }
.vv-btn--accent { background: var(--brand-accent); color: var(--text-inverse); }
.vv-btn--accent:hover { background: #C8324B; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.vv-btn--danger { background: var(--error); color: var(--text-inverse); }

.vv-btn:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

/* ===================== Cards ===================== */
.vv-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-default);
  overflow: hidden;
  transition: all var(--duration-normal) var(--easing-out);
}
.vv-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

/* ===================== Sentence Card ===================== */
.vv-sentence-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-6) var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: all var(--duration-normal) var(--easing-out);
  position: relative;
}
.vv-sentence-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.vv-sentence-card__quote {
  font-family: var(--font-display);
  font-size: var(--text-quote-md);
  line-height: var(--leading-quote-md);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  font-weight: var(--fw-regular);
}
.vv-sentence-card__quote::before {
  content: "「";
  color: var(--brand-secondary);
  font-size: 1.1em;
  margin-right: -0.1em;
}
.vv-sentence-card__quote::after {
  content: "」";
  color: var(--brand-secondary);
  font-size: 1.1em;
}
.vv-sentence-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.vv-sentence-card__source { font-style: italic; }
.vv-sentence-card__actions { display: flex; gap: var(--space-4); color: var(--text-muted); }
.vv-sentence-card__action { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); }
.vv-sentence-card__action:hover { color: var(--brand-secondary); }

/* ===================== Video Card ===================== */
.vv-video-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-default);
  transition: all var(--duration-normal) var(--easing-out);
  display: flex;
  flex-direction: column;
}
.vv-video-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.vv-video-card__thumb {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.vv-video-card__thumb-text {
  font-family: var(--font-display);
  color: rgba(255,255,255,0.95);
  font-size: var(--text-xl);
  line-height: 1.5;
  text-align: center;
  font-weight: var(--fw-regular);
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  letter-spacing: 0.02em;
}
.vv-video-card__price {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  padding: 4px 10px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: var(--text-inverse);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
}
.vv-video-card__price--free { background: rgba(47, 158, 99, 0.85); }
.vv-video-card__play {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
}
.vv-video-card__duration {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  padding: 2px 8px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: var(--text-inverse);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}
.vv-video-card__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.vv-video-card__title {
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vv-video-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.vv-video-card__author {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.vv-video-card__stats { display: flex; gap: var(--space-3); }

/* ===================== Thumb gradient palette ===================== */
.vv-thumb--ink     { background: linear-gradient(135deg, #2C2A4A 0%, #4A4670 100%); }
.vv-thumb--dawn    { background: linear-gradient(135deg, #C8A26B 0%, #E94560 100%); }
.vv-thumb--mist    { background: linear-gradient(135deg, #6D6759 0%, #131210 100%); }
.vv-thumb--paper   { background: linear-gradient(135deg, #FAF8F5 0%, #C8A26B 100%); color: var(--neutral-900); }
.vv-thumb--paper .vv-video-card__thumb-text { color: var(--neutral-900); text-shadow: none; }
.vv-thumb--bamboo  { background: linear-gradient(135deg, #2F5D4A 0%, #1A2E1F 100%); }
.vv-thumb--plum    { background: linear-gradient(135deg, #6D2E5C 0%, #2C2A4A 100%); }
.vv-thumb--cinder  { background: linear-gradient(135deg, #36322A 0%, #6D6759 50%, #36322A 100%); }
.vv-thumb--sea     { background: linear-gradient(135deg, #3B6E8F 0%, #1A2E3A 100%); }

/* ===================== Avatar ===================== */
.vv-avatar {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-inverse);
  flex-shrink: 0;
}
.vv-avatar--md { width: 36px; height: 36px; font-size: var(--text-sm); }
.vv-avatar--lg { width: 48px; height: 48px; font-size: var(--text-base); }
.vv-avatar--xl { width: 72px; height: 72px; font-size: var(--text-2xl); }
.vv-avatar--ink     { background: var(--brand-primary); }
.vv-avatar--gold    { background: var(--brand-secondary); }
.vv-avatar--bamboo  { background: #2F5D4A; }
.vv-avatar--plum    { background: #6D2E5C; }
.vv-avatar--sea     { background: var(--info); }

/* ===================== Tag / Chip ===================== */
.vv-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  background: var(--surface-strong);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all var(--duration-fast) var(--easing-out);
}
.vv-chip:hover { color: var(--brand-primary); border-color: var(--border-default); }
.vv-chip--brand { background: rgba(200, 162, 107, 0.12); color: #8C6F3C; }
.vv-chip--accent { background: rgba(233, 69, 96, 0.1); color: #B82E47; }
.vv-chip--success { background: rgba(47, 158, 99, 0.1); color: var(--success); }

/* ===================== Section Header ===================== */
.vv-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-default);
}
.vv-section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}
.vv-section-header__title-en {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--fw-regular);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.vv-section-header__more {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.vv-section-header__more:hover { color: var(--brand-primary); }

/* ===================== Container / Layout ===================== */
.vv-container { max-width: var(--container-full); margin: 0 auto; padding: 0 var(--space-6); }
.vv-container--narrow { max-width: var(--container-narrow); }
.vv-container--base   { max-width: var(--container-base); }
.vv-container--wide   { max-width: var(--container-wide); }

.vv-grid { display: grid; gap: var(--space-6); }
.vv-grid--sentences-3 { grid-template-columns: repeat(3, 1fr); }
.vv-grid--videos-4 { grid-template-columns: repeat(4, 1fr); }

/* ===================== Footer ===================== */
.vv-footer {
  margin-top: var(--space-24);
  padding: var(--space-16) var(--space-6) var(--space-8);
  background: var(--surface);
  border-top: 1px solid var(--border-default);
  color: var(--text-secondary);
}
.vv-footer__inner {
  max-width: var(--container-full);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
}
.vv-footer__brand .vv-logo { margin-bottom: var(--space-4); }
.vv-footer__tagline { font-size: var(--text-sm); line-height: 1.7; max-width: 320px; }
.vv-footer__col h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.vv-footer__col ul { list-style: none; padding: 0; margin: 0; }
.vv-footer__col li { margin-bottom: var(--space-2); }
.vv-footer__col a { color: var(--text-secondary); font-size: var(--text-sm); }
.vv-footer__col a:hover { color: var(--text-primary); }
.vv-footer__bottom {
  max-width: var(--container-full);
  margin: var(--space-12) auto 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ===================== Mobile breakpoints ===================== */
@media (max-width: 880px) {
  .vv-container, .vv-container--wide, .vv-container--base, .vv-container--narrow { padding: 0 var(--space-4); }
  .vv-nav__inner { padding: var(--space-3) var(--space-4); gap: var(--space-4); }
  .vv-nav__links { display: none; }
  .vv-search { width: auto; flex: 1; }
  .vv-grid--sentences-3 { grid-template-columns: 1fr; gap: var(--space-4); }
  .vv-grid--videos-4 { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .vv-video-card__body { padding: var(--space-3); }
  .vv-video-card__title { font-size: var(--text-sm); }
  .vv-sentence-card { padding: var(--space-5); }
  .vv-sentence-card__quote { font-size: var(--text-quote-sm); line-height: var(--leading-quote-sm); }
  .vv-section-header { margin-bottom: var(--space-5); }
  .vv-section-header__title { font-size: var(--text-xl); }
  .vv-footer__inner { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .vv-footer__bottom { flex-direction: column; gap: var(--space-2); }
}

@media (max-width: 480px) {
  .vv-grid--videos-4 { grid-template-columns: 1fr 1fr; }
  .vv-footer__inner { grid-template-columns: 1fr; }
}

/* ===================== Frame label ===================== */
/* For prototype-only viewport labels */
.vv-frame-label {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 999;
  padding: 4px 10px;
  background: rgba(36,30,20,0.85);
  color: #fff;
  font-size: 11px;
  font-family: var(--font-mono);
  border-radius: var(--radius-full);
  pointer-events: none;
}
