소리·애니메이션 공통 바탕: 사이트 음량(0~100, 기본 50, 이 기기만), 공통 효과음 sfx, 공통 움직임 클래스(anim-*)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1633,3 +1633,65 @@ button.header-user {
|
||||
.bot-dots::after { content: '…'; display: inline-block; width: 1.2em; animation: bot-dots 1.2s steps(4, end) infinite; overflow: hidden; vertical-align: bottom; }
|
||||
@keyframes bot-dots { 0% { width: 0; } 100% { width: 1.2em; } }
|
||||
@media (prefers-reduced-motion: reduce) { .bot-dots::after { animation: none; } }
|
||||
|
||||
/* ---------- shared motion kit (2026-10-13) ----------
|
||||
* Small, game-agnostic animations. Put the class on an element when it appears (React key change replays it).
|
||||
* `--anim-delay` staggers (e.g. dealing), `--from-x/--from-y` say where a dealt card comes from.
|
||||
* prefers-reduced-motion already shortens every animation to nothing (see the rule near the top). */
|
||||
.anim-deal { animation: anim-deal 0.38s cubic-bezier(0.2, 0.8, 0.3, 1.15) both; animation-delay: var(--anim-delay, 0ms); }
|
||||
@keyframes anim-deal {
|
||||
from { opacity: 0; transform: translate(var(--from-x, 0), var(--from-y, -60px)) rotate(-12deg) scale(0.7); }
|
||||
}
|
||||
.anim-flip { animation: anim-flip 0.42s ease both; animation-delay: var(--anim-delay, 0ms); backface-visibility: hidden; }
|
||||
@keyframes anim-flip {
|
||||
0% { transform: perspective(600px) rotateY(90deg); }
|
||||
60% { transform: perspective(600px) rotateY(-12deg); }
|
||||
100% { transform: perspective(600px) rotateY(0); }
|
||||
}
|
||||
.anim-pop { animation: anim-pop 0.32s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: var(--anim-delay, 0ms); }
|
||||
@keyframes anim-pop {
|
||||
from { transform: scale(0.4); opacity: 0; }
|
||||
}
|
||||
.anim-drop { animation: anim-drop 0.45s cubic-bezier(0.5, 0, 0.75, 0) both, anim-bounce 0.25s ease-out 0.45s; }
|
||||
@keyframes anim-drop {
|
||||
from { transform: translateY(var(--drop-from, -240px)); }
|
||||
}
|
||||
@keyframes anim-bounce {
|
||||
40% { transform: translateY(-8%); }
|
||||
}
|
||||
.anim-shake { animation: anim-shake 0.45s ease both; }
|
||||
@keyframes anim-shake {
|
||||
20%, 60% { transform: translateX(-6px) rotate(-2deg); }
|
||||
40%, 80% { transform: translateX(6px) rotate(2deg); }
|
||||
}
|
||||
.anim-slide-up { animation: anim-slide-up 0.3s ease-out both; animation-delay: var(--anim-delay, 0ms); }
|
||||
@keyframes anim-slide-up {
|
||||
from { transform: translateY(16px); opacity: 0; }
|
||||
}
|
||||
.anim-fade { animation: fade 0.25s ease both; }
|
||||
/* Pulsing highlight for "your turn" / the thing to press. */
|
||||
.anim-glow { animation: anim-glow 1.4s ease-in-out infinite; }
|
||||
@keyframes anim-glow {
|
||||
50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 45%, transparent), 0 0 18px color-mix(in srgb, var(--primary) 55%, transparent); }
|
||||
}
|
||||
/* A score / count that just changed. */
|
||||
.anim-bump { animation: anim-bump 0.35s ease both; }
|
||||
@keyframes anim-bump {
|
||||
40% { transform: scale(1.35); color: var(--primary); }
|
||||
}
|
||||
/* Dice tumbling before showing the face. */
|
||||
.anim-roll { animation: anim-roll 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
|
||||
@keyframes anim-roll {
|
||||
0% { transform: translateY(-30px) rotate(-200deg) scale(0.8); }
|
||||
70% { transform: translateY(4px) rotate(15deg); }
|
||||
100% { transform: none; }
|
||||
}
|
||||
/* Big centered banner (땡!, 우노!, 승리 …): shown briefly over the board. */
|
||||
.anim-banner { animation: anim-banner 1.6s ease both; pointer-events: none; }
|
||||
@keyframes anim-banner {
|
||||
0% { transform: scale(0.3); opacity: 0; }
|
||||
15% { transform: scale(1.15); opacity: 1; }
|
||||
25% { transform: scale(1); }
|
||||
80% { opacity: 1; }
|
||||
100% { transform: scale(1.05); opacity: 0; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user