diff --git a/2048.css b/2048.css index 349a044..af9a003 100644 --- a/2048.css +++ b/2048.css @@ -120,6 +120,175 @@ h1 { z-index: 100; } +.sound-controls { + position: fixed; + top: clamp(10px, 2vh, 20px); + left: clamp(10px, 2vw, 20px); + display: flex; + gap: clamp(8px, 1.5vw, 12px); + z-index: 100; +} + +/* Sound Button Styling */ +.btn-sound { + position: relative; + width: clamp(36px, 6vw, 48px); + height: clamp(36px, 6vw, 48px); + padding: 0; + background: rgba(30, 0, 50, 0.85); + backdrop-filter: blur(15px); + border: 2px solid rgba(0, 217, 255, 0.45); + border-radius: 12px; + cursor: pointer; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + display: flex; + align-items: center; + justify-content: center; + box-shadow: + 0 4px 18px rgba(0, 0, 0, 0.35), + 0 0 20px rgba(0, 217, 255, 0.2), + inset 0 1px 0 rgba(255, 255, 255, 0.1); +} + +.btn-sound svg { + width: clamp(18px, 3vw, 24px); + height: clamp(18px, 3vw, 24px); + color: rgba(0, 234, 255, 0.9); + transition: all 0.3s ease; + position: absolute; +} + +/* BG Music Button - Purple */ +#btn-sound-bg { + background: rgba(50, 0, 70, 0.85); + border-color: rgba(200, 100, 255, 0.45); +} + +#btn-sound-bg svg { + color: rgba(200, 100, 255, 0.9); +} + +#btn-sound-bg:hover { + background: rgba(200, 100, 255, 0.15); + border-color: rgba(200, 100, 255, 0.8); + box-shadow: + 0 6px 25px rgba(0, 0, 0, 0.45), + 0 0 35px rgba(200, 100, 255, 0.4), + inset 0 1px 0 rgba(255, 255, 255, 0.15); +} + +#btn-sound-bg:hover svg { + color: rgba(200, 100, 255, 1); +} + +/* Pop SFX Button - Cyan */ +#btn-sound-pop { + background: rgba(0, 40, 50, 0.85); + border-color: rgba(0, 234, 255, 0.45); +} + +#btn-sound-pop svg { + color: rgba(0, 234, 255, 0.9); +} + +#btn-sound-pop:hover { + background: rgba(0, 234, 255, 0.15); + border-color: rgba(0, 234, 255, 0.8); + box-shadow: + 0 6px 25px rgba(0, 0, 0, 0.45), + 0 0 35px rgba(0, 234, 255, 0.4), + inset 0 1px 0 rgba(255, 255, 255, 0.15); +} + +#btn-sound-pop:hover svg { + color: rgba(0, 234, 255, 1); +} + +/* Merge SFX Button - Orange/Yellow */ +#btn-sound-merge { + background: rgba(60, 30, 0, 0.85); + border-color: rgba(255, 170, 0, 0.45); +} + +#btn-sound-merge svg { + color: rgba(255, 170, 0, 0.9); +} + +#btn-sound-merge:hover { + background: rgba(255, 170, 0, 0.15); + border-color: rgba(255, 170, 0, 0.8); + box-shadow: + 0 6px 25px rgba(0, 0, 0, 0.45), + 0 0 35px rgba(255, 170, 0, 0.4), + inset 0 1px 0 rgba(255, 255, 255, 0.15); +} + +#btn-sound-merge:hover svg { + color: rgba(255, 170, 0, 1); +} + +/* Hover & Active States */ +.btn-sound:hover { + transform: translateY(-2px); +} + +.btn-sound:active { + transform: translateY(0); + box-shadow: + 0 2px 12px rgba(0, 0, 0, 0.35), + 0 0 20px rgba(0, 234, 255, 0.3), + inset 0 2px 6px rgba(0, 0, 0, 0.25); +} + +/* Muted State - Red with X */ +.btn-sound.muted { + background: rgba(60, 0, 10, 0.85) !important; + border-color: rgba(255, 50, 50, 0.6) !important; + box-shadow: + 0 4px 18px rgba(0, 0, 0, 0.35), + 0 0 20px rgba(255, 50, 50, 0.3), + inset 0 1px 0 rgba(255, 255, 255, 0.1) !important; +} + +.btn-sound.muted svg.sound-icon { + display: none !important; +} + +.btn-sound.muted svg.mute-icon { + display: block !important; + color: rgba(255, 80, 80, 0.9) !important; +} + +.btn-sound.muted:hover { + background: rgba(255, 50, 50, 0.2) !important; + border-color: rgba(255, 80, 80, 0.8) !important; + box-shadow: + 0 6px 25px rgba(0, 0, 0, 0.45), + 0 0 35px rgba(255, 50, 50, 0.5), + inset 0 1px 0 rgba(255, 255, 255, 0.15) !important; +} + +.btn-sound.muted:hover svg.mute-icon { + color: rgba(255, 100, 100, 1) !important; +} + +/* Icon Transitions */ +.btn-sound svg.sound-icon, +.btn-sound svg.mute-icon { + transition: all 0.3s ease; +} + +.btn-sound:hover svg { + transform: scale(1.1); +} + +/* Mobile Responsive */ +@media (max-width: 768px) { + .sound-controls { + flex-direction: column; + gap: clamp(6px, 1.2vw, 10px); + } +} .icon-btn { width: clamp(36px, 6vw, 48px); height: clamp(36px, 6vw, 48px); diff --git a/2048.html b/2048.html index 7a97490..7ff2249 100644 --- a/2048.html +++ b/2048.html @@ -15,6 +15,43 @@ + +
+ + + + + + + + +
+