/* YB Video brand and card interaction fixes — MVC Phase 4.1 */
:root { --yb-link: #c8ff00; --yb-link-hover: #e1ff70; }
body a:not(.yb-brand):not(.yb-credit):not(.player-button):not(.profile-button):not(.buy):not(.hero-cta):not(.subscription-action-link):not(.credits-card button) {
  color: var(--yb-link) !important;
  text-decoration-color: currentColor;
}
body a:not(.yb-brand):not(.yb-credit):not(.player-button):not(.profile-button):not(.buy):not(.hero-cta):not(.subscription-action-link):not(.credits-card button):hover {
  color: var(--yb-link-hover) !important;
}
/* Public profile links are readable, wrap cleanly, and use the brand lime. */
#publicProfileLink, #publicProfileLink a { color: var(--yb-link) !important; overflow-wrap: anywhere; }
#publicProfileLink a { text-decoration: underline !important; text-underline-offset: 3px; }

/* Studio generation cards: keep thumbnails inside the card and clickable. */
#historyList.history-list { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:12px !important; align-items:stretch; }
#historyList .history-item.video-library-card { display:flex !important; flex-direction:column !important; align-items:stretch !important; width:auto !important; min-width:0 !important; max-width:100% !important; overflow:hidden !important; box-sizing:border-box !important; }
#historyList .video-library-thumb-link { display:block !important; position:relative !important; align-self:stretch !important; width:100% !important; min-width:0 !important; max-width:100% !important; height:auto !important; aspect-ratio:9/16 !important; overflow:hidden !important; flex:0 0 auto !important; cursor:pointer !important; pointer-events:auto !important; z-index:2 !important; }
#historyList .video-library-thumb-link img.video-library-thumb { position:absolute !important; inset:0 !important; display:block !important; width:100% !important; height:100% !important; max-width:100% !important; object-fit:cover !important; margin:0 !important; pointer-events:none !important; }
#historyList .history-item > a:not(.video-library-thumb-link) { display:none !important; }
#historyList .history-item .download-link, #historyList .history-item a[href*="cloudfront.net"] { display:none !important; }
#historyList .video-library-title, #historyList .video-library-meta { width:100%; min-width:0; overflow-wrap:anywhere; }
#historyList .video-library-actions { display:flex; width:100%; align-items:stretch; }
#historyList .history-recreate { display:block !important; width:100% !important; align-self:stretch !important; }
@media (max-width:620px) { #historyList.history-list { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:9px !important; } }
@media (max-width:390px) { #historyList.history-list { grid-template-columns:1fr !important; } }

/* Separate monthly and annual subscriptions at a glance. */
.subscription-grid[data-public-period="monthly"] .price,
.subscription-cards[data-subscription-period="monthly"] .credits-card:not(.current) {
  background:linear-gradient(145deg,#343940 0%,#24272d 52%,#181a1f 100%) !important;
  border-color:#737b87;
}
.subscription-grid[data-public-period="yearly"] .price,
.subscription-cards[data-subscription-period="yearly"] .credits-card:not(.current) {
  background:linear-gradient(145deg,#3b3018 0%,#292112 52%,#18150f 100%) !important;
  border-color:#9e813b;
}
.subscription-cards[data-subscription-period="monthly"] .credits-card.featured,
.subscription-grid[data-public-period="monthly"] .price.featured { border-color:#a3e635 !important; }
.subscription-cards[data-subscription-period="monthly"] .credits-card.best-value,
.subscription-grid[data-public-period="monthly"] .price.best-value { border-color:#facc15 !important; }
.subscription-cards[data-subscription-period="yearly"] .credits-card.featured,
.subscription-grid[data-public-period="yearly"] .price.featured { border-color:#a3e635 !important; }
.subscription-cards[data-subscription-period="yearly"] .credits-card.best-value,
.subscription-grid[data-public-period="yearly"] .price.best-value { border-color:#facc15 !important; }
/* One-time packs remain distinctly purple-tinted. */
.purchase-group[data-purchase-group="packs"] .credits-card,
.price-grid.pack-grid .price { background:linear-gradient(145deg,#2b1b3b 0%,#1d1527 55%,#121016 100%) !important; border-color:#704a92 !important; }

/* Replace the plain local-copy sentence with a small, clickable brand logo. */
.local-copy-brand { display:inline-flex; align-items:center; justify-content:center; margin-top:10px; padding:5px 9px; border-radius:8px; }
.local-copy-brand img { display:block; width:76px; max-width:100%; height:auto; object-fit:contain; }
.local-copy-brand:focus-visible { outline:2px solid var(--yb-link); outline-offset:3px; }
@media(max-width:700px) { #historyList.history-list { grid-template-columns:repeat(2,minmax(0,1fr)) !important; } }

/* Owner library cards use the same shared thumbnail component as Studio/public profiles. */
#profileVideos .profile-video-card { overflow:hidden !important; min-width:0 !important; max-width:100% !important; box-sizing:border-box !important; align-items:stretch !important; }
#profileVideos .video-library-thumb-link { width:100% !important; max-width:100% !important; align-self:stretch !important; }
#profileVideos .video-library-thumb-link img { position:absolute !important; inset:0 !important; width:100% !important; height:100% !important; max-width:100% !important; object-fit:cover !important; }
#profileVideos .profile-video-actions { width:100% !important; min-width:0 !important; }
#profileVideos .profile-video-actions a, #profileVideos .profile-video-actions button { box-sizing:border-box !important; max-width:100% !important; }
