*{margin:0;padding:0;box-sizing:border-box}body{font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}html,body,#root{height:100%}button{font-family:inherit}.game-container{background:#fff;border-radius:20px;box-shadow:0 20px 60px #0000004d;padding:20px;max-width:840px;margin:0 auto}.game-header{display:flex;justify-content:space-between;align-items:stretch;margin-bottom:15px;padding:15px 20px;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:10px;gap:20px}.score-box{display:flex;flex-direction:column;justify-content:space-between;gap:10px;min-width:150px;border-radius:8px;padding:16px 12px;background:#ffffff26;border:2px solid rgba(255,255,255,.3)}.score-item{display:flex;align-items:baseline;gap:16px;justify-content:space-between}.score-label{font-size:16px;color:#fff;font-weight:600;white-space:nowrap}.score-value{font-size:24px;font-weight:700;color:#fff;text-align:right;flex:1}.level-section{display:flex;flex-direction:column;align-items:center;gap:10px}.level-badge{background:#ffffff26;color:#fff;padding:8px 20px;border-radius:20px;font-weight:700;font-size:16px;white-space:nowrap;border:2px solid rgba(255,255,255,.3)}.controls-section{display:flex;flex-direction:column;justify-content:space-between;gap:10px;align-items:flex-start}.main-controls{display:flex;gap:10px;width:100%;justify-content:space-between}.btn{padding:10px 20px;border:2px solid rgba(255,255,255,.3);border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;transition:transform .2s,opacity .2s,box-shadow .2s;font-family:inherit;position:relative;box-shadow:0 2px 8px #00000026}@media(hover:hover)and (pointer:fine){.btn[data-tooltip]:hover:after{content:attr(data-tooltip);position:absolute;bottom:100%;left:50%;transform:translate(-50%);margin-bottom:5px;padding:5px 10px;background:#000000e6;color:#fff;font-size:12px;font-weight:400;white-space:nowrap;border-radius:4px;pointer-events:none;z-index:1000}}@media(hover:hover)and (pointer:fine){.btn:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 4px 12px #0003;border-color:#ffffff80}}.btn:active:not(:disabled){transform:translateY(1px);box-shadow:0 1px 4px #00000026;transition:transform .05s,box-shadow .05s}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-help,.btn-mute{background:#ffffff26;color:#fff;min-width:50px;display:flex;align-items:center;justify-content:center}.btn .icon{width:24px;height:24px;filter:brightness(0) invert(1)}.btn-pause{background:#ffffff26;color:#fff;font-size:18px;min-width:50px}.btn-new{background:#ffffff26;color:#fff;min-width:50px;display:flex;align-items:center;justify-content:center}.btn-speed{background:#ffffff40;color:#fff;min-width:40px;padding:10px 15px;font-size:16px;border:2px solid rgba(255,255,255,.4)}.speed-label-container{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:0 8px 0 0}.speed-label{font-size:14px;font-weight:600;color:#fff;letter-spacing:1px}.speed-indicator{font-size:14px;font-weight:700;color:#fff;font-family:monospace}.speed-controls{display:flex;align-items:center;gap:5px;border-radius:8px;padding:8px 8px 8px 12px;background:#ffffff26;border:2px solid rgba(255,255,255,.3)}.icon-reset{width:18px;height:18px;filter:brightness(0) invert(1)}.icon-refresh{width:24px;height:24px;filter:brightness(0) invert(1)}.btn-speed-reset{display:flex;align-items:center;justify-content:center}.btn-large{padding:15px 40px;font-size:18px}.game-over-modal .btn-new{background:linear-gradient(135deg,#9b59b6,#8e44ad);border:3px solid white;color:#fff;box-shadow:0 4px 15px #9b59b666;margin-top:20px}.canvas-wrapper{position:relative;background:linear-gradient(180deg,#87ceeb,#e0f6ff);border-radius:10px;overflow:hidden;box-shadow:inset 0 2px 10px #0000001a}.hover-group-indicator{position:absolute;top:10px;left:10px;background:#fffffff2;padding:8px 15px;border-radius:20px;font-size:14px;font-weight:700;color:#333;box-shadow:0 2px 10px #0003;z-index:10;pointer-events:none}.game-over-overlay{position:fixed;inset:0;background:#000000b3;display:flex;justify-content:center;align-items:center;z-index:1000;animation:fadeIn .3s ease-in}.game-over-modal{background:linear-gradient(135deg,#667eea,#764ba2);padding:40px;border-radius:20px;box-shadow:0 20px 60px #0000004d;text-align:center;max-width:400px;animation:slideUp .3s ease-out;display:flex;flex-direction:column;align-items:center}.game-over-modal h2{margin:0 0 30px;color:#fff;font-size:36px}.final-score{margin:30px 0;display:flex;flex-direction:column;align-items:center;gap:10px}.final-score .score-label{color:#fff;font-size:18px}.final-score .score-value{font-size:48px;color:#fff}.new-high-score{margin:15px 0;font-size:20px;font-weight:700;color:#fff;animation:pulse 1s infinite}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{transform:translateY(50px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes pulse{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}@media(max-width:768px){.game-container{padding:15px}.game-header{flex-direction:column;gap:15px}.score-box{width:100%;flex-direction:row;justify-content:space-around;min-width:unset}.score-item{align-items:center;gap:8px}.level-section{flex-direction:row;gap:15px;justify-content:center;width:100%}.level-badge{align-self:center}.controls-section{width:100%;align-items:center}.main-controls{justify-content:center;gap:15px}.score-value{font-size:24px}.game-over-modal{margin:20px;padding:30px 20px}}.help-overlay{position:fixed;inset:0;background:#000000b3;display:flex;justify-content:center;align-items:center;z-index:1000;animation:fadeIn .3s ease-in}.help-modal{background:linear-gradient(135deg,#667eea,#764ba2);padding:40px;border-radius:20px;box-shadow:0 20px 60px #0000004d;max-width:600px;max-height:80vh;overflow-y:auto;animation:slideUp .3s ease-out;position:relative;margin:20px}.help-modal h2{margin:0 0 25px;color:#fff;font-size:32px;text-align:center}.help-modal h3{margin:0 0 10px;color:#fff;font-size:20px;font-weight:700}.help-content{color:#fff;line-height:1.6}.help-section{margin-bottom:25px;background:#ffffff1a;padding:20px;border-radius:12px;border:2px solid rgba(255,255,255,.2)}.help-section:last-child{margin-bottom:0}.help-section p{margin:0 0 10px;font-size:16px}.help-section p:last-child{margin-bottom:0}.help-section ul{margin:10px 0 0;padding-left:25px}.help-section li{margin-bottom:8px;font-size:15px}.help-section li:last-child{margin-bottom:0}.help-close{position:absolute;top:15px;right:15px;background:#fff3;border:2px solid rgba(255,255,255,.4);border-radius:50%;width:36px;height:36px;font-size:28px;line-height:1;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s,transform .2s;padding:0;font-family:inherit}.help-close:hover{background:#ffffff4d;transform:scale(1.1)}.btn-help-close{background:linear-gradient(135deg,#9b59b6,#8e44ad);border:3px solid white;color:#fff;box-shadow:0 4px 15px #9b59b666;margin-top:25px;width:100%}.expand-help-button{background:#fff3;color:#fff;padding:.5rem 1rem;border:1px solid rgba(255,255,255,.3);border-radius:6px;cursor:pointer;font-size:14px;font-weight:500;margin-top:12px;transition:all .2s;font-family:inherit}.expand-help-button:hover{background:#ffffff4d;transform:translateY(-1px)}.help-details{margin-top:12px;padding:15px;background:#0003;border-radius:8px;border:1px solid rgba(255,255,255,.15);animation:slideDown .3s ease-out}.help-details h3{margin:20px 0 10px;color:#fff;font-size:18px;font-weight:700}.help-details h3:first-child{margin-top:0}.help-details p{margin:0 0 10px;font-size:15px}.help-details ul{margin:10px 0 0;padding-left:25px}.help-details li{margin-bottom:8px;font-size:15px}.help-details li:last-child{margin-bottom:0}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){.help-modal{padding:30px 20px;max-width:90%;max-height:85vh}.help-modal h2{font-size:28px;margin-bottom:20px}.help-modal h3{font-size:18px}.help-section{padding:15px;margin-bottom:15px}.help-section p,.help-section li{font-size:14px}.expand-help-button{font-size:13px;padding:.4rem .8rem}.help-details li{font-size:14px}}.app{min-height:100vh;background:linear-gradient(135deg,#667eea,#764ba2);display:flex;flex-direction:column;align-items:center;padding:20px}.app-header{text-align:center;margin-bottom:20px}.app-header h1{color:#fff;font-size:48px;margin:0;text-shadow:2px 2px 4px rgba(0,0,0,.2);font-weight:700}.app-main{width:100%;max-width:1000px}@media(max-width:768px){.app-header{margin-top:10px}.app-header h1{font-size:32px}.app{padding:10px}}
