@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --ink: #243044;
    --muted: #728097;
    --paper: rgba(255,255,255,.58);
    --paper-strong: rgba(255,255,255,.74);
    --line: rgba(255,255,255,.72);
    --cyan: #74d9ff;
    --violet: #9a8cff;
    --pink: #ff9ac8;
    --mint: #8ee8d0;
    --shadow: 0 30px 90px rgba(89, 105, 145, .15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "DM Sans", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 8%, rgba(116,217,255,.35), transparent 28%),
        radial-gradient(circle at 92% 15%, rgba(255,154,200,.30), transparent 28%),
        radial-gradient(circle at 78% 92%, rgba(154,140,255,.24), transparent 30%),
        linear-gradient(135deg, #f9fcff 0%, #f7f5ff 48%, #fffaff 100%);
    overflow-x: hidden;
    isolation: isolate;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: .5;
    background-image:
        linear-gradient(rgba(100,120,150,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100,120,150,.035) 1px, transparent 1px);
    background-size: 32px 32px;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 35%, rgba(230,235,247,.25) 100%);
}

.shell {
    width: min(1080px, calc(100% - 36px));
    margin: auto;
    padding: 28px 0 36px;
    position: relative;
    z-index: 1;
}

/* Soft 3D ambient objects */
.ambient {
    position: fixed;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
    z-index: -1;
    animation: breatheFloat 7s ease-in-out infinite;
}
.ambient-one {
    width: 230px; height: 230px; left: -90px; top: 28%;
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(116,217,255,.17) 45%, transparent 70%);
}
.ambient-two {
    width: 310px; height: 310px; right: -130px; bottom: 6%;
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(154,140,255,.16) 45%, transparent 70%);
    animation-delay: -3s;
}

.floating-object {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    transform-style: preserve-3d;
    animation: floatObject 8s ease-in-out infinite;
}
.floating-object-one { left: 4vw; top: 24%; width: 105px; height: 105px; }
.floating-object-two { right: 5vw; top: 61%; animation-delay: -3.5s; }

.orb-ring {
    position: absolute;
    inset: 13px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 50%;
    box-shadow: inset 0 0 22px rgba(116,217,255,.18), 0 10px 35px rgba(116,217,255,.10);
}
.ring-a { transform: rotateX(68deg) rotateZ(12deg); }
.ring-b { transform: rotateY(68deg) rotateZ(-18deg); }
.orb-core {
    position: absolute;
    inset: 29px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fff, #9ee9ff 35%, #9a8cff 100%);
    box-shadow: 0 0 35px rgba(116,217,255,.35), inset -10px -10px 18px rgba(105,91,190,.18);
    transform: translateZ(20px);
}
.mini-cube {
    width: 54px; height: 54px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-18deg) rotateY(35deg) rotateZ(8deg);
    animation: cubeSpin 11s linear infinite;
}
.mini-cube span {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,.85);
    background: linear-gradient(135deg, rgba(255,255,255,.68), rgba(154,140,255,.22));
    backdrop-filter: blur(8px);
}
.mini-cube span:nth-child(1) { transform: rotateY(0deg) translateZ(27px); }
.mini-cube span:nth-child(2) { transform: rotateY(90deg) translateZ(27px); }
.mini-cube span:nth-child(3) { transform: rotateY(180deg) translateZ(27px); }
.mini-cube span:nth-child(4) { transform: rotateY(-90deg) translateZ(27px); }

