# -*- coding: utf-8 -*-
from pathlib import Path

DEFS = """subject_definitions:
<Picture 1> is the face-and-shoulders anchor for <Subject 1>: a young East Asian woman in her early twenties with long wavy dark-red hair past her chest, a heavy curled fringe, cool fair skin, a soft square-round face, bright fox-shaped almond eyes with warm brown irises and slightly lifted outer corners, light natural make-up, a small silver pendant necklace and the collar of a beige trench coat.
<Picture 2> is the full-body and costume anchor for <Subject 1>: an oversized beige trench coat worn open over a cropped white crew-neck tee, a black pleated mini skirt, matte black semi-sheer tights and chunky white Crocs clogs, her hands empty.
<Picture 3> is the environment, <Subject 2>: an empty autumn riverside promenade at golden hour - a metal railing along the left edge of a curved paved walkway, a low planting strip on the right, a river of scattered gold glints beyond the railing, a low bridge and turning trees melting into creamy bokeh, dry leaves and dust motes in the air, low warm backlight.
<Subject 1> is the young woman defined by <Picture 1> and <Picture 2>.
<Subject 2> is the riverside promenade defined by <Picture 3>."""

STYLE = ("Cinematic East-Asian beauty MV, soft dreamy glow, romantic autumn riverside, Japanese anime-CG film look, semi-realistic "
         "3D character rendering with anime design proportions, gentle handheld tracking, creamy bokeh, warm golden backlight with "
         "soft bloom, pastel cool shadows, fine film grain, airy haze, natural slow body language, flowing hair and fabric, 16:9, 24 fps, "
         "35mm shallow depth of field. Keep the frame free of green or teal bokeh discs, coloured ghosts and lens flare across her face, "
         "hair or coat; bloom only, never a green cast.")

RET = """retention_analysis:
<Subject 1> (appears in [Shot 1]): identity_fully_preserved - the same face, the same dark-red wavy hair with the curled fringe, the same beige trench, white cropped tee, black pleated skirt, black tights and white clogs.
<Picture 1> (appears in [Shot 1]): fully_referenced - her face, eyes, brows, nose, mouth, skin tone, hair colour and fringe stay identical, warm brown irises with no colour cast on the eyes.
<Picture 2> (appears in [Shot 1]): fully_referenced - the trench coat, cropped tee, pleated mini skirt, black tights, white clogs and her body proportions stay identical.
<Subject 2> (appears in [Shot 1]): fully_preserved - the railing only on the left, the curved walkway, the river, the low bridge, the turning trees, the warm backlight and the drifting leaves stay consistent.
<Picture 3> (appears in [Shot 1]): fully_preserved - rebuilt as one continuous three-dimensional space with correct perspective and parallax, never pasted as a flat backdrop, and no extra person, bench, car or building is added."""

SOUND = """overall_soundscape:
A calm riverside afternoon: water over stones, a light wind through the turning trees, dry leaves ticking on the paving, her soft footsteps and the light scuff of clogs, the faint rustle of her trench coat and pleated skirt, and the distant low hum of the city.

non_diegetic_music:
A sparse warm piano and solo violin theme in a slow 6/8 at about 66 BPM over a soft string pad, very quiet sub bass, instrumental, no vocals."""

SHOTS = [
 dict(id="s1", frames=175, summary="[reference generation] A 7.3-second 16:9 beauty-MV fragment: <Subject 1> strolls lazily along the riverside promenade of <Subject 2> at golden hour, tracked from behind her right shoulder.",
      body="""[Shot 1] 0.00s-7.29s. """+STYLE+""" Wide-to-medium tracking shot from behind her right shoulder: <Subject 1> strolls lazily along the walkway of <Subject 2>, her long wavy hair drifting in the breeze, the trench coat and pleated skirt swaying with a soft delayed inertia. Sunlit river glitter, falling leaves, the distant bridge melted into creamy bokeh, soft bloom on the highlights, slow lazy footsteps and music-video pacing. She is already mid-stride at 0.00 seconds and never faces the camera; the shot is one continuous take."""),
 dict(id="s2", frames=175, summary="[reference generation] A 7.3-second 16:9 beauty-MV fragment: the camera drifts closer behind <Subject 1> as the wind lifts strands of hair across her eyes.",
      body="""[Shot 1] 0.00s-7.29s. """+STYLE+""" Closer medium tracking shot, the camera gently drifting closer behind her right side. The wind lifts strands of her dark-red hair across her clear eyes and pale glowing skin; her gaze stays soft and slightly melancholic with a tiny natural smile, and the skirt and coat move with delayed soft inertia like real fabric. Warm rim light wraps her silhouette, dreamy bloom, beauty-commercial softness, one continuous unhurried take with no cut."""),
 dict(id="s3", frames=192, summary="[reference generation] An 8-second 16:9 beauty-MV fragment: an intimate profile close-up in which <Subject 1> slowly tucks her hair behind her ear and turns to the sparkling river.",
      body="""[Shot 1] 0.00s-8.00s. """+STYLE+""" Intimate profile close-up of <Subject 1> at the railing: she slowly lifts her hand and casually tucks her hair behind her ear in one smooth unhurried motion, then turns her face toward the sparkling river with a quiet tender smile. Creamy shallow focus, golden catchlights in her eyes, soft bloom on her cheek and hair, the railing and river dissolved into pastel bokeh, nostalgic music-video emotion, no cut inside the shot."""),
 dict(id="s4", frames=175, summary="[reference generation] A 7.3-second 16:9 beauty-MV fragment: a frontal medium chorus shot in which <Subject 1> eases to a near-stop, lifts her eyes to the lens and smiles shyly.",
      body="""[Shot 1] 0.00s-7.29s. """+STYLE+""" Front medium shot, slight low angle like a romantic MV chorus shot: <Subject 1> eases to a near-stop on the walkway, strong golden backlight with a soft glowing halo on her hair and shoulders while her face is gently filled with soft ambient light. She lifts her eyes to camera, breathes softly, gives a small shy smile and then glances down. Floating dust in the sunbeams, heavy bloom, beauty-MV glamour, no cut inside the shot."""),
 dict(id="s5", frames=158, summary="[reference generation] A 6.6-second 16:9 beauty-MV fragment: <Subject 1> resumes her slow stroll, tracked from the side-back.",
      body="""[Shot 1] 0.00s-6.58s. """+STYLE+""" Medium tracking from the side-back as <Subject 1> resumes a slow stroll along <Subject 2>: hair and skirt flow naturally, leaves drift across frame, the distant autumn trees dissolve into pastel bokeh, soft warm rim light, calm afterglow mood, music-video B-roll feeling, one continuous take."""),
 dict(id="s6", frames=141, summary="[reference generation] A 5.9-second 16:9 beauty-MV fragment: a slow pull-back wide shot as <Subject 1> walks away into a golden silhouette.",
      body="""[Shot 1] 0.00s-5.88s. """+STYLE+""" Slow pull-back wide shot: <Subject 1> walks into the distance along the glowing river path, becoming a soft golden silhouette; foreground leaves float by, haze and bloom thicken, and the image settles toward a romantic fade-out like a beauty-landscape MV outro. No text. One continuous take with no cut."""),
]

for s in SHOTS:
    txt="\n\n".join([DEFS, "summary:\n"+s["summary"], RET, "detailed_description:\n"+s["body"], SOUND])
    Path(f"prompt_{s['id']}.txt").write_text(txt+"\n", encoding="utf-8")
print("wrote", len(SHOTS))
