.yg-collections{--collection-panel:#fff;--collection-text:#30233f;--collection-muted:#756582;--collection-line:var(--yg-accent-border,#ddcdea);color:var(--collection-text)}
html.yg-dark .yg-collections{--collection-panel:#1b2235;--collection-text:#f1e7fa;--collection-muted:#b7a9c8;--collection-line:#443850}
.yg-collections [hidden]{display:none!important}.yg-collections .yg-section{scroll-margin-top:110px;margin:30px 0 48px}.yg-collections h2{color:var(--collection-text)!important}
.yg-collections .collection-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px}
.yg-collections .yg-card{background:var(--collection-panel)!important;border:1px solid var(--collection-line);border-radius:17px;overflow:hidden;padding:0;min-width:0}
.yg-collections .yg-card a{display:flex;flex-direction:column;height:100%;text-decoration:none;color:var(--collection-text)}
.yg-collections .yg-card img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;background:var(--collection-panel)}
.yg-collections .yg-card strong{padding:12px 14px;font-size:15px;line-height:1.5;overflow-wrap:anywhere;color:var(--collection-text)}
.collection-pagination{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-top:24px;padding:16px;border:1px solid var(--collection-line);border-radius:17px;background:var(--collection-panel)}
.collection-count{font-size:14px;color:var(--collection-muted)}.collection-pagination>div{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.collection-pagination button{min-width:42px;min-height:44px;padding:8px;border:1px solid var(--collection-line);border-radius:10px;background:transparent;color:var(--collection-text);font:600 15px/1.4 system-ui;cursor:pointer}.collection-pagination button[aria-current=page]{background:var(--yg-accent,#8055bd);color:white;border-color:var(--yg-accent,#8055bd)}.collection-pagination button:focus-visible{outline:3px solid var(--yg-accent-bright,#bb98eb);outline-offset:3px}
@media(max-width:1050px){.yg-collections .collection-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:760px){.yg-collections .collection-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}}@media(max-width:520px){.yg-collections .collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}

/* v7.27 — apply the shared theme to the whole collections page. */
body.yg-collections-page{background:radial-gradient(ellipse at 10% 0%,var(--yg-accent-soft,#ede3f8),transparent 55%),#f6f7fc!important;color:#30233f!important}
html.yg-dark body.yg-collections-page{background:radial-gradient(ellipse at 10% 0%,color-mix(in srgb,var(--yg-accent,#8055bd) 12%,transparent),transparent 55%),#0e1425!important;color:#f1e7fa!important}
.yg-collections-page .yg-wrap{width:min(1320px,calc(100% - 48px));max-width:1320px;margin:auto}
.yg-collections-page .yg-heading h1,.yg-collections-page .yg-heading p{color:inherit!important}
.yg-collections-page .yg-heading>span{color:var(--yg-accent,#8055bd)!important}
html.yg-dark .yg-collections-page .yg-heading>span{color:var(--yg-accent-bright,#bb98eb)!important}
.yg-collections .collection-grid .yg-card img{aspect-ratio:4/3!important;object-fit:contain!important;height:auto!important;max-height:none!important;flex:0 0 auto;border-radius:0!important}
.yg-collections .collection-grid .yg-card strong{display:block;min-height:65px;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
.yg-collections .yg-empty{padding:26px;background:var(--collection-panel)!important;color:var(--collection-muted)!important;border:1px solid var(--collection-line);border-radius:18px}
@media(max-width:600px){.yg-collections-page .yg-wrap{width:calc(100% - 28px)}}

/* v7.28 — slightly tighter collection spacing. */
.yg-collections .yg-section{margin-top:18px;margin-bottom:36px}
.yg-collections .yg-empty{padding:20px 26px}

/* v7.29 — bring the collection lists higher on the page. */
.yg-collections-page .yg-wrap{padding-top:32px}
.yg-collections .yg-section{margin-top:12px;margin-bottom:24px}
.yg-collections-page .yg-heading p{margin-bottom:12px}
.yg-collections .yg-section h2{margin-bottom:16px}

/* v7.31 — a little more room above Recently Played. */
.yg-collections #recent-history{margin-top:46px}
/* ===== Favorites / Recently played: premium ===== */
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections{display:grid;gap:26px}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-section{position:relative;padding:24px 26px 26px!important;border-radius:24px!important;border:1px solid #e2d6fa!important;background:radial-gradient(110% 140% at 100% 0%,rgba(138,92,240,.12),transparent 55%),linear-gradient(170deg,#ffffff,#f8f4ff)!important;box-shadow:0 18px 40px rgba(80,50,150,.08)!important}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-section>h2{display:flex!important;align-items:center;gap:14px;margin:0 0 20px!important;font-size:24px!important;font-weight:900!important;color:#21184a!important}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-section>h2::before{content:"";width:46px;height:46px;flex:none;border-radius:15px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.8 4.5c2 0 3.4 1.1 5.2 3 1.8-1.9 3.2-3 5.2-3 3.8 0 5.9 3.9 4.4 7.3C19.5 16.4 12 21 12 21Z'/%3E%3C/svg%3E") center/22px no-repeat,linear-gradient(140deg,#ff7aa8,#e0458f);box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 10px 20px rgba(224,69,143,.3)}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections #recent-history>h2::before{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center/22px no-repeat,linear-gradient(140deg,#9b72ff,#5b36c4);box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 10px 20px rgba(91,54,196,.3)}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .collection-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))!important;gap:18px!important}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card{position:relative;border-radius:18px!important;overflow:hidden!important;border:1px solid #e6dcfb!important;background:#fff!important;box-shadow:0 10px 24px rgba(80,50,150,.08)!important;transition:transform .2s ease,box-shadow .2s ease!important;padding:0!important}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card:hover{transform:translateY(-5px);box-shadow:0 22px 40px rgba(80,50,150,.18)!important}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card>a{display:flex!important;flex-direction:column;height:100%;text-decoration:none!important;color:inherit!important;padding:0!important}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card img{display:block;width:100%!important;height:auto!important;aspect-ratio:16/9!important;object-fit:cover!important;background:#1a1430!important;padding:0!important;margin:0!important;border-radius:0!important;transition:transform .35s ease}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card:hover img{transform:scale(1.05)}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card>a::before{content:"";position:absolute;left:0;right:0;top:0;aspect-ratio:16/9;background:linear-gradient(180deg,transparent 55%,rgba(16,8,40,.45));z-index:1;pointer-events:none;opacity:0;transition:opacity .2s ease}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card:hover>a::before{opacity:1}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card>a::after{content:"";position:absolute;right:12px;top:calc((100% - 56px) * 0 + 12px);width:40px;height:40px;border-radius:50%;z-index:2;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7Z'/%3E%3C/svg%3E") 55% 50%/18px no-repeat,linear-gradient(135deg,#8a5cf0,#5b36c4);box-shadow:0 8px 18px rgba(91,54,196,.45);opacity:0;transform:scale(.7);transition:opacity .2s ease,transform .2s ease}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card:hover>a::after{opacity:1;transform:scale(1)}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card strong{display:block;padding:14px 16px 16px!important;font-size:15px!important;font-weight:900!important;color:#21184a!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-top:1px solid #f0eafc}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections #favorite-games .yg-card{border-color:#f7cfe0!important}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections #favorite-games .yg-card strong{border-top-color:#fde7f1}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections #favorite-games .yg-card strong::after{content:"";display:inline-block;width:14px;height:14px;margin-left:8px;vertical-align:-1px;background:#e0458f;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.8 4.5c2 0 3.4 1.1 5.2 3 1.8-1.9 3.2-3 5.2-3 3.8 0 5.9 3.9 4.4 7.3C19.5 16.4 12 21 12 21Z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.8 4.5c2 0 3.4 1.1 5.2 3 1.8-1.9 3.2-3 5.2-3 3.8 0 5.9 3.9 4.4 7.3C19.5 16.4 12 21 12 21Z'/%3E%3C/svg%3E") center/contain no-repeat}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-empty{display:flex;align-items:center;gap:10px;padding:18px 20px;border-radius:16px;border:1px dashed #d9ccf7;background:#faf7ff;color:#6b6290;font-weight:700}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-empty[hidden]{display:none}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .collection-pagination{display:flex;justify-content:center;gap:8px;margin-top:20px}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .collection-pagination[hidden]{display:none}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .collection-pagination :is(a,button){min-width:42px;height:42px;border-radius:12px;border:1px solid #e2d6fa;background:#fff;color:#4a4468;font-weight:800}
html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .collection-pagination :is([aria-current],.active,.is-current){color:#fff;border-color:transparent;background:linear-gradient(135deg,#8a5cf0,#5b36c4);box-shadow:0 8px 18px rgba(91,54,196,.3)}
@media(max-width:560px){html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-section{padding:18px 14px!important}html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card strong{font-size:13px!important;padding:10px 12px 12px!important}}
@media(prefers-reduced-motion:reduce){html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card:hover,html:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card:hover img{transform:none}}
html.yg-dark:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-section{background:linear-gradient(170deg,#211c39,#1a1630)!important;border-color:#3a3360!important}
html.yg-dark:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-section>h2,html.yg-dark:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card strong{color:#f1ecff!important}
html.yg-dark:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card{background:#251f40!important;border-color:#3a3360!important}
html.yg-dark:not(#ygf1):not(#ygf2):not(#ygf3) body.yg-collections-page .yg-collections .yg-card strong{border-top-color:#3a3360}
/* Favorites: heart as a badge on the thumbnail corner */
html:not(#ygf1):not(#ygf2):not(#ygf3):not(#ygf4) body.yg-collections-page .yg-collections #favorite-games .yg-card strong::after{content:none!important;display:none!important}
html:not(#ygf1):not(#ygf2):not(#ygf3):not(#ygf4) body.yg-collections-page .yg-collections #favorite-games .yg-card::before{content:"";position:absolute;top:10px;left:10px;z-index:3;width:34px;height:34px;border-radius:50%;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23ff8fb5'/%3E%3Cstop offset='1' stop-color='%23e0458f'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.8 4.5c2 0 3.4 1.1 5.2 3 1.8-1.9 3.2-3 5.2-3 3.8 0 5.9 3.9 4.4 7.3C19.5 16.4 12 21 12 21Z'/%3E%3C/svg%3E") center/18px no-repeat,rgba(255,255,255,.94);box-shadow:0 6px 14px rgba(224,69,143,.35),inset 0 0 0 1px rgba(255,255,255,.8);backdrop-filter:blur(4px);transition:transform .2s ease;pointer-events:none}
html:not(#ygf1):not(#ygf2):not(#ygf3):not(#ygf4) body.yg-collections-page .yg-collections #favorite-games .yg-card:hover::before{transform:scale(1.12)}
@media(prefers-reduced-motion:reduce){html:not(#ygf1):not(#ygf2):not(#ygf3):not(#ygf4) body.yg-collections-page .yg-collections #favorite-games .yg-card:hover::before{transform:none}}
/* Recently played: clock badge on the thumbnail corner */
html:not(#ygf1):not(#ygf2):not(#ygf3):not(#ygf4) body.yg-collections-page .yg-collections #recent-history .yg-card::before{content:"";position:absolute;top:10px;left:10px;z-index:3;width:34px;height:34px;border-radius:50%;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a3fd6' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center/18px no-repeat,rgba(255,255,255,.94);box-shadow:0 6px 14px rgba(91,54,196,.35),inset 0 0 0 1px rgba(255,255,255,.8);backdrop-filter:blur(4px);transition:transform .2s ease;pointer-events:none}
html:not(#ygf1):not(#ygf2):not(#ygf3):not(#ygf4) body.yg-collections-page .yg-collections #recent-history .yg-card:hover::before{transform:scale(1.12)}
@media(prefers-reduced-motion:reduce){html:not(#ygf1):not(#ygf2):not(#ygf3):not(#ygf4) body.yg-collections-page .yg-collections #recent-history .yg-card:hover::before{transform:none}}
