/* SPDX-License-Identifier: GPL-3.0-or-later */
/* What to Watch wizard: the iPhone app's card game on the TV. Shared by the Osama & SaRa and SmartTV apps.
   Tizen 6.5 (Chromium 85) lacks the CSS inset shorthand and aspect-ratio, so this file spells out edges and sizes. */
.wand-btn { position: relative; }
.wand-orb { width: 2.9rem; height: 2.9rem; border-radius: 50%; display: grid; place-items: center; box-sizing: border-box;
    background: linear-gradient(160deg, #9b6bff 0%, #4a2bb8 55%, #1e1450 100%); border: .14rem solid #f5c451; box-shadow: 0 0 .9rem rgba(155,107,255,.9); }
.wand-emoji { width: 1.75rem; height: 1.75rem; animation: wand-wave 3.3s ease-in-out infinite; }
@keyframes wand-wave { 0%, 78%, 100% { transform: rotate(0); } 84% { transform: rotate(-25deg); } 90% { transform: rotate(18deg); } 95% { transform: rotate(-10deg); } }
.wand-spark { position: absolute; color: #f5c451; font-size: .95rem; line-height: 1; animation: wand-twinkle 1.8s ease-in-out infinite; pointer-events: none; }
.wand-spark.a { top: -.15rem; right: -.1rem; }
.wand-spark.b { bottom: .05rem; left: -.15rem; color: #ffe9a8; font-size: .75rem; animation-delay: -.9s; }
@keyframes wand-twinkle { 0%, 100% { opacity: .15; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.1); } }
.wand-btn.focus { background: transparent; }
.wand-btn.focus .wand-orb { box-shadow: 0 0 0 .22rem #fff, 0 0 1.4rem rgba(155,107,255,1); transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) { .wand-emoji, .wand-spark { animation: none; } }
#wizard { z-index: 2; background: linear-gradient(160deg, #21164a 0%, #0e1630 48%, #07070b 100%); color: #fff; }
.wz-sky { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; overflow: hidden; }
.wz-star { position: absolute; border-radius: 50%; background: #ffe9a8; opacity: .15; animation: wz-twinkle 2.8s ease-in-out infinite; }
@keyframes wz-twinkle { 50% { opacity: .9; transform: scale(1.4); } }
.wz-page { position: absolute; top: 0; right: 0; bottom: 0; left: 0; padding: 2.4rem var(--gutter) 4rem; box-sizing: border-box; }
.wz-head { display: flex; align-items: center; gap: 2rem; }
.wz-kicker { display: flex; align-items: center; gap: .7rem; font-size: 1.3rem; font-weight: 800; letter-spacing: .25rem; text-transform: uppercase; color: #f5c451; }
.wz-orbs { display: flex; gap: .9rem; flex: 1; justify-content: center; }
.wz-orb { width: 1rem; height: 1rem; border-radius: 50%; background: rgba(255,255,255,.18); }
.wz-orb.done { background: #f5c451; }
.wz-orb.now { background: #f5c451; box-shadow: 0 0 1.2rem #f5c451; animation: wz-pulse 1.4s ease-in-out infinite; }
@keyframes wz-pulse { 50% { transform: scale(1.35); } }
.wz-close { width: 3.4rem; height: 3.4rem; border-radius: 50%; font-size: 1.5rem; background: rgba(255,255,255,.1); }
.wz-close.focus { background: #fff; color: #000; box-shadow: none; }
.wz-question { margin: 2.6rem 0 2.2rem; }
.wz-question h1 { font-size: 3.6rem; font-weight: 900; letter-spacing: -.06rem; line-height: 1.1; }
.wz-question p { margin-top: .6rem; font-size: 1.5rem; color: rgba(255,255,255,.7); }
.wz-grid { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.wz-card { position: relative; width: 19.5rem; height: 13.5rem; padding: 1.4rem; box-sizing: border-box; border-radius: 1.2rem; overflow: hidden; text-align: left;
    display: flex; flex-direction: column; justify-content: flex-end; gap: .25rem; background: #1a1830; border: .14rem solid rgba(255,255,255,.12);
    animation: wz-deal .5s cubic-bezier(.2,.9,.25,1.25) backwards; animation-delay: calc(var(--order) * 55ms); }
.wz-card::before { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(135deg, var(--c1), var(--c2)); opacity: .42; transition: opacity .2s; }
.wz-card > * { position: relative; }
.wz-card.big { width: 30rem; height: 20rem; padding: 2rem; }
.wz-card.on::before { opacity: 1; }
.wz-card.on { border-color: #fff; }
.wz-card.focus { transform: scale(1.07); box-shadow: 0 0 0 .3rem #fff, 0 1.2rem 3rem rgba(0,0,0,.6); border-color: transparent; }
.wz-card.focus::before { opacity: .85; }
.wz-card.dice { border-style: dashed; }
@keyframes wz-deal { from { opacity: 0; transform: translateY(3.5rem) rotate(-5deg); } to { opacity: 1; transform: none; } }
.wz-emoji { position: absolute; top: 1.1rem; left: 1.3rem; font-size: 3.2rem; line-height: 1; font-weight: 900; }
.wz-card.big .wz-emoji { font-size: 5.5rem; top: 1.8rem; left: 2rem; }
.wz-label { font-size: 1.55rem; font-weight: 800; line-height: 1.15; }
.wz-card.big .wz-label { font-size: 2.4rem; }
.wz-hint { font-size: 1.1rem; color: rgba(255,255,255,.82); }
.wz-card.big .wz-hint { font-size: 1.4rem; }
.wz-count { font-size: .95rem; font-weight: 700; color: rgba(255,255,255,.65); }
.wz-check { position: absolute !important; top: 1rem; right: 1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #fff; color: #000; font-weight: 900; font-size: 1.3rem; display: none; place-items: center; }
.wz-card.on .wz-check { display: grid; }
.wz-footer { display: flex; align-items: center; gap: 2rem; margin-top: 2.6rem; }
.wz-pips { display: flex; gap: .6rem; }
.wz-pip { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: .14rem solid rgba(255,255,255,.5); }
.wz-pip.on { background: #f5c451; border-color: #f5c451; }
.wz-next { min-width: 18rem; }
.wz-reading { display: flex; align-items: center; gap: 1.4rem; font-size: 1.5rem; color: rgba(255,255,255,.8); }
.wz-reading .spinner { margin: 0; }
.wz-thinking { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 6rem; gap: 1rem; }
.wz-thinking h1 { font-size: 3.2rem; font-weight: 900; margin-top: 2rem; }
.wz-line { font-size: 1.6rem; color: #f5c451; min-height: 2rem; }
.wz-lookup { font-size: 1.15rem; color: rgba(255,255,255,.6); min-height: 1.5rem; }
.wz-thinking .btn { margin-top: 2rem; }
.wz-wand { position: relative; width: 14rem; height: 14rem; display: grid; place-items: center; }
.wz-ring { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; border: .3rem solid transparent; border-top-color: #f5c451; border-right-color: rgba(245,196,81,.35); animation: wz-spin 1.6s linear infinite; }
.wz-spark { position: absolute; top: 0; right: 0; bottom: 0; left: 0; animation: wz-spin 2.4s linear infinite; }
.wz-spark::after { content: ''; position: absolute; top: -.4rem; left: 50%; width: .8rem; height: .8rem; border-radius: 50%; background: #ffe9a8; box-shadow: 0 0 1rem #ffe9a8; }
.wz-spark.s2 { animation-duration: 3.1s; animation-direction: reverse; }
.wz-spark.s3 { animation-duration: 4s; top: 2rem; right: 2rem; bottom: 2rem; left: 2rem; }
.wz-wand-emoji { width: 7rem; height: 7rem; animation: wz-wave 1s ease-in-out infinite alternate; }
@keyframes wz-spin { to { transform: rotate(360deg); } }
@keyframes wz-wave { from { transform: rotate(-14deg); } to { transform: rotate(14deg) scale(1.1); } }
.wz-result .wz-question { margin: 1.8rem 0 1.6rem; }
.wz-hero { display: flex; gap: 2.4rem; padding: 1.8rem; border-radius: 1.4rem; background: rgba(255,255,255,.06); border: .14rem solid rgba(245,196,81,.35); }
.wz-hero-art { position: relative; flex: none; width: 15rem; height: 22.5rem; border-radius: .8rem; overflow: hidden; background: var(--gray800); }
.wz-hero-art.has-image .art-fallback { opacity: 0; }
.wz-hero-art > .poster, .wz-poster .art > .poster { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.wz-hero-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.wz-badge { align-self: flex-start; padding: .35rem .9rem; border-radius: 2rem; background: #f5c451; color: #000; font-weight: 800; font-size: 1.05rem; letter-spacing: .1rem; text-transform: uppercase; }
.wz-title { font-size: 3rem; font-weight: 900; line-height: 1.1; margin: .8rem 0 .6rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wz-match { color: #46d369; font-weight: 800; }
.wz-because { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.wz-because span { padding: .3rem .8rem; border-radius: 2rem; background: rgba(255,255,255,.12); font-size: 1.05rem; font-weight: 600; }
.wz-plot { margin-top: .9rem; font-size: 1.25rem; line-height: 1.45; color: rgba(255,255,255,.85); max-width: 70rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wz-hero .buttons { margin-top: 1.3rem; }
.wz-more { display: flex; gap: 1.2rem; margin-top: 2rem; }
.wz-poster { position: relative; flex: none; width: 12rem; text-align: left; border-radius: .6rem; }
.wz-poster .art { position: relative; overflow: hidden; width: 100%; aspect-ratio: auto; height: 18rem; border-radius: .6rem; background: var(--gray800); }
.wz-poster .art::before { display: none; }
.wz-poster.focus { transform: scale(1.07); box-shadow: none; z-index: 2; }
.wz-poster.focus .art { box-shadow: 0 0 0 .25rem #fff, 0 .8rem 2rem rgba(0,0,0,.6); }
.wz-chip { position: absolute; top: .6rem; right: .6rem; padding: .15rem .55rem; border-radius: 1rem; background: rgba(0,0,0,.75); color: #46d369; font-size: .95rem; font-weight: 800; }
.wz-poster-title { display: block; margin-top: .5rem; font-size: 1rem; font-weight: 600; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-actions { margin-top: 2rem; }
.wz-empty { padding-top: 6rem; }
.wz-empty h1 { font-size: 3.2rem; font-weight: 900; }
.wz-empty p { font-size: 1.5rem; margin-top: .8rem; color: rgba(255,255,255,.7); }
@media (prefers-reduced-motion: reduce) { .wz-card, .wz-star, .wz-orb.now, .wz-ring, .wz-spark, .wz-wand-emoji { animation: none; } }
#wizard .btn.focus { background: #fff; color: #000; }
.wz-result .wz-question { margin: 1.2rem 0 1.2rem; }
.wz-result .wz-question h1 { font-size: 3rem; }
.wz-result .wz-hero { padding: 1.4rem; }
.wz-result .wz-hero-art { width: 12.5rem; height: 18.75rem; }
.wz-result .wz-more { margin-top: 1.4rem; }
.wz-result .wz-poster { width: 11rem; }
.wz-result .wz-poster .art { height: 16.5rem; }
.wz-result .wz-actions { margin-top: 1.4rem; }
.wz-kicker-wand { width: 2rem; height: 2rem; }
/* The last round ends on one big, centred "Work your magic" button, the obvious place to go next. */
.wz-footer.magic { flex-direction: column; gap: 1.2rem; margin-top: 3.4rem; }
.wz-magic { min-width: 34rem; padding: 1.5rem 3rem; border-radius: 4rem; font-size: 2.2rem; font-weight: 900; color: #1a1030;
    background: linear-gradient(135deg, #ffe08a, #f5c451 45%, #e08a1e); box-shadow: 0 0 2.4rem rgba(245,196,81,.55); animation: wz-glow 2.2s ease-in-out infinite; }
#wizard .wz-magic.focus { background: linear-gradient(135deg, #fff6d6, #ffd76a 50%, #f0a030); color: #1a1030; transform: scale(1.08); box-shadow: 0 0 0 .3rem #fff, 0 0 3.2rem rgba(245,196,81,.9); }
@keyframes wz-glow { 50% { box-shadow: 0 0 3.6rem rgba(245,196,81,.85); } }
@media (prefers-reduced-motion: reduce) { .wz-magic { animation: none; } }
/* ---- One page (iPhone 2.0 wizard): the Describe box on top, card chips inside it, rounds below ---- */
.wz-step .wz-question { margin: 1.6rem 0 1.2rem; }
.wz-step .wz-question h1 { font-size: 3rem; }
.wz-box { border-radius: 1.6rem; border: .14rem solid rgba(245,196,81,.55); background: rgba(106,60,240,.16); padding: .5rem; }
.wz-box-chips { display: flex; flex-wrap: wrap; gap: .6rem; padding: .7rem .8rem 0; }
.wz-box-chips[hidden] { display: none; }
.wz-chip-btn { display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 2rem; font-size: 1.15rem; font-weight: 700; color: #fff;
    background: rgba(245,196,81,.18); border: .1rem solid rgba(245,196,81,.5); }
.wz-chip-x { font-size: .9rem; color: rgba(255,255,255,.7); }
#wizard .wz-chip-btn.focus { background: #fff; color: #000; border-color: #fff; box-shadow: none; }
#wizard .wz-chip-btn.focus .wz-chip-x { color: #000; }
.wz-box-row { display: flex; align-items: center; gap: 1rem; }
.wz-input { flex: 1; min-width: 0; height: 4.6rem; padding: 0 1.2rem; box-sizing: border-box; border: .14rem solid transparent; border-radius: 1.1rem;
    background: transparent; color: #fff; font: inherit; font-size: 1.6rem; outline: none; }
.wz-box.big .wz-input { height: 6.4rem; font-size: 1.9rem; }
.wz-input::placeholder { color: rgba(255,255,255,.45); }
.wz-input.focus { border-color: #fff; background: rgba(255,255,255,.08); }
.wz-input:focus { border-color: #f5c451; background: rgba(255,255,255,.12); }
.wz-go { flex: none; width: 4.2rem; height: 4.2rem; margin-right: .4rem; border-radius: 50%; background: #f5c451; color: #000; font-size: 1.9rem; display: grid; place-items: center; }
.wz-go[disabled] { opacity: .35; }
#wizard .wz-go.focus { background: #fff; transform: scale(1.12); box-shadow: 0 0 0 .25rem #f5c451, 0 0 1.6rem rgba(245,196,81,.8); }
.wz-examples { display: flex; gap: .8rem; margin-top: 1rem; }
.wz-example { padding: .6rem 1.1rem; border-radius: 2rem; background: rgba(255,255,255,.08); font-size: 1.15rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28rem; }
#wizard .wz-example.focus { background: #fff; color: #000; box-shadow: none; }

.wz-step:not(.first) .wz-examples, .wz-step:not(.first) .wz-type-hint { display: none; }
.wz-type-hint { margin-top: .8rem; font-size: 1.05rem; color: rgba(255,255,255,.5); }
.wz-round { position: relative; }
.wz-round-head { display: flex; align-items: flex-end; gap: 1.4rem; margin: 2rem 0 1.2rem; }
.wz-round-text { flex: 1; min-width: 0; }
.wz-round-head h2 { font-size: 1.9rem; font-weight: 800; }
.wz-round-head p { margin-top: .3rem; font-size: 1.3rem; color: rgba(255,255,255,.7); }
.wz-round-back { padding: .5rem 1.2rem; border-radius: 2rem; background: rgba(245,196,81,.12); color: #f5c451; font-size: 1.3rem; font-weight: 700; }
#wizard .wz-round-back.focus { background: #f5c451; color: #000; box-shadow: none; }
.wz-step .wz-footer { margin-top: 1.8rem; }
.wz-step .wz-footer.magic { margin-top: 2.2rem; }
.wz-grid.big { flex-wrap: nowrap; }
.wz-step .wz-card.big { width: 22rem; height: 15rem; padding: 1.6rem; }
.wz-step .wz-card.big .wz-emoji { font-size: 4.2rem; top: 1.4rem; left: 1.6rem; }
.wz-step .wz-card.big .wz-label { font-size: 2rem; }
.wz-step .wz-card { height: 12.5rem; }

/* Sprites for the wand (js/magic.js). */
.mg-band { position: absolute; left: 0; right: 0; pointer-events: none; overflow: visible; z-index: 3; }
.mg-part, .mg-sprite { position: absolute; pointer-events: none; }
.mg-sprite { display: block; will-change: transform, opacity; }
.mg-circle { position: relative; flex: none; pointer-events: none; }

/* Thinking: the wand's circle, then three poster reels. */
.wz-thinking { padding-top: 2.4rem; }
.wz-reels { display: flex; gap: 1.2rem; margin-top: 2.4rem; }
.wz-reel { position: relative; width: 7rem; height: 10.4rem; border-radius: .8rem; overflow: hidden; opacity: .75; display: grid; place-items: center;
    background: linear-gradient(180deg, #2a3a66, #121624); }
.wz-reel.mid { opacity: 1; transform: scale(1.12); border: .14rem solid #f5c451; }
.wz-reel img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.wz-reel img[hidden] { display: none; }
.wz-reel-emoji { font-size: 3rem; }
.wz-thinking .wz-line { margin-top: 2rem; font-size: 1.8rem; font-weight: 700; color: #fff; }

/* The request on the results page. */
.wz-asked { margin-top: .6rem; }
.wz-request { font-size: 1.5rem; font-style: italic; color: #fff !important; }
.wz-summary { margin-top: .3rem !important; font-size: 1.25rem !important; }

/* Cards dealt face down that turn over (the iPhone's Flip). */
.wz-flip { position: relative; animation: wz-deal-in .5s cubic-bezier(.2,.9,.25,1.25) backwards; }
.wz-more .wz-flip { flex: none; }
.wz-front { animation: wz-front-in .26s ease-out backwards; }
.wz-back { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 1.4rem; border: .14rem solid #f5c451; background: #2b1e5c;
    display: grid; place-items: center; pointer-events: none; animation: wz-back-out .26s ease-in forwards; }
.wz-back img { width: 8.4rem; height: 8.4rem; }
.wz-back.small { border-radius: .6rem; bottom: 2.2rem; }
.wz-back.small img { width: 4rem; height: 4rem; }
@keyframes wz-deal-in { from { opacity: 0; transform: translateY(-2.5rem) scale(.8); } }
@keyframes wz-back-out { from { transform: perspective(900px) rotateY(0); } 99% { transform: perspective(900px) rotateY(90deg); opacity: 1; } to { transform: perspective(900px) rotateY(90deg); opacity: 0; } }
@keyframes wz-front-in { from { transform: perspective(900px) rotateY(-90deg); } to { transform: perspective(900px) rotateY(0); } }

/* Asked once, before the first words go to the AI. */
.wz-consent { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 20rem; }
.wz-consent-wand { width: 7rem; height: 7rem; }
.wz-consent h2 { margin-top: 1.4rem; font-size: 3rem; font-weight: 900; }
.wz-consent p { margin-top: 1rem; font-size: 1.5rem; line-height: 1.5; color: rgba(255,255,255,.8); max-width: 70rem; }
.wz-consent .buttons { margin-top: 2.2rem; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .wz-flip, .wz-front, .wz-back { animation: none; } .wz-back { display: none; } }

/* A named actor or director: how many of their titles are here, and other picks in their own row. */
.wz-person { margin-top: .4rem !important; font-size: 1.3rem !important; font-weight: 700; color: #f5c451 !important; }
.wz-also-title { margin-top: 1.6rem; font-size: 1.6rem; font-weight: 800; }
.wz-also .wz-more { margin-top: .8rem; }
