Ripple Effect

Ripple Effect

Ripple Effect

Tap. Ripple. Clear.

Moves: 0
Target: 5
Efficiency: -
:root { --bg-primary: #0a0a1a; --bg-secondary: #1a1a2e; --accent-1: #ff6b6b; --accent-2: #4ecdc4; --accent-3: #ffe66d; --accent-4: #a78bfa; --accent-5: #f472b6; --text-primary: #ffffff; --text-secondary: #94a3b8; --glass-bg: rgba(255, 255, 255, 0.05); --glass-border: rgba(255, 255, 255, 0.1); --radius-lg: 24px; --radius-md: 16px; --radius-sm: 12px; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif; background: var(--bg-primary); color: var(--text-primary); overflow: hidden; height: 100vh; width: 100vw; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; } #app { width: 100%; height: 100%; position: relative; overflow: hidden; } .screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: none; flex-direction: column; transition: opacity 0.3s ease; } .screen.active { display: flex; } /* Splash Screen */ #splash { justify-content: center; align-items: center; background: radial-gradient(ellipse at center, #1a1a3e 0%, #0a0a1a 100%); } .splash-content { text-align: center; } .ripple-logo { position: relative; width: 120px; height: 120px; margin: 0 auto 30px; } .orb { position: absolute; width: 40px; height: 40px; border-radius: 50%; animation: float 2s ease-in-out infinite; } .orb-1 { background: var(--accent-1); top: 0; left: 40px; animation-delay: 0s; } .orb-2 { background: var(--accent-2); top: 40px; left: 0; animation-delay: 0.5s; } .orb-3 { background: var(--accent-3); top: 40px; left: 80px; animation-delay: 1s; } .ripple-ring { position: absolute; top: 20px; left: 20px; width: 80px; height: 80px; border: 2px solid rgba(255, 255, 255, 0.3); border-radius: 50%; animation: ripple 2s ease-out infinite; } @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } @keyframes ripple { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } } .game-title { font-size: 42px; font-weight: 700; background: linear-gradient(135deg, var(--accent-1), var(--accent-5)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 10px; } .subtitle { color: var(--text-secondary); font-size: 18px; margin-bottom: 30px; } .progress-bar { width: 200px; height: 4px; background: var(--glass-bg); border-radius: 2px; overflow: hidden; margin: 0 auto; } .progress-fill { width: 0%; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent-4)); animation: loadProgress 2s ease-in-out forwards; } @keyframes loadProgress { to { width: 100%; } } /* Menu Screen */ .menu-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; } .player-info { display: flex; gap: 15px; } .level-badge, .streak-badge, .gem-count { background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 10px 15px; display: flex; align-items: center; gap: 8px; } .menu-content { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; } .menu-btn { background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 20px; color: var(--text-primary); font-size: 18px; cursor: pointer; transition: all 0.2s ease; position: relative; overflow: hidden; } .menu-btn:active { transform: scale(0.95); background: rgba(255, 255, 255, 0.1); } .play-btn { background: linear-gradient(135deg, rgba(255,107,107,0.3), rgba(244,114,182,0.3)); border: 1px solid rgba(255,255,255,0.2); padding: 30px; text-align: center; } .play-btn .btn-text { display: block; font-size: 28px; font-weight: 700; } .play-btn .btn-subtext { font-size: 14px; color: var(--text-secondary); } .menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .menu-btn .btn-icon { display: block; font-size: 24px; margin-bottom: 8px; } .btn-badge { position: absolute; top: 10px; right: 10px; background: var(--accent-1); border-radius: 12px; padding: 2px 8px; font-size: 12px; } /* Game Board */ #game { background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a1a 100%); } .game-header { padding: 15px; display: flex; justify-content: space-between; align-items: center; background: var(--glass-bg); backdrop-filter: blur(10px); z-index: 10; } .back-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--glass-bg); border: 1px solid var(--glass-border); color: white; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; } .game-stats { display: flex; gap: 15px; font-size: 14px; color: var(--text-secondary); } .power-up-bar { display: flex; gap: 8px; } .power-up { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 8px 12px; color: white; cursor: pointer; transition: all 0.2s; } .power-up:active { transform: scale(0.9); } .power-count { font-size: 12px; margin-left: 4px; } .game-board { flex: 1; display: grid; gap: 8px; padding: 20px; align-content: center; justify-content: center; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); max-width: 400px; margin: 0 auto; width: 100%; } .cell { aspect-ratio: 1; border-radius: 50%; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; transform: scale(0); animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; } @keyframes popIn { to { transform: scale(1); } } .cell:active { transform: scale(0.85); } .cell.rippling { animation: rippleEffect 0.6s ease-out; } @keyframes rippleEffect { 0% { transform: scale(1); box-shadow: 0 0 0 0 currentColor; } 50% { transform: scale(1.2); box-shadow: 0 0 20px 10px currentColor; } 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; } } .cell.cleared { animation: clearBurst 0.5s ease-out forwards; } @keyframes clearBurst { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.5; } 100% { transform: scale(0); opacity: 0; } } /* Colors */ .color-0 { background: var(--accent-1); box-shadow: 0 0 15px rgba(255,107,107,0.5); } .color-1 { background: var(--accent-2); box-shadow: 0 0 15px rgba(78,205,196,0.5); } .color-2 { background: var(--accent-3); box-shadow: 0 0 15px rgba(255,230,109,0.5); } .color-3 { background: var(--accent-4); box-shadow: 0 0 15px rgba(167,139,250,0.5); } .color-4 { background: var(--accent-5); box-shadow: 0 0 15px rgba(244,114,182,0.5); } .game-footer { padding: 15px; display: flex; justify-content: space-between; align-items: center; } .combo-display { font-size: 24px; font-weight: 700; color: var(--accent-3); opacity: 0; transition: opacity 0.3s; } .combo-display.active { opacity: 1; animation: comboPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); } @keyframes comboPop { 0% { transform: scale(0.5); } 100% { transform: scale(1); } } .hint-btn { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 10px 20px; color: var(--text-secondary); cursor: pointer; } /* Modals */ .modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); display: none; justify-content: center; align-items: center; z-index: 100; } .modal.active { display: flex; } .modal-content { background: var(--bg-secondary); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 30px; text-align: center; max-width: 320px; width: 90%; display: flex; flex-direction: column; gap: 15px; } .celebration { animation: celebrateIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); } @keyframes celebrateIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } } .modal-btn { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 15px; color: white; font-size: 16px; cursor: pointer; transition: all 0.2s; } .modal-btn:active { transform: scale(0.95); } .modal-btn.primary { background: linear-gradient(135deg, var(--accent-2), var(--accent-4)); border: none; font-weight: 600; } #particleCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; } /* Responsive */ @media (max-width: 360px) { .game-board { gap: 6px; padding: 10px; } .cell { min-width: 50px; } } @media (min-width: 768px) { .game-board { max-width: 500px; } }

Comments

Popular posts from this blog

Best recipes for dinner party