/* Vizualizare: nebula violet and starlight gold over the 3D stage. The overlays are plain translucent fills that
   only fade and move (no backdrop blur, no blend modes, no masks): heavy CSS effects over WebGL can stall its frames. */
:root {
    --al-gold: #f6d58e;
    --al-violet: #b79cff;
    --al-ink: #0b0620;
    --al-text: #efeaff;
    --al-muted: #b3abd6;
    --al-glass: rgba(16, 10, 40, .86);
    --al-glass-2: rgba(16, 10, 40, .66);
    --al-line: rgba(183, 156, 255, .28);
    --al-err: #ff9a8a;
}
body.vizualizare-page { background: #07041a; color: var(--al-text); overflow-x: clip; }
.al-main { width: min(100% - 32px, 1180px); margin: 0 auto; padding-top: 96px; padding-bottom: 46px; }
.al-intro { margin-bottom: 18px; }
.al-eyebrow { margin: 0 0 4px; color: var(--al-gold); font: 700 .74rem/1.2 system-ui, sans-serif; letter-spacing: .14em; }
.al-intro h1 { margin: 0 0 6px; font: 700 clamp(2rem, 4vw, 3rem)/1.05 Georgia, "Times New Roman", serif; color: #fff4dc; }
.al-intro p { margin: 0; max-width: 70ch; color: var(--al-muted); }
.al-intro strong { color: var(--al-gold); }

/* the stage */
.al-stage {
    position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; min-height: 480px; max-height: 86vh;
    border-radius: 18px; border: 1px solid var(--al-line); background: #06031a; box-shadow: 0 24px 70px #000b;
    color: var(--al-text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; outline: none;
}
@media (max-width: 760px) { .al-stage { aspect-ratio: auto; height: 84svh; min-height: 520px; max-height: none; border-radius: 14px; } }
.al-stage:fullscreen, .al-stage:-webkit-full-screen { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; aspect-ratio: auto; }
.al-stage.is-faux-full { position: fixed; inset: 0; z-index: 1052; width: 100vw; height: 100vh; height: 100dvh; max-height: none; min-height: 0; border-radius: 0; border: 0; aspect-ratio: auto; }
body.al-noscroll { overflow: hidden; }
.al-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.al-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--al-gold); letter-spacing: .06em; z-index: 1; }
.al-stage.is-ready .al-loading { display: none; }
.al-flash { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 35%, rgba(255, 246, 220, .95), rgba(220, 200, 255, .4) 45%, rgba(0, 0, 0, 0) 78%); }

/* labels that follow the crystals and the steps */
.al-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.al-label {
    position: absolute; left: 0; top: 0; pointer-events: auto; will-change: transform; white-space: nowrap; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
    background: var(--al-glass-2); color: #fff; border: 1px solid color-mix(in srgb, var(--c, #fff) 55%, transparent);
    font: 600 .82rem/1.4 system-ui, sans-serif; letter-spacing: .02em; transition: background .2s, box-shadow .2s;
}
.al-label:hover, .al-label:focus-visible { background: var(--al-glass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, #fff) 30%, transparent); outline: none; }
.al-label-step { --c: var(--al-violet); max-width: 190px; padding: 3px 10px 3px 4px; font-size: .76rem; }
.al-label-step b { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .14); font-size: .72rem; }
.al-label-step span { overflow: hidden; text-overflow: ellipsis; }
.al-label-step.is-done { --c: var(--al-gold); color: var(--al-gold); }
.al-label-step.is-done b { background: var(--al-gold); color: #241600; }
.al-label-step.is-done b::after { content: ""; }
.al-label-step.is-next { animation: al-pulse 2.2s ease-in-out infinite; }
@keyframes al-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(246, 213, 142, 0); } 50% { box-shadow: 0 0 0 5px rgba(246, 213, 142, .25); } }
@media (max-width: 560px) { .al-label-step span { display: none; } .al-label-step { padding: 3px; } }

