/* Hook Library styles conforming to RETINA dark visual identity */

:root {
  --bg-main: #09090B;
  --bg-sidebar: #101012;
  --bg-card: #171719;
  --bg-card-hover: #1f1f22;
  --bg-input: #161618;
  --border-color: #2A2A2D;
  --border-highlight: #3e3e44;
  --text-main: #F2F2F4;
  --text-muted: #B8BBC3;
  --accent-purple: #E51C35;
  --accent-purple-hover: #ff2942;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
}

.custom-thin-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.custom-thin-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-thin-scrollbar::-webkit-scrollbar-thumb {
  background: #23273c;
  border-radius: 9999px;
}

/* Hooks Responsive Grid */
.hooks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* Hook Card */
.hook-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

.hook-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* Thumbnail Container */
.card-thumb-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #05060a;
  overflow: hidden;
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hook-card:hover .card-thumb-img {
  transform: scale(1.03);
}

/* Overlays on Thumbnail */
.thumb-top-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.multiplier-badge {
  background: rgba(22, 22, 26, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(229, 28, 53, 0.5);
  color: #F2F2F4;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.multiplier-badge svg {
  color: #E51C35;
}

.tier-badge {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2.5px 8px;
  border-radius: 5px;
}

.duration-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 0.7rem;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Card Body */
.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.38;
  margin: 0 0 8px 0;
  color: #ffffff;
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover {
  color: var(--accent-purple);
}

/* Channel Row */
.card-channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.channel-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.channel-avatar {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.channel-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verified-icon {
  width: 14px;
  height: 14px;
  color: #38bdf8;
  flex-shrink: 0;
}

.more-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.more-btn:hover {
  color: #cbd5e1;
}

/* Hook Text Box */
.hook-text-box {
  background-color: #0c0d16;
  border: 1px solid #1a1c2a;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.hook-text-body {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.2s ease;
}

.hook-text-body.expanded {
  display: block;
}

.read-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  margin-top: 6px;
  color: var(--accent-purple);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color 0.15s ease;
}

.read-toggle-btn:hover {
  color: #a78bfa;
}

/* Metadata Chips Row */
.meta-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.meta-chip {
  background-color: #141624;
  border: 1px solid #23273c;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-chip svg {
  width: 12px;
  height: 12px;
  color: #64748b;
}

/* Actions Row */
.card-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.action-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: #141624;
  border: 1px solid #23273c;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.action-icon-btn:hover {
  background-color: #222226;
  color: #F2F2F4;
  border-color: #3A3A3E;
}

.action-icon-btn.active {
  color: #E51C35;
  border-color: rgba(229, 28, 53, 0.4);
  background-color: rgba(229, 28, 53, 0.15);
}

.copy-btn {
  flex: 1;
  height: 36px;
  background-color: #B80E24;
  border: 1px solid #E51C35;
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(229, 28, 53, 0.25);
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background-color: #E51C35;
  box-shadow: 0 6px 18px rgba(229, 28, 53, 0.4);
}

.copy-btn.copied {
  background-color: #059669;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Phase 3 Archetype & Guidance Styles */
.archetype-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: 6px;
  background-color: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
  cursor: pointer;
  transition: all 0.15s ease;
}

.archetype-badge:hover {
  background-color: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.6);
  color: #ede9fe;
}

.guidance-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 600;
  padding: 2.5px 7px;
  border-radius: 6px;
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* Secondary Action Buttons */
.card-tools-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tool-chip-btn {
  background-color: #141624;
  border: 1px solid #23273c;
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-chip-btn:hover {
  background-color: #1c1f33;
  border-color: #3b4260;
  color: #ffffff;
}

.tool-chip-btn.purple-btn {
  background-color: rgba(229, 28, 53, 0.15);
  border-color: rgba(229, 28, 53, 0.35);
  color: #ff99a8;
}

.tool-chip-btn.purple-btn:hover {
  background-color: rgba(229, 28, 53, 0.25);
  border-color: rgba(229, 28, 53, 0.6);
  color: #ffffff;
}

/* Variant Cards */
.variant-card {
  background-color: #141624;
  border: 1px solid #23273c;
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}

.variant-card:hover {
  border-color: #353a56;
}

.variant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.variant-angle {
  font-weight: 700;
  color: #f1f5f9;
  font-size: 0.78rem;
}

.variant-text {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #e2e8f0;
  background-color: #0c0d16;
  border: 1px solid #1a1c2a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.variant-why {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 10px;
  font-style: italic;
}

.variant-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sm-action {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-secondary {
  background-color: #1e2238;
  border: 1px solid #2a304e;
  color: #cbd5e1;
}

.btn-secondary:hover {
  background-color: #272c48;
  color: #ffffff;
}

.btn-primary-purple {
  background-color: #B80E24;
  border: 1px solid #E51C35;
  color: #ffffff;
}

.btn-primary-purple:hover {
  background-color: #E51C35;
}

/* Quick Filter Buttons & Silver Red States */
.quick-filter-btn {
  background-color: #161618 !important;
  color: #B8BBC3 !important;
  border: 1px solid #2A2A2D !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-filter-btn:hover:not(.active) {
  background-color: #222226 !important;
  border-color: #3A3A3E !important;
  color: #F2F2F4 !important;
}

.quick-filter-btn.active {
  background-color: #B80E24 !important;
  border-color: #E51C35 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px -2px rgba(229, 28, 53, 0.4) !important;
}

/* Favorites Filter Button */
#favoritesFilterBtn {
  background-color: #161618;
  border: 1px solid #2A2A2D;
  color: #B8BBC3;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#favoritesFilterBtn:hover:not(.active) {
  background-color: #222226;
  border-color: #3A3A3E;
  color: #F2F2F4;
}

#favoritesFilterBtn.active {
  background-color: #281216 !important;
  border-color: #E51C35 !important;
  color: #F2F2F4 !important;
  box-shadow: 0 0 12px rgba(229, 28, 53, 0.3) !important;
}

/* Card Highlight Ring */
.hook-card.highlight-card {
  outline: 2px solid #E51C35;
  box-shadow: 0 0 25px rgba(229, 28, 53, 0.35);
}

