Spaces:
Running
Running
File size: 8,212 Bytes
e0fe873 4acbb8d e0fe873 4acbb8d e0fe873 4acbb8d e0fe873 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | /* Il contenitore ora vive nella colonna laterale sotto il riquadro livello */
.bot-container {
position: relative;
width: 100%;
height: 520px;
perspective: 1100px;
z-index: 30;
}
/* Il bot Γ¨ assoluto, si muove su left% */
.bot {
position: absolute;
width: 520px;
height: 520px;
bottom: 50px;
z-index: 2;
transform: translateX(-50%);
transform-style: preserve-3d;
pointer-events: none;
}
.bot::before {
content: '';
position: absolute;
inset: 8% 10% auto 10%;
height: 34%;
border-radius: 50%;
background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0) 62%);
pointer-events: none;
z-index: 4;
}
.bot::after {
content: none;
}
@media (max-width: 768px) {
.bot-container {
height: 340px;
}
.bot {
width: 370px;
height: 370px;
}
}
/* Immagine del bot */
.bot-body {
position: absolute;
top: 0; left: 0;
width: 100%;
height: 100%;
object-fit: contain;
mix-blend-mode: normal;
filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}
/* ββ Braccia e bocca: stessa immagine ritagliata con clip-path ββ */
.bot-arm-left,
.bot-arm-right,
.bot-mouth {
position: absolute;
top: 0; left: 0;
width: 100%;
height: 100%;
object-fit: contain;
mix-blend-mode: normal;
opacity: 0.98;
pointer-events: none;
}
/* --- BRACCIO SINISTRO --- */
/* ritaglia la zona sinistra-centrale dell'immagine dove c'Γ¨ il braccio */
.bot-arm-left {
clip-path: inset(45% 66% 12% 8%);
transform-origin: 34% 58%;
}
.bot-arm-left.idle { animation: arm-l-idle 2.5s ease-in-out infinite; }
.bot-arm-left.thinking { animation: arm-l-think 1.2s ease-in-out infinite; }
.bot-arm-left.talking {
animation: none;
transform: rotate(0deg);
}
.bot-arm-left.gesturing,
.bot-arm-left.waving,
.bot-arm-left.pointing { animation: arm-l-wave 0.55s ease-in-out infinite; }
.bot-arm-left.confused { animation: arm-l-confused 0.4s ease-in-out infinite; }
@keyframes arm-l-idle {
0%,100% { transform: rotate(0deg); }
50% { transform: rotate(-7deg); }
}
@keyframes arm-l-think {
0%,100% { transform: rotate(-5deg); }
50% { transform: rotate(12deg); }
}
@keyframes arm-l-wave {
0%,100% { transform: rotate(-10deg); }
25% { transform: rotate(14deg); }
75% { transform: rotate(-6deg); }
}
@keyframes arm-l-confused {
0%,100% { transform: rotate(0deg); }
30% { transform: rotate(10deg); }
70% { transform: rotate(-10deg); }
}
/* --- BRACCIO DESTRO --- */
.bot-arm-right {
clip-path: inset(45% 8% 12% 66%);
transform-origin: 66% 58%;
}
.bot-arm-right.idle { animation: arm-r-idle 2.5s ease-in-out infinite 0.4s; }
.bot-arm-right.thinking { animation: arm-r-think 1.2s ease-in-out infinite 0.2s; }
.bot-arm-right.talking {
animation: none;
transform: rotate(0deg);
}
.bot-arm-right.gesturing,
.bot-arm-right.waving,
.bot-arm-right.pointing { animation: arm-r-wave 0.55s ease-in-out infinite 0.15s; }
.bot-arm-right.confused { animation: arm-r-confused 0.4s ease-in-out infinite 0.1s; }
@keyframes arm-r-idle {
0%,100% { transform: rotate(0deg); }
50% { transform: rotate(7deg); }
}
@keyframes arm-r-think {
0%,100% { transform: rotate(5deg); }
50% { transform: rotate(-12deg); }
}
@keyframes arm-r-wave {
0%,100% { transform: rotate(10deg); }
25% { transform: rotate(-14deg); }
75% { transform: rotate(6deg); }
}
@keyframes arm-r-confused {
0%,100% { transform: rotate(0deg); }
30% { transform: rotate(-10deg); }
70% { transform: rotate(10deg); }
}
/* --- BOCCA --- */
.bot-mouth {
clip-path: inset(42% 45% 48% 45%);
transform-origin: 50% 50%;
mix-blend-mode: normal;
opacity: 0.86;
filter: saturate(0.72) brightness(0.96);
}
.bot-mouth.neutral { animation: mouth-idle 2s ease-in-out infinite; }
.bot-mouth.thinking { animation: mouth-thinking 1s ease-in-out infinite; }
.bot-mouth.happy { animation: mouth-talking 0.3s ease-in-out infinite; }
.bot-mouth.confused { animation: mouth-confused 0.5s ease-in-out infinite; }
@keyframes mouth-idle {
0%,100% { transform: scaleX(1) scaleY(1); }
50% { transform: scaleX(0.98) scaleY(0.92); }
}
@keyframes mouth-thinking {
0%,100% { transform: scaleX(0.9) scaleY(0.9); }
50% { transform: scaleX(0.95) scaleY(0.95); }
}
@keyframes mouth-talking {
0%,100% { transform: scaleY(1) scaleX(1); }
50% { transform: scaleY(1.2) scaleX(1.03); }
}
@keyframes mouth-confused {
0%,100% { transform: scaleX(0.9) scaleY(0.95); }
50% { transform: scaleX(0.85) scaleY(0.9); }
}
/* ββ Animazioni sull'immagine intera ββ */
/* Le animazioni di movimento vanno sul contenitore .bot,
cosi tutti i layer (corpo, braccia, bocca) restano sincronizzati. */
/* IDLE: leggero bob su/giu */
.bot.idle {
animation: idle-bob 2.5s ease-in-out infinite;
}
@keyframes idle-bob {
0%, 100% { transform: translateX(-50%) translateY(0) rotateZ(0deg) rotateX(3deg) rotateY(-4deg); }
30% { transform: translateX(-50%) translateY(-10px) rotateZ(1.2deg) rotateX(5deg) rotateY(-2deg); }
70% { transform: translateX(-50%) translateY(-6px) rotateZ(-1.2deg) rotateX(3deg) rotateY(-6deg); }
}
/* THINKING: oscillazione lenta + inclinazione testa */
.bot.thinking {
animation: thinking-tilt 1.2s ease-in-out infinite;
}
.bot.thinking .bot-body {
filter: brightness(0.95) saturate(0.8);
}
@keyframes thinking-tilt {
0%, 100% { transform: translateX(-50%) rotateZ(-4deg) translateY(0) rotateX(4deg) rotateY(-10deg); }
50% { transform: translateX(-50%) rotateZ(4deg) translateY(-6px) rotateX(6deg) rotateY(6deg); }
}
/* SPEAKING: bounce energico */
.bot.happy,
.bot.gesturing,
.bot.waving,
.bot.pointing {
animation: speaking-bounce 0.5s ease-in-out infinite;
}
.bot.happy .bot-body,
.bot.gesturing .bot-body,
.bot.waving .bot-body,
.bot.pointing .bot-body {
filter: brightness(1.05) saturate(1.2);
}
@keyframes speaking-bounce {
0%, 100% { transform: translateX(-50%) translateY(0) scale(1) rotateX(4deg) rotateY(-4deg); }
25% { transform: translateX(-50%) translateY(-13px) scale(1.04) rotateZ(2deg) rotateX(6deg) rotateY(-1deg); }
75% { transform: translateX(-50%) translateY(-8px) scale(1.02) rotateZ(-1deg) rotateX(5deg) rotateY(-7deg); }
}
/* CONFUSED: tremolio laterale */
.bot.confused {
animation: confused-shake 0.4s ease-in-out infinite;
}
.bot.confused .bot-body {
filter: hue-rotate(10deg) saturate(0.9);
}
@keyframes confused-shake {
0%, 100% { transform: translateX(-50%) rotateZ(0deg) rotateX(4deg) rotateY(-4deg); }
20% { transform: translateX(calc(-50% - 5px)) rotateZ(-6deg) rotateX(5deg) rotateY(-8deg); }
40% { transform: translateX(calc(-50% + 5px)) rotateZ(6deg) rotateX(5deg) rotateY(2deg); }
60% { transform: translateX(calc(-50% - 3px)) rotateZ(-4deg) rotateX(4deg) rotateY(-9deg); }
80% { transform: translateX(calc(-50% + 3px)) rotateZ(4deg) rotateX(4deg) rotateY(0deg); }
}
/* ββ Bolle parlanti ββ */
.bubble {
position: absolute;
top: 10px;
background: rgba(100, 200, 255, 0.7);
border-radius: 50%;
animation: floatBubble 1.5s ease-out infinite;
}
.bubble-1 {
width: 14px;
height: 14px;
right: 10px;
animation-delay: 0s;
}
.bubble-2 {
width: 9px;
height: 9px;
right: 28px;
animation-delay: 0.3s;
}
.bubble-3 {
width: 6px;
height: 6px;
right: 18px;
animation-delay: 0.6s;
}
@keyframes floatBubble {
0% { opacity: 1; transform: translateY(0) scale(1); }
100% { opacity: 0; transform: translateY(-60px) scale(0.5); }
}
/* ββ Pallini "sto pensando..." ββ */
.think-dots {
position: absolute;
top: -30px;
right: -10px;
display: flex;
gap: 5px;
background: white;
border-radius: 20px;
padding: 6px 10px;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.think-dots span {
width: 8px;
height: 8px;
background: #aaa;
border-radius: 50%;
animation: dotPulse 1s ease-in-out infinite;
}
.think-dots span:nth-child(2) { animation-delay: 0.2s; }
.think-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
0%, 100% { transform: scale(1); background: #ccc; }
50% { transform: scale(1.4); background: #666; }
}
|