/* tools */
.al-tools { position: absolute; right: 12px; top: 12px; z-index: 6; display: flex; gap: 8px; }
.al-round {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--al-line);
    background: var(--al-glass-2); color: var(--al-text); cursor: pointer; transition: background .2s, color .2s;
}
.al-round:hover, .al-round:focus-visible { background: var(--al-glass); color: var(--al-gold); outline: none; }
.al-round[hidden] { display: none; }
.al-panel {
    position: absolute; right: 12px; top: 60px; z-index: 7; width: min(330px, calc(100% - 24px)); padding: 14px 16px;
    border-radius: 14px; background: var(--al-glass); border: 1px solid var(--al-line); box-shadow: 0 16px 40px #000a;
}
.al-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.al-panel h2 { margin: 0; font-size: 1rem; color: var(--al-gold); }
.al-x { border: 0; background: none; color: var(--al-muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.al-x:hover { color: #fff; }
.al-switch, .al-select, .al-range { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: .88rem; }
.al-select select { flex: 1; padding: 5px 8px; border-radius: 8px; background: #160e36; color: var(--al-text); border: 1px solid var(--al-line); }
.al-range span { width: 60px; }
.al-range input { flex: 1; accent-color: var(--al-gold); }
.al-switch input { accent-color: var(--al-gold); width: 18px; height: 18px; flex: none; }

/* cards */
.al-card {
    width: min(560px, 100%); padding: 18px 20px; border-radius: 16px; background: var(--al-glass); border: 1px solid var(--al-line);
    box-shadow: 0 20px 50px #000b; pointer-events: auto;
}
.al-card h2 { margin: 0 0 8px; font: 700 1.35rem/1.2 Georgia, "Times New Roman", serif; color: #fff4dc; }
.al-card p { margin: 0 0 10px; line-height: 1.5; }
.al-card a { color: var(--al-gold); }
.al-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.al-card-head h2, .al-card-head p { margin: 0; }
.al-muted { color: var(--al-muted); font-size: .86rem; }
.al-sub { margin: 10px 0 6px !important; color: var(--al-muted); font-size: .82rem; letter-spacing: .04em; }
.al-msg { min-height: 1.2em; font-size: .86rem; color: var(--al-gold); margin: 6px 0 !important; }
.al-msg:empty { min-height: 0; margin: 0 !important; }
.al-msg.is-err { color: var(--al-err); }

.al-cover { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(7, 4, 26, .25), rgba(7, 4, 26, .7)); overflow-y: auto; }
.al-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; padding: 0 12px 14px; pointer-events: none; animation: al-up .45s ease-out; }
.al-sheet .al-card { max-height: calc(100% - 70px); overflow-y: auto; }
@keyframes al-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.al-main [hidden] { display: none !important; }

.al-hint { position: absolute; left: 50%; top: 18px; z-index: 4; transform: translateX(-50%); width: min(560px, calc(100% - 130px)); text-align: center; pointer-events: none; }
.al-hint p { margin: 0; }
.al-hint #al-portal-text { padding: 6px 14px; border-radius: 12px; background: var(--al-glass-2); display: inline-block; }
@media (max-width: 560px) {
    .al-hint { top: auto; bottom: 14px; left: 12px; right: 12px; width: auto; transform: none; }
    .al-hint #al-portal-text { font-size: .9rem; }
}

.al-input {
    width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--al-line); background: #120a2e; color: #fff;
    font: inherit; outline: none; transition: border-color .2s, box-shadow .2s;
}
.al-input:focus { border-color: var(--al-gold); box-shadow: 0 0 0 3px rgba(246, 213, 142, .18); }
.al-textarea { resize: vertical; min-height: 64px; }
.al-keyrow, .al-wishrow { display: flex; gap: 8px; align-items: stretch; }
.al-keyrow .al-input { font-family: ui-monospace, Consolas, monospace; }

.al-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 11px;
    border: 1px solid transparent; font: 700 .92rem/1.2 system-ui, sans-serif; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s;
}
.al-btn:active { transform: scale(.97); }
.al-btn:disabled { opacity: .4; cursor: default; }
.al-btn-main { background: linear-gradient(135deg, #f6d58e, #e7a9ff); color: #1d0f33; box-shadow: 0 6px 22px rgba(231, 169, 255, .25); }
.al-btn-main:hover { box-shadow: 0 8px 30px rgba(246, 213, 142, .4); }
.al-btn-ghost { background: rgba(255, 255, 255, .06); color: var(--al-text); border-color: var(--al-line); }
.al-btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.al-sm { padding: 6px 11px; font-size: .82rem; }
.al-wide { width: 100%; margin-top: 8px; }
.al-grow { flex: 1; }
.al-link { border: 0; background: none; padding: 0; color: var(--al-gold); text-decoration: underline; cursor: pointer; font: inherit; }
.al-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.al-mic.is-on { background: #b91c1c; color: #fff; animation: al-pulse 1.2s infinite; }

.al-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.al-chip {
    padding: 5px 10px; border-radius: 999px; border: 1px solid var(--al-line); background: rgba(255, 255, 255, .05); color: var(--al-text);
    font-size: .8rem; cursor: pointer; text-align: left; transition: background .2s, border-color .2s;
}
.al-chip:hover { background: rgba(255, 255, 255, .12); }
.al-chip[aria-pressed="true"] { border-color: var(--al-gold); background: rgba(246, 213, 142, .16); color: #fff4dc; }

/* the wish */
.al-wishcard { border-color: color-mix(in srgb, var(--c, #b79cff) 55%, transparent); box-shadow: 0 20px 50px #000b, 0 0 40px color-mix(in srgb, var(--c, #b79cff) 18%, transparent); }
#al-wish-cat { color: var(--c, #fff); }
.al-invoke-btn { font-size: 1.02rem; padding: 12px; }

/* the invocation */
.al-invoke { top: auto; bottom: 40px; }
.al-invoke-line { font: italic 600 clamp(1.1rem, 2.4vw, 1.5rem)/1.3 Georgia, serif; color: #fff4dc; text-shadow: 0 2px 18px #000; animation: al-breathe 3.4s ease-in-out infinite; }
.al-invoke .al-muted { margin-top: 6px !important; text-shadow: 0 1px 8px #000; }
.al-invoke .al-link { pointer-events: auto; margin-top: 10px; font-size: .85rem; }
@keyframes al-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* the vision */
.al-vision .al-card { text-align: center; width: min(640px, 100%); background: rgba(12, 7, 32, .8); }
.al-aff { font-style: italic; color: var(--al-gold); }
.al-vline { min-height: 3em; font: 500 clamp(1rem, 2.1vw, 1.2rem)/1.5 Georgia, serif; color: #fff; opacity: 0; }
.al-vline.is-in { animation: al-line 1.4s ease-out forwards; }
@keyframes al-line { from { opacity: 0; transform: translateY(6px); filter: none; } to { opacity: 1; transform: none; } }
.al-dots { display: flex; justify-content: center; gap: 6px; margin: 4px 0 2px; }
.al-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .18); transition: background .4s; }
.al-dots i.is-on { background: var(--al-gold); }
.al-vision .al-row { justify-content: center; }
#al-v-path.is-ready { animation: al-pulse 1.8s ease-in-out infinite; }
.al-painting { position: absolute; left: 14px; bottom: 14px; z-index: 6; margin: 0; padding: 5px 11px; border-radius: 999px; background: var(--al-glass-2); color: var(--al-gold); font-size: .78rem; animation: al-breathe 2.4s infinite; }
.al-stage[data-phase="vision"] .al-painting, .al-stage[data-phase="step"] .al-painting { bottom: auto; top: 60px; }

/* the Crystal Path */
.al-pathbar { position: absolute; left: 12px; top: 12px; z-index: 5; width: min(460px, calc(100% - 200px)); padding: 10px 12px; border-radius: 14px; background: var(--al-glass-2); border: 1px solid var(--al-line); }
.al-ptitle { margin: 0 0 6px; font: 700 1rem/1.25 Georgia, serif; color: #fff4dc; }
.al-pprog { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--al-muted); }
.al-pbar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.al-pbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--al-violet), var(--al-gold)); transition: width .8s ease; }
.al-pbtns { margin-top: 8px; }
.al-penvs { margin-top: 6px; }
.al-penvs .al-chip { font-size: .74rem; padding: 3px 8px; }
@media (max-width: 760px) {
    .al-pathbar { width: calc(100% - 24px); top: 60px; padding: 8px 10px; }
    .al-pbtns .al-btn { padding: 5px 9px; font-size: .76rem; }
    .al-penvs { display: none; }
}
.al-stepcard { border-color: color-mix(in srgb, var(--c, #b79cff) 55%, transparent); }
.al-stepcard.is-done { box-shadow: 0 20px 50px #000b, 0 0 36px rgba(246, 213, 142, .25); }
.al-today { padding: 9px 12px; border-radius: 10px; background: rgba(246, 213, 142, .1); border: 1px solid rgba(246, 213, 142, .3); font-size: .92rem; line-height: 1.45; }
.al-today b { color: var(--al-gold); }
#al-s-done.is-done { background: rgba(255, 255, 255, .08); color: var(--al-text); border-color: var(--al-line); box-shadow: none; }
.al-stage[data-phase="step"] .al-pathbar { opacity: .35; }
@media (max-width: 760px) { .al-stage[data-phase="step"] .al-pathbar { display: none; } }
.al-donecard { text-align: center; border-color: rgba(246, 213, 142, .5); }
.al-donecard .al-row { justify-content: center; }

.al-toast { position: absolute; left: 50%; top: 64px; z-index: 8; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 12px; background: var(--al-glass); border: 1px solid rgba(246, 213, 142, .35); color: #fff4dc; font-size: .88rem; text-align: center; animation: al-up .3s ease-out; }

/* ✨ Trăiește-o: the film */
.al-film { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.al-film-top { position: absolute; left: 16px; top: 14px; display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 999px; background: var(--al-glass-2); }
.al-film-top .al-eyebrow { margin: 0; }
.al-film-top .al-dots { margin: 0; }
.al-dots i.is-now { box-shadow: 0 0 0 3px rgba(246, 213, 142, .25); }
.al-film-cap {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 16px 16px; text-align: center; pointer-events: none;
    background: linear-gradient(to bottom, rgba(6, 3, 20, 0), rgba(6, 3, 20, .78) 45%, rgba(6, 3, 20, .9));
}
.al-film-title { margin: 0 0 6px; color: var(--al-gold); font: 700 .8rem/1.2 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; min-height: 1em; }
.al-film-text {
    margin: 0 auto 14px; max-width: 780px; color: #fff; font: 500 clamp(1.05rem, 2.3vw, 1.45rem)/1.5 Georgia, "Times New Roman", serif;
    text-shadow: 0 2px 14px #000; opacity: 0;
}
.al-film-text.is-in { animation: al-line 1.8s ease-out forwards; }
.al-film-ctrl, .al-film-end { display: flex; justify-content: center; gap: 10px; pointer-events: auto; }
.al-film-end { margin-top: 0; }
.al-round:disabled { opacity: .35; cursor: default; }
.al-round[aria-pressed="true"] { color: var(--al-gold); border-color: rgba(246, 213, 142, .6); }
.al-round-big { width: 48px; height: 48px; }
.al-pulse { animation: al-pulse 1.8s ease-in-out infinite; }
.al-stage[data-phase="film"] #al-t-key { display: none; }
@media (max-width: 560px) { .al-film-top { right: 16px; left: 12px; top: 60px; justify-content: space-between; } .al-film-cap { padding-top: 50px; } }

/* my wishes */
.al-wishes { margin-top: 28px; }
.al-wishes h2 { font: 700 1.4rem/1.2 Georgia, serif; color: #fff4dc; margin: 0 0 12px; }
.al-wishes h2 i { color: var(--al-gold); margin-right: 6px; }
.al-empty { color: var(--al-muted); }
.al-wishes-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.al-wcard {
    display: grid; grid-template-columns: 52px 1fr; gap: 6px 12px; padding: 14px; border-radius: 14px; background: rgba(20, 12, 48, .8);
    border: 1px solid color-mix(in srgb, var(--c, #b79cff) 40%, transparent);
}
.al-wcard-sym { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 1.7rem; background: color-mix(in srgb, var(--c, #b79cff) 22%, transparent); }
.al-wcard-body { min-width: 0; }
.al-wcard-body h3 { margin: 0 0 4px; font: 700 1.05rem/1.25 Georgia, serif; color: #fff4dc; }
.al-wcard-cat { margin: 0 0 2px; color: var(--al-muted); font-size: .74rem; letter-spacing: .04em; }
.al-wcard-wish { margin: 0 0 8px; color: var(--al-muted); font-size: .84rem; font-style: italic; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.al-wcard-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.al-wcard-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--c, #b79cff), var(--al-gold)); }
.al-wcard-n { margin: 4px 0 0; font-size: .78rem; color: var(--al-gold); }
.al-wcard-btns { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.al-wcard-btns .al-btn { padding: 6px 12px; font-size: .82rem; }

.al-about { margin-top: 26px; padding: 12px 16px; border-radius: 14px; background: rgba(20, 12, 48, .6); border: 1px solid var(--al-line); }
.al-about summary { cursor: pointer; font-weight: 700; color: var(--al-gold); }
.al-about ul { margin: 10px 0 0; padding-left: 1.2rem; color: var(--al-muted); line-height: 1.55; }
.al-about li { margin-bottom: 6px; }
.al-about strong { color: var(--al-text); }
.al-about a, .al-powered a { color: var(--al-gold); }
.al-powered { margin-top: 18px; color: var(--al-muted); font-size: .86rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
    .al-sheet, .al-toast, .al-vline.is-in { animation: none; opacity: 1; }
    .al-label-step.is-next, .al-pulse, .al-invoke-line, .al-painting { animation: none; }
    .al-film-text.is-in { animation: none; opacity: 1; }
}