.topbar { display:flex; justify-content:space-between; align-items:center; }
.brand { display:flex; align-items:center; gap:12px; }
.brand-mark {
    width:44px; height:44px; display:grid; place-items:center; border-radius:15px;
    color:white; font-weight:800; font-size:22px;
    background: linear-gradient(145deg, rgba(116,217,255,.9), rgba(154,140,255,.95));
    box-shadow: 0 14px 32px rgba(116,217,255,.22), inset 1px 1px 1px rgba(255,255,255,.8);
    transform: translateZ(12px);
}
.brand-name { font-weight:800; font-size:17px; letter-spacing:-.4px; }
.brand-sub { color:var(--muted); font-size:11px; margin-top:2px; }
.demo-pill {
    border:1px solid rgba(255,255,255,.8); padding:8px 12px; border-radius:99px;
    font-size:11px; font-weight:800; letter-spacing:1px; background:rgba(255,255,255,.48);
    backdrop-filter: blur(16px); box-shadow: 0 10px 25px rgba(80,90,120,.08);
}
.demo-pill span { display:inline-block; width:7px; height:7px; border-radius:50%; background:#76dbbb; margin-right:6px; box-shadow:0 0 12px #76dbbb; }

.hero { text-align:center; padding:76px 0 40px; }
.eyebrow { color:#7385b8; font-size:11px; letter-spacing:2.5px; font-weight:800; margin-bottom:12px; }
.hero h1 { font-family:"Playfair Display",serif; font-size:clamp(42px,7vw,72px); line-height:.98; letter-spacing:-2.8px; margin:0; text-shadow:0 12px 35px rgba(110,120,160,.08); }
.hero h1 span { background:linear-gradient(90deg,#4fcbe9,#8f7cf4,#e98dbd); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero p { max-width:590px; margin:20px auto 0; color:var(--muted); font-size:16px; line-height:1.7; }

.glass-3d {
    --rx: 0deg;
    --ry: 0deg;
    --mx: 50%;
    --my: 50%;
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .22s ease, box-shadow .22s ease;
    will-change: transform;
}
.glass-3d::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,.58), transparent 34%);
    opacity: .8;
    z-index: 0;
}
.glass-3d > * { position: relative; z-index: 1; }

.card {
    max-width:800px; margin:0 auto; padding:34px; border:1px solid var(--line);
    border-radius:30px; background:linear-gradient(135deg, rgba(255,255,255,.73), rgba(255,255,255,.42));
    backdrop-filter:blur(24px) saturate(135%); -webkit-backdrop-filter:blur(24px) saturate(135%);
    box-shadow:var(--shadow), inset 0 1px 0 rgba(255,255,255,.9);
    animation: breathingPanel 6s ease-in-out infinite;
}

.progress-row { display:flex; justify-content:space-between; align-items:center; }
.small-label { display:block; font-size:9px; color:#8b97ad; letter-spacing:2px; font-weight:800; margin-bottom:5px; }
.progress-row strong { font-size:13px; }
.progress-number { font-size:40px; font-weight:800; color:#d9e0ee; letter-spacing:-2px; }
.progress-track { height:7px; background:rgba(225,231,241,.7); border-radius:99px; margin:18px 0 35px; overflow:hidden; }
.progress-track div { height:100%; width:14%; border-radius:99px; background:linear-gradient(90deg,var(--cyan),var(--violet),var(--pink)); transition:width .45s cubic-bezier(.2,.8,.2,1); box-shadow:0 0 16px rgba(116,217,255,.35); }

.question-area { text-align:center; }
.question-icon {
    margin:auto; width:46px; height:46px; display:grid; place-items:center; border-radius:16px;
    background:linear-gradient(145deg,rgba(255,255,255,.82),rgba(116,217,255,.18));
    border:1px solid rgba(255,255,255,.9); color:#6c91c9; font-size:21px;
    box-shadow:0 12px 28px rgba(100,120,160,.12); transform:translateZ(20px);
}
.question-area h2 { margin:17px 0 5px; font-family:"Playfair Display",serif; font-size:30px; letter-spacing:-.7px; }
.hint { color:#8a96aa; font-size:12px; margin:0 0 22px; }

.options { display:grid; grid-template-columns:1fr 1fr; gap:10px; text-align:left; }
.option {
    border:1px solid rgba(255,255,255,.82); background:rgba(255,255,255,.52); border-radius:15px; min-height:58px;
    padding:10px 14px; display:flex; align-items:center; gap:12px; cursor:pointer;
    color:var(--ink); font:600 13px "DM Sans"; text-align:left; transition:.2s ease;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.8), 0 8px 22px rgba(80,95,125,.04);
    backdrop-filter:blur(12px);
}
.option:hover { transform:translateY(-3px) translateZ(8px); border-color:rgba(116,217,255,.75); box-shadow:0 13px 28px rgba(80,120,150,.11); }
.option.selected { border-color:rgba(116,217,255,.9); background:linear-gradient(135deg,rgba(255,255,255,.75),rgba(116,217,255,.16)); box-shadow:0 0 0 3px rgba(116,217,255,.10), 0 14px 30px rgba(116,217,255,.10); }
.option-letter { width:28px; height:28px; border-radius:9px; display:grid; place-items:center; background:rgba(229,236,247,.72); color:#71809a; font-size:11px; }
.option.selected .option-letter { background:linear-gradient(135deg,#70d8f4,#9284ef); color:white; }
.check { margin-left:auto; color:#6bcfe6; opacity:0; }
.option.selected .check { opacity:1; }

.primary-btn, .ghost-btn {
    border:0; border-radius:14px; cursor:pointer; font:800 13px "DM Sans";
}
.primary-btn {
    width:100%; margin-top:25px; padding:16px; color:white;
    background:linear-gradient(100deg,#67cfe9,#897cef,#dc8fbd);
    box-shadow:0 15px 34px rgba(125,119,220,.24), inset 0 1px 1px rgba(255,255,255,.65);
    transition:.2s; position:relative; overflow:hidden;
}
.primary-btn::after {
    content:""; position:absolute; width:80px; height:160%; top:-30%; left:-100px;
    transform:rotate(18deg); background:rgba(255,255,255,.28); filter:blur(5px);
    animation:buttonShine 4.5s ease-in-out infinite;
}
.primary-btn:not(:disabled):hover { transform:translateY(-3px) translateZ(10px); box-shadow:0 19px 40px rgba(125,119,220,.30); }
.primary-btn:disabled { opacity:.42; cursor:not-allowed; }
.primary-btn span { margin-left:8px; }
.ghost-btn { background:rgba(255,255,255,.55); border:1px solid rgba(255,255,255,.82); padding:11px 15px; color:#65728a; backdrop-filter:blur(14px); }

.results { margin-top:30px; }
.results-head { display:flex; justify-content:space-between; align-items:end; margin-bottom:22px; gap:20px; }
.results-head h2 { font:700 40px "Playfair Display"; margin:0 0 5px; letter-spacing:-1px; }
.results-head p { color:var(--muted); margin:0; font-size:13px; }
.movie-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.movie-card {
    display:grid; grid-template-columns:50px 84px 1fr; gap:14px; align-items:center; padding:17px;
    background:linear-gradient(135deg,rgba(255,255,255,.7),rgba(255,255,255,.42));
    border:1px solid rgba(255,255,255,.82); border-radius:20px;
    box-shadow:0 16px 38px rgba(70,85,120,.09), inset 0 1px 0 rgba(255,255,255,.9);
    backdrop-filter:blur(20px); animation:cardIn .55s both;
}
.movie-card:nth-child(2){animation-delay:.06s}.movie-card:nth-child(3){animation-delay:.12s}.movie-card:nth-child(4){animation-delay:.18s}.movie-card:nth-child(5){animation-delay:.24s}
.rank { color:#aeb8ca; font-size:14px; font-weight:800; }
.poster-placeholder {
    height:105px; border-radius:13px; display:grid; place-items:center; color:white; font:700 34px "Playfair Display";
    background:linear-gradient(145deg,#7cdbed,#9487ee,#e596c1);
    box-shadow:inset 1px 1px 0 rgba(255,255,255,.5), 0 12px 25px rgba(110,120,170,.18);
    transform:translateZ(16px);
}
.match { color:#6d8ed0; font-size:9px; letter-spacing:1.3px; font-weight:800; }
.movie-info h3 { font-size:16px; margin:5px 0 9px; }
.tags { display:flex; gap:5px; flex-wrap:wrap; }
.tags span { font-size:9px; padding:5px 7px; border-radius:99px; background:rgba(229,235,245,.72); color:#68768e; }
.movie-info p { font-size:10px; color:#8a96aa; margin:8px 0 0; }

footer { display:flex; justify-content:center; gap:8px; margin-top:38px; color:#9aa5b7; font-size:10px; }
footer span:first-child { color:#7e75d7; font-weight:800; }

[hidden] { display:none !important; }

@keyframes breathingPanel {
    0%,100% { box-shadow:var(--shadow), inset 0 1px 0 rgba(255,255,255,.9); }
    50% { box-shadow:0 36px 105px rgba(89,105,145,.19), inset 0 1px 0 rgba(255,255,255,.95); }
}
@keyframes breatheFloat {
    0%,100% { transform:translate3d(0,0,0) scale(1); }
    50% { transform:translate3d(0,-18px,0) scale(1.035); }
}
@keyframes floatObject {
    0%,100% { transform:translate3d(0,0,0) rotateX(0deg) rotateY(0deg); }
    50% { transform:translate3d(0,-24px,35px) rotateX(8deg) rotateY(18deg); }
}
@keyframes cubeSpin {
    from { transform:rotateX(-18deg) rotateY(0deg) rotateZ(8deg); }
    to { transform:rotateX(-18deg) rotateY(360deg) rotateZ(8deg); }
}
@keyframes buttonShine {
    0%,55% { left:-100px; }
    75%,100% { left:120%; }
}
@keyframes cardIn {
    from { opacity:0; transform:perspective(900px) translateY(18px) rotateX(4deg); }
    to { opacity:1; transform:perspective(900px) translateY(0) rotateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

@media (max-width:700px) {
    .shell { width:min(100% - 22px, 560px); }
    .hero { padding-top:55px; }
    .hero h1 { font-size:46px; }
    .card { padding:22px; border-radius:24px; }
    .options, .movie-grid { grid-template-columns:1fr; }
    .results-head { align-items:flex-start; flex-direction:column; }
    .floating-object { opacity:.5; transform:scale(.75); }
    .floating-object-one { left:-18px; }
    .floating-object-two { right:-10px; }
}

/* --- Trailer + creator upgrade --- */
.creator-badge { padding:10px 15px; border-radius:999px; color:#65718b; font-size:11px; background:rgba(255,255,255,.58); border:1px solid rgba(255,255,255,.86); box-shadow:0 12px 30px rgba(80,95,130,.08), inset 0 1px 0 rgba(255,255,255,.9); backdrop-filter:blur(18px); }
.creator-badge strong { color:#756de0; margin-left:4px; text-shadow:0 0 18px rgba(117,109,224,.25); }
footer b { color:#756de0; }
.movie-grid { grid-template-columns:repeat(3,1fr); perspective:1400px; }
.movie-card { position:relative; min-height:188px; overflow:hidden; grid-template-columns:42px 76px 1fr; cursor:pointer; transform-style:preserve-3d; transition:transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
.movie-card:hover { transform:translateY(-8px) rotateX(2deg) rotateY(-2deg) translateZ(10px); border-color:rgba(117,210,239,.72); box-shadow:0 28px 58px rgba(72,90,130,.15), 0 0 0 1px rgba(255,255,255,.7) inset; }
.movie-card:focus-visible { outline:3px solid rgba(117,210,239,.55); outline-offset:3px; }
.card-glow { position:absolute; inset:-40%; background:radial-gradient(circle,rgba(111,213,242,.18),transparent 38%); opacity:0; transition:opacity .3s; pointer-events:none; }
.movie-card:hover .card-glow { opacity:1; }
.poster-placeholder { height:112px; position:relative; overflow:hidden; }
.poster-placeholder i { position:absolute; right:6px; bottom:6px; width:25px; height:25px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.9); color:#6f7dd2; font-size:9px; font-style:normal; box-shadow:0 5px 15px rgba(50,60,100,.16); }
.poster-placeholder span { transform:translateZ(18px); }
.watch-pill { position:absolute; right:14px; top:13px; padding:6px 9px; border-radius:999px; background:rgba(255,255,255,.68); color:#6e75b9; border:1px solid rgba(255,255,255,.9); font-size:8px; font-weight:900; letter-spacing:.7px; opacity:.78; }
.movie-card:hover .watch-pill { opacity:1; }
.match { color:#6d8ed0; }
.trailer-modal { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:24px; }
.trailer-modal[hidden] { display:none; }
.modal-backdrop { position:absolute; inset:0; background:rgba(206,215,231,.48); backdrop-filter:blur(18px); }
.trailer-panel { width:min(980px,96vw); padding:24px; border-radius:30px; background:linear-gradient(145deg,rgba(255,255,255,.83),rgba(241,247,255,.58)); border:1px solid rgba(255,255,255,.92); box-shadow:0 35px 100px rgba(54,67,104,.25), inset 0 1px 0 white; z-index:1; animation:modalIn .45s cubic-bezier(.2,.8,.2,1); }
.trailer-heading { padding:5px 42px 17px 4px; }
.trailer-heading h2 { margin:0 0 5px; font:700 clamp(27px,4vw,42px) "Playfair Display"; letter-spacing:-1px; }
.trailer-heading p { margin:0; color:#7d8aa2; font-size:12px; }
.close-modal { position:absolute; right:17px; top:15px; width:38px; height:38px; border:1px solid rgba(255,255,255,.9); border-radius:50%; background:rgba(255,255,255,.68); color:#69758d; font-size:25px; cursor:pointer; box-shadow:0 10px 25px rgba(70,80,110,.1); }
.video-frame { position:relative; overflow:hidden; aspect-ratio:16/9; border-radius:22px; background:#e9eef7; box-shadow:0 18px 45px rgba(50,65,100,.15); border:1px solid rgba(255,255,255,.8); }
.video-frame iframe { width:100%; height:100%; border:0; display:block; }
.youtube-link { display:inline-flex; margin:14px 0 0 3px; color:#7074c9; font-size:11px; font-weight:800; text-decoration:none; }
.youtube-link:hover { text-decoration:underline; }
body.modal-open { overflow:hidden; }
@keyframes modalIn { from { opacity:0; transform:perspective(1000px) translateY(22px) scale(.96) rotateX(3deg); } to { opacity:1; transform:perspective(1000px) translateY(0) scale(1) rotateX(0); } }
@media (max-width:900px) { .movie-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:700px) { .creator-badge { font-size:9px; padding:8px 10px; } .movie-grid { grid-template-columns:1fr; } .movie-card { min-height:170px; } .trailer-panel { padding:15px; border-radius:22px; } }
