Spaces:
Running
Running
Initial publish: mood_engine
Browse files- .gitignore +3 -0
- README.md +60 -4
- index.html +37 -16
- mood_engine/__init__.py +0 -0
- mood_engine/__pycache__/main.cpython-312.pyc +0 -0
- mood_engine/main.py +202 -0
- mood_engine/static/index.html +27 -0
- mood_engine/static/main.js +47 -0
- mood_engine/static/style.css +25 -0
- pyproject.toml +29 -0
- style.css +399 -16
.gitignore
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
__pycache__/
|
| 2 |
+
*.egg-info/
|
| 3 |
+
build/
|
README.md
CHANGED
|
@@ -1,10 +1,66 @@
|
|
| 1 |
---
|
| 2 |
title: Mood Engine
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
|
|
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Mood Engine
|
| 3 |
+
emoji: 🎭
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
short_description: "Full emotion system with personality presets"
|
| 9 |
+
tags:
|
| 10 |
+
- reachy_mini
|
| 11 |
+
- reachy_mini_python_app
|
| 12 |
---
|
| 13 |
+
# Mood Engine 🎭🤖
|
| 14 |
|
| 15 |
+
Full emotion state machine for Reachy Mini with 6 base emotions, compound emotions, personality presets, micro-expressions, mood decay, and configurable web UI.
|
| 16 |
+
|
| 17 |
+
## Emotions
|
| 18 |
+
|
| 19 |
+
**Base:** neutral, happy, sad, curious, surprised, angry
|
| 20 |
+
|
| 21 |
+
**Compound:** bittersweet, awestruck, nervous, frustrated, intrigued, content
|
| 22 |
+
|
| 23 |
+
## Personality Presets
|
| 24 |
+
|
| 25 |
+
| Personality | Style |
|
| 26 |
+
|------------|-------|
|
| 27 |
+
| 🐱 Shy | Subtle movements, slow transitions |
|
| 28 |
+
| 🦁 Bold | Exaggerated movements, fast transitions |
|
| 29 |
+
| 🐒 Playful | Bouncy movements, quick changes |
|
| 30 |
+
|
| 31 |
+
## Features
|
| 32 |
+
|
| 33 |
+
- Smooth emotion transitions with natural durations
|
| 34 |
+
- Micro-expressions (random subtle twitches every 3-8s)
|
| 35 |
+
- Mood decay toward neutral over time
|
| 36 |
+
- Emotion memory (history of transitions)
|
| 37 |
+
- Compound emotions via blending
|
| 38 |
+
- Personality modifiers affect intensity, speed, and idle behavior
|
| 39 |
+
- REST API for control
|
| 40 |
+
|
| 41 |
+
## API (port 8042)
|
| 42 |
+
|
| 43 |
+
```bash
|
| 44 |
+
# Set emotion
|
| 45 |
+
curl -X POST http://localhost:8042/emotion -H "Content-Type: application/json" -d '{"emotion": "happy", "intensity": 0.8}'
|
| 46 |
+
|
| 47 |
+
# Set compound emotion
|
| 48 |
+
curl -X POST http://localhost:8042/emotion -d '{"emotion": "awestruck"}'
|
| 49 |
+
|
| 50 |
+
# Change personality
|
| 51 |
+
curl -X POST http://localhost:8042/personality -d '{"personality": "playful"}'
|
| 52 |
+
|
| 53 |
+
# Get current state
|
| 54 |
+
curl http://localhost:8042/state
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## Requirements
|
| 58 |
+
|
| 59 |
+
- `numpy`
|
| 60 |
+
|
| 61 |
+
## Install & Run
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
pip install .
|
| 65 |
+
reachy-mini run mood_engine
|
| 66 |
+
```
|
index.html
CHANGED
|
@@ -1,19 +1,40 @@
|
|
| 1 |
<!doctype html>
|
| 2 |
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
</
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
</p>
|
| 17 |
</div>
|
| 18 |
-
</
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
<!doctype html>
|
| 2 |
<html>
|
| 3 |
+
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="utf-8" />
|
| 6 |
+
<meta name="viewport" content="width=device-width" />
|
| 7 |
+
<title> Mood Engine </title>
|
| 8 |
+
<link rel="stylesheet" href="style.css" />
|
| 9 |
+
</head>
|
| 10 |
+
|
| 11 |
+
<body>
|
| 12 |
+
<div class="hero">
|
| 13 |
+
<div class="hero-content">
|
| 14 |
+
<div class="app-icon">🤖⚡</div>
|
| 15 |
+
<h1> Mood Engine </h1>
|
| 16 |
+
<p class="tagline">Enter your tagline here</p>
|
| 17 |
</div>
|
| 18 |
+
</div>
|
| 19 |
+
|
| 20 |
+
<div class="container">
|
| 21 |
+
<div class="main-card">
|
| 22 |
+
<div class="app-preview">
|
| 23 |
+
<div class="preview-image">
|
| 24 |
+
<div class="camera-feed">🛠️</div>
|
| 25 |
+
</div>
|
| 26 |
+
</div>
|
| 27 |
+
</div>
|
| 28 |
+
</div>
|
| 29 |
+
|
| 30 |
+
<div class="footer">
|
| 31 |
+
<p>
|
| 32 |
+
🤖 Mood Engine •
|
| 33 |
+
<a href="https://github.com/pollen-robotics" target="_blank">Pollen Robotics</a> •
|
| 34 |
+
<a href="https://huggingface.co/spaces/pollen-robotics/reachy-mini-landing-page#apps" target="_blank">Browse More
|
| 35 |
+
Apps</a>
|
| 36 |
+
</p>
|
| 37 |
+
</div>
|
| 38 |
+
</body>
|
| 39 |
+
|
| 40 |
+
</html>
|
mood_engine/__init__.py
ADDED
|
File without changes
|
mood_engine/__pycache__/main.cpython-312.pyc
ADDED
|
Binary file (10.2 kB). View file
|
|
|
mood_engine/main.py
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Mood Engine — Full emotion state machine with personality presets and micro-expressions."""
|
| 2 |
+
|
| 3 |
+
import threading
|
| 4 |
+
import time
|
| 5 |
+
import enum
|
| 6 |
+
import math
|
| 7 |
+
from dataclasses import dataclass, field
|
| 8 |
+
from typing import Optional
|
| 9 |
+
|
| 10 |
+
import numpy as np
|
| 11 |
+
from reachy_mini import ReachyMini, ReachyMiniApp
|
| 12 |
+
from reachy_mini.utils import create_head_pose
|
| 13 |
+
from pydantic import BaseModel
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class Emotion(str, enum.Enum):
|
| 17 |
+
NEUTRAL = "neutral"
|
| 18 |
+
HAPPY = "happy"
|
| 19 |
+
SAD = "sad"
|
| 20 |
+
CURIOUS = "curious"
|
| 21 |
+
SURPRISED = "surprised"
|
| 22 |
+
ANGRY = "angry"
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
class Personality(str, enum.Enum):
|
| 26 |
+
SHY = "shy"
|
| 27 |
+
BOLD = "bold"
|
| 28 |
+
PLAYFUL = "playful"
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
# Emotion poses: (yaw, pitch, roll, ant_l_deg, ant_r_deg)
|
| 32 |
+
EMOTION_POSES = {
|
| 33 |
+
Emotion.NEUTRAL: (0, 0, 0, 0, 0),
|
| 34 |
+
Emotion.HAPPY: (0, -5, 0, 25, 25),
|
| 35 |
+
Emotion.SAD: (0, 10, 0, -15, -15),
|
| 36 |
+
Emotion.CURIOUS: (12, -8, 10, 20, 5),
|
| 37 |
+
Emotion.SURPRISED: (0, -12, 0, 35, 35),
|
| 38 |
+
Emotion.ANGRY: (0, 5, 0, -20, -20),
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
# Personality modifiers
|
| 42 |
+
PERSONALITY_MODS = {
|
| 43 |
+
Personality.SHY: {"intensity": 0.5, "transition_speed": 0.5, "idle_amplitude": 0.3},
|
| 44 |
+
Personality.BOLD: {"intensity": 1.5, "transition_speed": 1.5, "idle_amplitude": 1.2},
|
| 45 |
+
Personality.PLAYFUL: {"intensity": 1.2, "transition_speed": 2.0, "idle_amplitude": 1.5},
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
# Transition speeds between emotions (seconds)
|
| 49 |
+
TRANSITION_DURATIONS = {
|
| 50 |
+
(Emotion.NEUTRAL, Emotion.SURPRISED): 0.15,
|
| 51 |
+
(Emotion.HAPPY, Emotion.SURPRISED): 0.2,
|
| 52 |
+
(Emotion.NEUTRAL, Emotion.CURIOUS): 0.4,
|
| 53 |
+
(Emotion.SAD, Emotion.ANGRY): 0.4,
|
| 54 |
+
(Emotion.ANGRY, Emotion.SAD): 0.8,
|
| 55 |
+
}
|
| 56 |
+
DEFAULT_TRANSITION = 0.6
|
| 57 |
+
|
| 58 |
+
# Compound emotions
|
| 59 |
+
COMPOUND_EMOTIONS = {
|
| 60 |
+
"bittersweet": (Emotion.HAPPY, Emotion.SAD, 0.6),
|
| 61 |
+
"awestruck": (Emotion.SURPRISED, Emotion.HAPPY, 0.7),
|
| 62 |
+
"nervous": (Emotion.SURPRISED, Emotion.SAD, 0.5),
|
| 63 |
+
"frustrated": (Emotion.ANGRY, Emotion.SAD, 0.6),
|
| 64 |
+
"intrigued": (Emotion.CURIOUS, Emotion.SURPRISED, 0.5),
|
| 65 |
+
"content": (Emotion.HAPPY, Emotion.NEUTRAL, 0.4),
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
class MoodEngine(ReachyMiniApp):
|
| 70 |
+
custom_app_url: str | None = "http://0.0.0.0:8042"
|
| 71 |
+
request_media_backend: str | None = "gstreamer_no_video"
|
| 72 |
+
|
| 73 |
+
def run(self, reachy_mini: ReachyMini, stop_event: threading.Event):
|
| 74 |
+
# State
|
| 75 |
+
current_emotion = Emotion.NEUTRAL
|
| 76 |
+
target_emotion = Emotion.NEUTRAL
|
| 77 |
+
personality = Personality.PLAYFUL
|
| 78 |
+
intensity = 0.7
|
| 79 |
+
transition_start = time.time()
|
| 80 |
+
transition_duration = 0.6
|
| 81 |
+
emotion_memory: list[tuple[Emotion, float]] = [] # (emotion, timestamp)
|
| 82 |
+
mood_decay_rate = 0.01 # intensity decay per second toward neutral
|
| 83 |
+
|
| 84 |
+
# Current interpolated pose
|
| 85 |
+
current_pose = np.array(EMOTION_POSES[Emotion.NEUTRAL], dtype=float)
|
| 86 |
+
target_pose = current_pose.copy()
|
| 87 |
+
|
| 88 |
+
# Micro-expression state
|
| 89 |
+
micro_timer = time.time() + np.random.uniform(3, 8)
|
| 90 |
+
micro_active = False
|
| 91 |
+
micro_pose_offset = np.zeros(5)
|
| 92 |
+
micro_end = 0.0
|
| 93 |
+
|
| 94 |
+
# Settings API
|
| 95 |
+
class EmotionRequest(BaseModel):
|
| 96 |
+
emotion: str
|
| 97 |
+
intensity: float = 0.7
|
| 98 |
+
|
| 99 |
+
class PersonalityRequest(BaseModel):
|
| 100 |
+
personality: str
|
| 101 |
+
|
| 102 |
+
@self.settings_app.post("/emotion")
|
| 103 |
+
def set_emotion(req: EmotionRequest):
|
| 104 |
+
nonlocal target_emotion, intensity, transition_start, transition_duration, target_pose
|
| 105 |
+
try:
|
| 106 |
+
target_emotion = Emotion(req.emotion)
|
| 107 |
+
except ValueError:
|
| 108 |
+
# Check compound emotions
|
| 109 |
+
if req.emotion in COMPOUND_EMOTIONS:
|
| 110 |
+
e1, e2, blend = COMPOUND_EMOTIONS[req.emotion]
|
| 111 |
+
p1 = np.array(EMOTION_POSES[e1], dtype=float)
|
| 112 |
+
p2 = np.array(EMOTION_POSES[e2], dtype=float)
|
| 113 |
+
target_pose = p1 * blend + p2 * (1 - blend)
|
| 114 |
+
target_emotion = e1 # Primary
|
| 115 |
+
intensity = req.intensity
|
| 116 |
+
transition_start = time.time()
|
| 117 |
+
mods = PERSONALITY_MODS[personality]
|
| 118 |
+
transition_duration = DEFAULT_TRANSITION / mods["transition_speed"]
|
| 119 |
+
return {"status": "compound", "emotion": req.emotion}
|
| 120 |
+
return {"error": f"Unknown emotion: {req.emotion}"}
|
| 121 |
+
|
| 122 |
+
intensity = req.intensity
|
| 123 |
+
transition_start = time.time()
|
| 124 |
+
mods = PERSONALITY_MODS[personality]
|
| 125 |
+
dur = TRANSITION_DURATIONS.get(
|
| 126 |
+
(current_emotion, target_emotion), DEFAULT_TRANSITION
|
| 127 |
+
)
|
| 128 |
+
transition_duration = dur / mods["transition_speed"]
|
| 129 |
+
target_pose = np.array(EMOTION_POSES[target_emotion], dtype=float) * intensity * mods["intensity"]
|
| 130 |
+
emotion_memory.append((target_emotion, time.time()))
|
| 131 |
+
return {"status": "ok", "emotion": target_emotion.value, "duration": transition_duration}
|
| 132 |
+
|
| 133 |
+
@self.settings_app.post("/personality")
|
| 134 |
+
def set_personality(req: PersonalityRequest):
|
| 135 |
+
nonlocal personality
|
| 136 |
+
try:
|
| 137 |
+
personality = Personality(req.personality)
|
| 138 |
+
return {"status": "ok", "personality": personality.value}
|
| 139 |
+
except ValueError:
|
| 140 |
+
return {"error": f"Unknown: {req.personality}. Use: shy, bold, playful"}
|
| 141 |
+
|
| 142 |
+
@self.settings_app.get("/state")
|
| 143 |
+
def get_state():
|
| 144 |
+
return {
|
| 145 |
+
"emotion": current_emotion.value,
|
| 146 |
+
"target": target_emotion.value,
|
| 147 |
+
"intensity": round(intensity, 3),
|
| 148 |
+
"personality": personality.value,
|
| 149 |
+
"memory_size": len(emotion_memory),
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
# Main loop
|
| 153 |
+
while not stop_event.is_set():
|
| 154 |
+
t = time.time()
|
| 155 |
+
mods = PERSONALITY_MODS[personality]
|
| 156 |
+
|
| 157 |
+
# Smooth transition
|
| 158 |
+
elapsed = t - transition_start
|
| 159 |
+
alpha = min(1.0, elapsed / transition_duration) if transition_duration > 0 else 1.0
|
| 160 |
+
# Ease-in-out
|
| 161 |
+
alpha = 0.5 * (1 - math.cos(math.pi * alpha))
|
| 162 |
+
|
| 163 |
+
current_pose = current_pose + (target_pose - current_pose) * min(alpha, 0.1)
|
| 164 |
+
|
| 165 |
+
if alpha >= 0.99:
|
| 166 |
+
current_emotion = target_emotion
|
| 167 |
+
|
| 168 |
+
# Mood decay toward neutral
|
| 169 |
+
if intensity > 0.1 and (t - transition_start) > 10:
|
| 170 |
+
intensity = max(0.1, intensity - mood_decay_rate * 0.02)
|
| 171 |
+
target_pose = np.array(EMOTION_POSES[target_emotion], dtype=float) * intensity * mods["intensity"]
|
| 172 |
+
|
| 173 |
+
# Micro-expressions
|
| 174 |
+
if not micro_active and t > micro_timer:
|
| 175 |
+
micro_active = True
|
| 176 |
+
micro_end = t + np.random.uniform(0.1, 0.3)
|
| 177 |
+
# Small random twitch
|
| 178 |
+
micro_pose_offset = np.random.uniform(-3, 3, 5) * mods["idle_amplitude"] * 0.3
|
| 179 |
+
if micro_active and t > micro_end:
|
| 180 |
+
micro_active = False
|
| 181 |
+
micro_pose_offset = np.zeros(5)
|
| 182 |
+
micro_timer = t + np.random.uniform(3, 8)
|
| 183 |
+
|
| 184 |
+
# Idle breathing overlay
|
| 185 |
+
breath = 2.0 * mods["idle_amplitude"] * np.sin(2 * np.pi * 0.15 * t)
|
| 186 |
+
idle_offset = np.array([0, breath, 0, 0, 0])
|
| 187 |
+
|
| 188 |
+
# Final pose
|
| 189 |
+
final = current_pose + micro_pose_offset + idle_offset
|
| 190 |
+
head = create_head_pose(yaw=final[0], pitch=final[1], roll=final[2], degrees=True)
|
| 191 |
+
antennas = np.deg2rad(np.array([final[3], final[4]]))
|
| 192 |
+
reachy_mini.set_target(head=head, antennas=antennas)
|
| 193 |
+
|
| 194 |
+
time.sleep(0.02)
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
if __name__ == "__main__":
|
| 198 |
+
app = MoodEngine()
|
| 199 |
+
try:
|
| 200 |
+
app.wrapped_run()
|
| 201 |
+
except KeyboardInterrupt:
|
| 202 |
+
app.stop()
|
mood_engine/static/index.html
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<title>Reachy Mini example app template</title>
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 8 |
+
<link rel="stylesheet" href="/static/style.css">
|
| 9 |
+
</head>
|
| 10 |
+
|
| 11 |
+
<body>
|
| 12 |
+
<h1>Reachy Mini – Control Panel</h1>
|
| 13 |
+
|
| 14 |
+
<div id="controls">
|
| 15 |
+
<label style="display:flex; align-items:center; gap:8px;">
|
| 16 |
+
<input type="checkbox" id="antenna-checkbox" checked>
|
| 17 |
+
Antennas
|
| 18 |
+
</label>
|
| 19 |
+
|
| 20 |
+
<button id="sound-btn">Play Sound</button>
|
| 21 |
+
</div>
|
| 22 |
+
|
| 23 |
+
<div id="status">Antennas status: running</div>
|
| 24 |
+
<script src="/static/main.js"></script>
|
| 25 |
+
</body>
|
| 26 |
+
|
| 27 |
+
</html>
|
mood_engine/static/main.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
let antennasEnabled = true;
|
| 2 |
+
|
| 3 |
+
async function updateAntennasState(enabled) {
|
| 4 |
+
try {
|
| 5 |
+
const resp = await fetch("/antennas", {
|
| 6 |
+
method: "POST",
|
| 7 |
+
headers: { "Content-Type": "application/json" },
|
| 8 |
+
body: JSON.stringify({ enabled }),
|
| 9 |
+
});
|
| 10 |
+
const data = await resp.json();
|
| 11 |
+
antennasEnabled = data.antennas_enabled;
|
| 12 |
+
updateUI();
|
| 13 |
+
} catch (e) {
|
| 14 |
+
document.getElementById("status").textContent = "Backend error";
|
| 15 |
+
}
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
async function playSound() {
|
| 19 |
+
try {
|
| 20 |
+
await fetch("/play_sound", { method: "POST" });
|
| 21 |
+
} catch (e) {
|
| 22 |
+
console.error("Error triggering sound:", e);
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
function updateUI() {
|
| 27 |
+
const checkbox = document.getElementById("antenna-checkbox");
|
| 28 |
+
const status = document.getElementById("status");
|
| 29 |
+
|
| 30 |
+
checkbox.checked = antennasEnabled;
|
| 31 |
+
|
| 32 |
+
if (antennasEnabled) {
|
| 33 |
+
status.textContent = "Antennas status: running";
|
| 34 |
+
} else {
|
| 35 |
+
status.textContent = "Antennas status: stopped";
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
document.getElementById("antenna-checkbox").addEventListener("change", (e) => {
|
| 40 |
+
updateAntennasState(e.target.checked);
|
| 41 |
+
});
|
| 42 |
+
|
| 43 |
+
document.getElementById("sound-btn").addEventListener("click", () => {
|
| 44 |
+
playSound();
|
| 45 |
+
});
|
| 46 |
+
|
| 47 |
+
updateUI();
|
mood_engine/static/style.css
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
body {
|
| 2 |
+
font-family: sans-serif;
|
| 3 |
+
margin: 24px;
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
#sound-btn {
|
| 7 |
+
padding: 10px 20px;
|
| 8 |
+
border: none;
|
| 9 |
+
color: white;
|
| 10 |
+
cursor: pointer;
|
| 11 |
+
font-size: 16px;
|
| 12 |
+
border-radius: 6px;
|
| 13 |
+
background-color: #3498db;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
#status {
|
| 17 |
+
margin-top: 16px;
|
| 18 |
+
font-weight: bold;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
#controls {
|
| 22 |
+
display: flex;
|
| 23 |
+
align-items: center;
|
| 24 |
+
gap: 20px;
|
| 25 |
+
}
|
pyproject.toml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[build-system]
|
| 2 |
+
requires = ["setuptools>=61.0"]
|
| 3 |
+
build-backend = "setuptools.build_meta"
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
[project]
|
| 7 |
+
name = "mood_engine"
|
| 8 |
+
version = "0.1.0"
|
| 9 |
+
description = "Full emotion state machine with personality presets, micro-expressions, mood decay, and compound emotions"
|
| 10 |
+
readme = "README.md"
|
| 11 |
+
requires-python = ">=3.10"
|
| 12 |
+
dependencies = [
|
| 13 |
+
"reachy-mini",
|
| 14 |
+
"numpy"
|
| 15 |
+
]
|
| 16 |
+
keywords = ["reachy-mini-app"]
|
| 17 |
+
|
| 18 |
+
[project.entry-points."reachy_mini_apps"]
|
| 19 |
+
mood_engine = "mood_engine.main:MoodEngine"
|
| 20 |
+
|
| 21 |
+
[tool.setuptools]
|
| 22 |
+
package-dir = { "" = "." }
|
| 23 |
+
include-package-data = true
|
| 24 |
+
|
| 25 |
+
[tool.setuptools.packages.find]
|
| 26 |
+
where = ["."]
|
| 27 |
+
|
| 28 |
+
[tool.setuptools.package-data]
|
| 29 |
+
mood_engine = ["**/*"] # Also include all non-.py files
|
style.css
CHANGED
|
@@ -1,28 +1,411 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
font-size:
|
| 8 |
-
margin-
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
font-
|
| 14 |
-
margin-bottom:
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
|
|
|
|
|
|
| 20 |
margin: 0 auto;
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
border-radius: 16px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
}
|
| 25 |
|
| 26 |
-
.
|
| 27 |
-
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
* {
|
| 2 |
+
margin: 0;
|
| 3 |
+
padding: 0;
|
| 4 |
+
box-sizing: border-box;
|
| 5 |
+
}
|
| 6 |
+
|
| 7 |
body {
|
| 8 |
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
| 9 |
+
line-height: 1.6;
|
| 10 |
+
color: #333;
|
| 11 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 12 |
+
min-height: 100vh;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.hero {
|
| 16 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 17 |
+
color: white;
|
| 18 |
+
padding: 4rem 2rem;
|
| 19 |
+
text-align: center;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.hero-content {
|
| 23 |
+
max-width: 800px;
|
| 24 |
+
margin: 0 auto;
|
| 25 |
}
|
| 26 |
|
| 27 |
+
.app-icon {
|
| 28 |
+
font-size: 4rem;
|
| 29 |
+
margin-bottom: 1rem;
|
| 30 |
+
display: inline-block;
|
| 31 |
}
|
| 32 |
|
| 33 |
+
.hero h1 {
|
| 34 |
+
font-size: 3rem;
|
| 35 |
+
font-weight: 700;
|
| 36 |
+
margin-bottom: 1rem;
|
| 37 |
+
background: linear-gradient(45deg, #fff, #f0f9ff);
|
| 38 |
+
background-clip: text;
|
| 39 |
+
-webkit-background-clip: text;
|
| 40 |
+
-webkit-text-fill-color: transparent;
|
| 41 |
}
|
| 42 |
|
| 43 |
+
.tagline {
|
| 44 |
+
font-size: 1.25rem;
|
| 45 |
+
opacity: 0.9;
|
| 46 |
+
max-width: 600px;
|
| 47 |
margin: 0 auto;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.container {
|
| 51 |
+
max-width: 1200px;
|
| 52 |
+
margin: 0 auto;
|
| 53 |
+
padding: 0 2rem;
|
| 54 |
+
position: relative;
|
| 55 |
+
z-index: 2;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.main-card {
|
| 59 |
+
background: white;
|
| 60 |
+
border-radius: 20px;
|
| 61 |
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
| 62 |
+
margin-top: -2rem;
|
| 63 |
+
overflow: hidden;
|
| 64 |
+
margin-bottom: 3rem;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.app-preview {
|
| 68 |
+
background: linear-gradient(135deg, #1e3a8a, #3b82f6);
|
| 69 |
+
padding: 3rem;
|
| 70 |
+
color: white;
|
| 71 |
+
text-align: center;
|
| 72 |
+
position: relative;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.preview-image {
|
| 76 |
+
background: #000;
|
| 77 |
+
border-radius: 15px;
|
| 78 |
+
padding: 2rem;
|
| 79 |
+
max-width: 500px;
|
| 80 |
+
margin: 0 auto;
|
| 81 |
+
position: relative;
|
| 82 |
+
overflow: hidden;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.camera-feed {
|
| 86 |
+
font-size: 4rem;
|
| 87 |
+
margin-bottom: 1rem;
|
| 88 |
+
opacity: 0.7;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.detection-overlay {
|
| 92 |
+
position: absolute;
|
| 93 |
+
top: 50%;
|
| 94 |
+
left: 50%;
|
| 95 |
+
transform: translate(-50%, -50%);
|
| 96 |
+
width: 100%;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.bbox {
|
| 100 |
+
background: rgba(34, 197, 94, 0.9);
|
| 101 |
+
color: white;
|
| 102 |
+
padding: 0.5rem 1rem;
|
| 103 |
+
border-radius: 8px;
|
| 104 |
+
font-size: 0.9rem;
|
| 105 |
+
font-weight: 600;
|
| 106 |
+
margin: 0.5rem;
|
| 107 |
+
display: inline-block;
|
| 108 |
+
border: 2px solid #22c55e;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.app-details {
|
| 112 |
+
padding: 3rem;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.app-details h2 {
|
| 116 |
+
font-size: 2rem;
|
| 117 |
+
color: #1e293b;
|
| 118 |
+
margin-bottom: 2rem;
|
| 119 |
+
text-align: center;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
.template-info {
|
| 123 |
+
display: grid;
|
| 124 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 125 |
+
gap: 2rem;
|
| 126 |
+
margin-bottom: 3rem;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
.info-box {
|
| 130 |
+
background: #f0f9ff;
|
| 131 |
+
border: 2px solid #e0f2fe;
|
| 132 |
+
border-radius: 12px;
|
| 133 |
+
padding: 2rem;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.info-box h3 {
|
| 137 |
+
color: #0c4a6e;
|
| 138 |
+
margin-bottom: 1rem;
|
| 139 |
+
font-size: 1.2rem;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
.info-box p {
|
| 143 |
+
color: #0369a1;
|
| 144 |
+
line-height: 1.6;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.how-to-use {
|
| 148 |
+
background: #fefce8;
|
| 149 |
+
border: 2px solid #fde047;
|
| 150 |
+
border-radius: 12px;
|
| 151 |
+
padding: 2rem;
|
| 152 |
+
margin-top: 3rem;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.how-to-use h3 {
|
| 156 |
+
color: #a16207;
|
| 157 |
+
margin-bottom: 1.5rem;
|
| 158 |
+
font-size: 1.3rem;
|
| 159 |
+
text-align: center;
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
.steps {
|
| 163 |
+
display: flex;
|
| 164 |
+
flex-direction: column;
|
| 165 |
+
gap: 1.5rem;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.step {
|
| 169 |
+
display: flex;
|
| 170 |
+
align-items: flex-start;
|
| 171 |
+
gap: 1rem;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.step-number {
|
| 175 |
+
background: #eab308;
|
| 176 |
+
color: white;
|
| 177 |
+
width: 2rem;
|
| 178 |
+
height: 2rem;
|
| 179 |
+
border-radius: 50%;
|
| 180 |
+
display: flex;
|
| 181 |
+
align-items: center;
|
| 182 |
+
justify-content: center;
|
| 183 |
+
font-weight: bold;
|
| 184 |
+
flex-shrink: 0;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
.step h4 {
|
| 188 |
+
color: #a16207;
|
| 189 |
+
margin-bottom: 0.5rem;
|
| 190 |
+
font-size: 1.1rem;
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
.step p {
|
| 194 |
+
color: #ca8a04;
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
.download-card {
|
| 198 |
+
background: white;
|
| 199 |
+
border-radius: 20px;
|
| 200 |
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
| 201 |
+
padding: 3rem;
|
| 202 |
+
text-align: center;
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
.download-card h2 {
|
| 206 |
+
font-size: 2rem;
|
| 207 |
+
color: #1e293b;
|
| 208 |
+
margin-bottom: 1rem;
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
.download-card>p {
|
| 212 |
+
color: #64748b;
|
| 213 |
+
font-size: 1.1rem;
|
| 214 |
+
margin-bottom: 2rem;
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
.dashboard-config {
|
| 218 |
+
margin-bottom: 2rem;
|
| 219 |
+
text-align: left;
|
| 220 |
+
max-width: 400px;
|
| 221 |
+
margin-left: auto;
|
| 222 |
+
margin-right: auto;
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
.dashboard-config label {
|
| 226 |
+
display: block;
|
| 227 |
+
color: #374151;
|
| 228 |
+
font-weight: 600;
|
| 229 |
+
margin-bottom: 0.5rem;
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
.dashboard-config input {
|
| 233 |
+
width: 100%;
|
| 234 |
+
padding: 0.75rem 1rem;
|
| 235 |
+
border: 2px solid #e5e7eb;
|
| 236 |
+
border-radius: 8px;
|
| 237 |
+
font-size: 0.95rem;
|
| 238 |
+
transition: border-color 0.2s;
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
.dashboard-config input:focus {
|
| 242 |
+
outline: none;
|
| 243 |
+
border-color: #667eea;
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
.install-btn {
|
| 247 |
+
background: linear-gradient(135deg, #667eea, #764ba2);
|
| 248 |
+
color: white;
|
| 249 |
+
border: none;
|
| 250 |
+
padding: 1.25rem 3rem;
|
| 251 |
border-radius: 16px;
|
| 252 |
+
font-size: 1.2rem;
|
| 253 |
+
font-weight: 700;
|
| 254 |
+
cursor: pointer;
|
| 255 |
+
transition: all 0.3s ease;
|
| 256 |
+
display: inline-flex;
|
| 257 |
+
align-items: center;
|
| 258 |
+
gap: 0.75rem;
|
| 259 |
+
margin-bottom: 2rem;
|
| 260 |
+
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
.install-btn:hover:not(:disabled) {
|
| 264 |
+
transform: translateY(-3px);
|
| 265 |
+
box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
.install-btn:disabled {
|
| 269 |
+
opacity: 0.7;
|
| 270 |
+
cursor: not-allowed;
|
| 271 |
+
transform: none;
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
.manual-option {
|
| 275 |
+
background: #f8fafc;
|
| 276 |
+
border-radius: 12px;
|
| 277 |
+
padding: 2rem;
|
| 278 |
+
margin-top: 2rem;
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
.manual-option h3 {
|
| 282 |
+
color: #1e293b;
|
| 283 |
+
margin-bottom: 1rem;
|
| 284 |
+
font-size: 1.2rem;
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
.manual-option>p {
|
| 288 |
+
color: #64748b;
|
| 289 |
+
margin-bottom: 1rem;
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
.btn-icon {
|
| 293 |
+
font-size: 1.1rem;
|
| 294 |
+
}
|
| 295 |
+
|
| 296 |
+
.install-status {
|
| 297 |
+
padding: 1rem;
|
| 298 |
+
border-radius: 8px;
|
| 299 |
+
font-size: 0.9rem;
|
| 300 |
+
text-align: center;
|
| 301 |
+
display: none;
|
| 302 |
+
margin-top: 1rem;
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
.install-status.success {
|
| 306 |
+
background: #dcfce7;
|
| 307 |
+
color: #166534;
|
| 308 |
+
border: 1px solid #bbf7d0;
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
.install-status.error {
|
| 312 |
+
background: #fef2f2;
|
| 313 |
+
color: #dc2626;
|
| 314 |
+
border: 1px solid #fecaca;
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
.install-status.loading {
|
| 318 |
+
background: #dbeafe;
|
| 319 |
+
color: #1d4ed8;
|
| 320 |
+
border: 1px solid #bfdbfe;
|
| 321 |
+
}
|
| 322 |
+
|
| 323 |
+
.install-status.info {
|
| 324 |
+
background: #e0f2fe;
|
| 325 |
+
color: #0369a1;
|
| 326 |
+
border: 1px solid #7dd3fc;
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
.manual-install {
|
| 330 |
+
background: #1f2937;
|
| 331 |
+
border-radius: 8px;
|
| 332 |
+
padding: 1rem;
|
| 333 |
+
margin-bottom: 1rem;
|
| 334 |
+
display: flex;
|
| 335 |
+
align-items: center;
|
| 336 |
+
gap: 1rem;
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
.manual-install code {
|
| 340 |
+
color: #10b981;
|
| 341 |
+
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
|
| 342 |
+
font-size: 0.85rem;
|
| 343 |
+
flex: 1;
|
| 344 |
+
overflow-x: auto;
|
| 345 |
+
}
|
| 346 |
+
|
| 347 |
+
.copy-btn {
|
| 348 |
+
background: #374151;
|
| 349 |
+
color: white;
|
| 350 |
+
border: none;
|
| 351 |
+
padding: 0.5rem 1rem;
|
| 352 |
+
border-radius: 6px;
|
| 353 |
+
font-size: 0.8rem;
|
| 354 |
+
cursor: pointer;
|
| 355 |
+
transition: background-color 0.2s;
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
.copy-btn:hover {
|
| 359 |
+
background: #4b5563;
|
| 360 |
+
}
|
| 361 |
+
|
| 362 |
+
.manual-steps {
|
| 363 |
+
color: #6b7280;
|
| 364 |
+
font-size: 0.9rem;
|
| 365 |
+
line-height: 1.8;
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
.footer {
|
| 369 |
+
text-align: center;
|
| 370 |
+
padding: 2rem;
|
| 371 |
+
color: white;
|
| 372 |
+
opacity: 0.8;
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
.footer a {
|
| 376 |
+
color: white;
|
| 377 |
+
text-decoration: none;
|
| 378 |
+
font-weight: 600;
|
| 379 |
}
|
| 380 |
|
| 381 |
+
.footer a:hover {
|
| 382 |
+
text-decoration: underline;
|
| 383 |
}
|
| 384 |
+
|
| 385 |
+
/* Responsive Design */
|
| 386 |
+
@media (max-width: 768px) {
|
| 387 |
+
.hero {
|
| 388 |
+
padding: 2rem 1rem;
|
| 389 |
+
}
|
| 390 |
+
|
| 391 |
+
.hero h1 {
|
| 392 |
+
font-size: 2rem;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
.container {
|
| 396 |
+
padding: 0 1rem;
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
.app-details,
|
| 400 |
+
.download-card {
|
| 401 |
+
padding: 2rem;
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
.features-grid {
|
| 405 |
+
grid-template-columns: 1fr;
|
| 406 |
+
}
|
| 407 |
+
|
| 408 |
+
.download-options {
|
| 409 |
+
grid-template-columns: 1fr;
|
| 410 |
+
}
|
| 411 |
+
}
|