"""Central config for the YouTube Shorts pipeline."""
import os
from pathlib import Path

BASE_DIR = Path(__file__).parent
FOOTAGE_DIR = BASE_DIR / "footage"
AUDIO_DIR = BASE_DIR / "audio"
OUTPUT_DIR = BASE_DIR / "output"
STORIES_DIR = BASE_DIR / "stories"
LOGS_DIR = BASE_DIR / "logs"

for d in (FOOTAGE_DIR, AUDIO_DIR, OUTPUT_DIR, STORIES_DIR, LOGS_DIR):
    d.mkdir(parents=True, exist_ok=True)

# API — points at the custom Hermes provider
OPENAI_BASE_URL = os.environ.get("HERMES_CUSTOM_API_BASE_URL", "https://api.raunai.com/v1")
OPENAI_API_KEY = os.environ.get("HERMES_CUSTOM_API_RAUNAI_COM_API_KEY", "")
OPENAI_MODEL = "gpt-6-astra"

# TTS
TTS_VOICE = "en-US-AndrewMultilingualNeural"  # deep, engaging narrator voice

# Video
VIDEO_WIDTH = 1080
VIDEO_HEIGHT = 1920
TARGET_DURATION_MIN = 45   # seconds
TARGET_DURATION_MAX = 65   # seconds

# Subtitle style (burned-in ASS)
SUB_FONT = "Liberation Sans"
SUB_FONT_SIZE = 88           # px at 1080p
SUB_MARGIN_V = 470           # from bottom edge; clears Minecraft hotbar
SUB_WORDS_PER_GROUP = 3      # words shown at once
SUB_COLOR_NORMAL = "&H00FFFFFF"   # white (ASS BGR)
SUB_COLOR_HIGHLIGHT = "&H0000FFFF"  # yellow (ASS BGR)
SUB_OUTLINE_COLOR = "&H00000000"  # black
SUB_OUTLINE_SIZE = 4

# Footage clips in priority order
FOOTAGE_CLIPS = [
    FOOTAGE_DIR / "parkour_cc0.mp4",
    FOOTAGE_DIR / "parkour_cc0_map.mp4",
]

# Story themes (rotated randomly)
STORY_THEMES = [
    "workplace revenge",
    "AITA family drama",
    "relationship betrayal",
    "petty neighborhood dispute",
    "entitled customer gets karma",
    "coworker sabotage backfires",
    "creepy encounter with a twist",
    "satisfying malicious compliance",
]
