*{margin:0;padding:0;box-sizing:border-box}body{font-family:Comic Sans MS,Arial Rounded MT Bold,Helvetica Rounded,Arial,sans-serif;background:linear-gradient(135deg,#667eea,#764ba2);min-height:100vh;display:flex;align-items:center;justify-content:center;color:#333}.container{width:100%;max-width:800px;padding:20px}.screen{position:relative;background:#fff;border-radius:30px;padding:40px;box-shadow:0 20px 60px #0000004d;animation:slideIn .5s ease}.hidden{display:none!important}@keyframes slideIn{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}.game-title{font-size:3em;text-align:center;color:#667eea;margin-bottom:20px;text-shadow:1px 1px 0px #5a6fd4,2px 2px 0px #4e5ec0,3px 3px 0px #424dac,4px 4px 0px #363c98,5px 5px 10px rgba(0,0,0,.3)}.subtitle{text-align:center;font-size:1.3em;color:#666;margin-bottom:30px}.profile-section{margin-bottom:30px}.profile-selector{display:flex;flex-direction:column;gap:15px;margin-bottom:20px;max-height:300px;overflow-y:auto}.no-profiles-message{text-align:center;color:#666;font-size:1.1em;padding:30px}.profile-card{display:grid;grid-template-columns:auto 1fr auto;gap:15px;align-items:center;padding:15px;border:3px solid #ddd;border-radius:15px;cursor:pointer;transition:all .3s ease;background:#fff}.profile-card:hover{border-color:#667eea;transform:translateY(-2px);box-shadow:0 6px 25px #667eea4d}.profile-card.selected{border-color:#667eea;background:linear-gradient(135deg,#667eea1a,#764ba21a);box-shadow:0 4px 20px #667eea4d}.profile-avatar{font-size:2em;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.profile-info{display:flex;flex-direction:column;gap:2px;min-width:0}.profile-nickname{font-size:1.3em;font-weight:700;color:#333;margin-bottom:3px}.profile-email{font-size:.9em;color:#666}.profile-actions{display:flex;gap:8px}.profile-edit-btn{background:none;border:2px solid #667eea;padding:8px 12px;border-radius:10px;cursor:pointer;font-size:1.2em;transition:all .3s ease}.profile-edit-btn:hover{background:#667eea;transform:translateY(-2px);box-shadow:0 4px 15px #667eea4d}.create-profile-btn{width:100%;padding:15px 30px;font-size:1.2em;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:15px;cursor:pointer;font-family:inherit;font-weight:700;transition:all .3s ease;box-shadow:0 4px 15px #667eea66}.create-profile-btn:hover{transform:translateY(-2px);box-shadow:0 6px 25px #667eea99}.modal{position:fixed;inset:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px}.modal-content{background:#fff;border-radius:20px;padding:30px;max-width:600px;width:100%;max-height:90vh;overflow-y:auto;animation:modalSlideIn .3s ease}@keyframes modalSlideIn{0%{opacity:0;transform:translateY(-30px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px;padding-bottom:15px;border-bottom:2px solid #eee}.modal-header h2{color:#667eea;font-size:1.8em;margin:0}.modal-close{background:none;border:none;font-size:2em;cursor:pointer;color:#999;padding:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all .2s ease}.modal-close:hover{background:#f0f0f0;color:#333;transform:translateY(-2px)}.profile-form{display:flex;flex-direction:column;gap:20px}.form-group{display:flex;flex-direction:column;gap:8px}.form-group label{font-weight:700;color:#555;font-size:1.05em}.form-group input[type=email],.form-group input[type=text],.form-group select{padding:12px;border:2px solid #ddd;border-radius:10px;font-size:1em;font-family:inherit;transition:all .3s ease}.form-group input[type=range]{width:100%;height:8px;border-radius:5px;background:#ddd;outline:none;cursor:pointer}.form-group input[type=range]::-webkit-slider-thumb{appearance:none;width:20px;height:20px;border-radius:50%;background:#667eea;cursor:pointer;transition:all .3s ease}.form-group input[type=range]::-webkit-slider-thumb:hover{background:#764ba2;transform:scale(1.2)}.form-group input:focus,.form-group select:focus{outline:none;border-color:#667eea;box-shadow:0 0 10px #667eea33}.form-group input:disabled{background:#f5f5f5;cursor:not-allowed}.profile-header-grid{display:grid;grid-template-columns:auto 1fr;gap:20px;align-items:start;margin-bottom:20px}.profile-fields{display:flex;flex-direction:column;gap:15px}.profile-fields .form-group{margin-bottom:0}.avatar-selector{position:relative;display:inline-block}.avatar-display{font-size:3.5em;width:80px;height:80px;border:3px solid #667eea;border-radius:15px;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s ease}.avatar-display:hover{transform:translateY(-2px);box-shadow:0 6px 20px #667eea4d}.emoji-picker{position:absolute;top:90px;left:0;background:#fff;border:3px solid #667eea;border-radius:15px;padding:15px;box-shadow:0 8px 30px #0000004d;z-index:10;max-height:300px;overflow-y:auto}.emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:5px}.emoji-option{background:none;border:2px solid transparent;padding:8px;font-size:1.8em;cursor:pointer;border-radius:8px;transition:all .2s ease}.emoji-option:hover{background:#f0f0f0;border-color:#667eea;transform:scale(1.15)}.voice-settings{display:flex;flex-direction:column;gap:15px;padding:15px;background:#f8f9ff;border-radius:10px}.voice-setting{display:flex;flex-direction:column;gap:8px}.voice-selector-row{display:flex;gap:10px;align-items:center;flex-wrap:nowrap}.voice-selector-row select{flex:1;min-width:0}.preview-voice-btn{padding:10px 16px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:10px;cursor:pointer;font-family:inherit;font-size:.95em;font-weight:700;transition:all .3s ease;white-space:nowrap;box-shadow:0 2px 8px #667eea4d;flex-shrink:0}.preview-voice-btn:hover{transform:translateY(-2px);box-shadow:0 4px 15px #667eea80}.preview-voice-btn:active{transform:translateY(0)}.voice-setting label{font-weight:400;font-size:.95em;color:#555}.voice-setting input[type=range]{width:100%;height:8px;border-radius:5px;background:#ddd;outline:none;cursor:pointer}.voice-setting input[type=range]::-webkit-slider-thumb{appearance:none;width:20px;height:20px;border-radius:50%;background:#667eea;cursor:pointer;transition:all .3s ease}.voice-setting input[type=range]::-webkit-slider-thumb:hover{background:#764ba2;transform:scale(1.2)}.checkbox-label{display:flex;align-items:center;gap:10px;cursor:pointer}.checkbox-label input[type=checkbox]{width:20px;height:20px;cursor:pointer}.speed-hint{margin-top:4px}.speed-hint small{color:#666;font-style:italic}.form-actions{display:flex;gap:10px;margin-top:10px}.btn-primary,.btn-secondary{flex:1;padding:12px 24px;font-size:1.1em;border:none;border-radius:12px;cursor:pointer;font-family:inherit;font-weight:700;transition:all .3s ease}.btn-primary{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;box-shadow:0 4px 15px #667eea66}.btn-primary:hover{transform:translateY(-2px);box-shadow:0 6px 25px #667eea99}.btn-secondary{background:#f0f0f0;color:#555}.btn-secondary:hover{background:#e0e0e0;transform:translateY(-2px)}.start-game-btn{display:block;margin:30px auto 0;padding:20px 50px;font-size:1.3em;background:linear-gradient(135deg,#84fab0,#8fd3f4);color:#2d5a3d;border:none;border-radius:20px;cursor:pointer;font-family:inherit;font-weight:700;transition:all .3s ease}.start-game-btn:hover{transform:translateY(-2px);box-shadow:0 8px 25px #84fab066}.view-stats-btn{display:block;margin:20px auto 0;padding:15px 30px;font-size:1.1em;background:linear-gradient(135deg,#f093fb,#f5576c);color:#fff;border:none;border-radius:15px;cursor:pointer;font-family:inherit;font-weight:700;transition:all .3s ease}.view-stats-btn:hover{transform:translateY(-2px);box-shadow:0 8px 25px #f5576c66}.manage-words-btn{display:block;margin:20px auto 0;padding:15px 30px;font-size:1.1em;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:15px;cursor:pointer;font-family:inherit;font-weight:700;transition:all .3s ease}.manage-words-btn:hover{transform:translateY(-2px);box-shadow:0 8px 25px #667eea66}.difficulty-selector{display:flex;gap:20px;justify-content:center;flex-wrap:wrap}.difficulty-btn{padding:20px 40px;font-size:1.2em;border:none;border-radius:20px;cursor:pointer;transition:all .3s ease;display:flex;flex-direction:column;align-items:center;gap:10px;font-family:inherit;font-weight:700}.difficulty-btn.easy{background:linear-gradient(135deg,#84fab0,#8fd3f4);color:#2d5a3d}.difficulty-btn.medium{background:linear-gradient(135deg,#ffecd2,#fcb69f);color:#7d4a2e}.difficulty-btn.hard{background:linear-gradient(135deg,#ff9a9e,#fecfef);color:#7d2e4a}.difficulty-btn:hover{transform:translateY(-2px);box-shadow:0 6px 20px #00000026}.difficulty-btn:active{transform:translateY(0)}.btn-icon{font-size:2em}.game-header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;margin-bottom:30px;gap:20px}.player-section{display:flex;align-items:center;gap:10px;justify-self:start;flex-shrink:0}.player-info{background:linear-gradient(135deg,#a8edea,#fed6e3);padding:10px 20px;border-radius:15px;font-weight:700;white-space:nowrap;overflow:hidden}.player-label{color:#5a4a7d;font-size:1em;margin-right:8px}.player-name-display{color:#764ba2;font-size:1.2em}.stats{display:flex;gap:30px;justify-self:center;align-items:center;flex-shrink:0}.stat-item{display:flex;align-items:center;gap:10px;background:linear-gradient(135deg,#ffecd2,#fcb69f);padding:10px 20px;border-radius:15px;font-weight:700;white-space:nowrap}.stat-label{color:#7d4a2e;font-size:1.1em}.stat-value{font-size:1.3em;color:#d63031}.speak-btn{width:60px;height:60px;padding:0;font-size:1.5em;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:15px;cursor:pointer;transition:all .3s ease;font-family:inherit;font-weight:700;flex-shrink:0;display:flex;align-items:center;justify-content:center}.speak-btn:hover{transform:translateY(-2px);box-shadow:0 6px 20px #667eea4d}.quit-btn{padding:10px 20px;font-size:1em;background:linear-gradient(135deg,#ff6b6b,#ee5a6f);color:#fff;border:none;border-radius:15px;cursor:pointer;transition:all .3s ease;font-family:inherit;font-weight:700}.quit-btn:hover{transform:translateY(-2px);box-shadow:0 6px 20px #ff6b6b66}.quit-btn-compact{width:40px;height:40px;padding:0;font-size:1.2em;display:flex;align-items:center;justify-content:center;flex-shrink:0}.game-area{height:250px;background:linear-gradient(to bottom,#87ceeb,#b8e6f0 70%,#d4f1f9);border-radius:20px;position:relative;overflow:hidden;margin-bottom:30px;border:4px solid #5dadb6}.parallax-layer{position:absolute;width:200%;height:100%;pointer-events:none}.parallax-sky{z-index:1}.parallax-mountains{z-index:2;bottom:0;zoom:2;opacity:.5;animation:parallaxSlow 60s linear infinite}.parallax-trees{z-index:3;bottom:15px;zoom:2;animation:parallaxMedium 30s linear infinite}@keyframes parallaxSlow{0%{transform:translate(0)}to{transform:translate(-50%)}}@keyframes parallaxMedium{0%{transform:translate(0)}to{transform:translate(-50%)}}.clouds{position:relative;width:100%;height:100%}.cloud{position:absolute;font-size:3.5em;animation:floatCloud linear infinite}.cloud-1{top:10px;left:10%;animation-duration:45s;animation-delay:0s;opacity:.25}.cloud-2{top:30px;left:50%;animation-duration:60s;animation-delay:-20s;opacity:.5}.cloud-3{top:5px;left:80%;animation-duration:50s;animation-delay:-30s;opacity:.85}@keyframes floatCloud{0%{transform:translate(0)}to{transform:translate(-120vw)}}.mountain{position:absolute;font-size:4em;opacity:.6}.mountain-1{left:5%;bottom:0}.mountain-2{left:35%;bottom:5px}.mountain-3{left:70%;bottom:0}.parallax-mountains:after{content:"🏔️";position:absolute;left:105%;bottom:0;font-size:4em;opacity:.6}.parallax-mountains:before{content:"⛰️";position:absolute;left:135%;bottom:5px;font-size:4em;opacity:.6}.tree{position:absolute;font-size:2.5em;bottom:0;opacity:.8}.tree-1{left:15%}.tree-2{left:40%}.tree-3{left:65%}.tree-4{left:85%}.parallax-trees:after{content:"🌲🌳🌲🌳";position:absolute;left:100%;bottom:0;font-size:2.5em;opacity:.8;letter-spacing:15vw}.ground{position:absolute;bottom:0;left:0;width:200%;height:50px;background:linear-gradient(to bottom,#8bc34a,#689f38);border-top:3px solid #7cb342;z-index:4;animation:parallaxFast 15s linear infinite}@keyframes parallaxFast{0%{transform:translate(0)}to{transform:translate(-50%)}}.grass{position:absolute;top:-10px;left:0;width:200%;font-size:1.2em;opacity:.7;white-space:nowrap}.character{position:absolute;bottom:35px;left:100px;font-size:4em;transform:scaleX(-1);animation:run .3s ease-in-out infinite;z-index:5;line-height:1}.character.jumping{animation:jump .8s ease!important}.character.crashing{animation:crash .6s ease!important}@keyframes run{0%,to{bottom:35px}50%{bottom:40px}}@keyframes jump{0%{bottom:35px}40%{bottom:150px}60%{bottom:150px}to{bottom:35px}}@keyframes crash{0%{bottom:35px;transform:scaleX(-1) rotate(0)}20%{bottom:70px;transform:scaleX(-1) rotate(-25deg)}40%{bottom:30px;transform:scaleX(-1) rotate(15deg)}50%{bottom:35px;transform:scaleX(-1) rotate(-10deg)}65%{bottom:25px;transform:scaleX(-1) rotate(5deg)}80%{bottom:30px;transform:scaleX(-1) rotate(-3deg)}to{bottom:35px;transform:scaleX(-1) rotate(0)}}.obstacle{position:absolute;bottom:35px;right:-200px;font-size:3em;opacity:0;z-index:5;line-height:1}.obstacle.show{opacity:1;animation:slideLeft 3s linear forwards}@keyframes slideLeft{0%{right:-200px}to{right:calc(100% + 200px)}}.speech-bubble{position:absolute;bottom:165px;left:100px;background:#fff;border:3px solid #333;border-radius:20px;padding:15px 20px;max-width:300px;box-shadow:0 5px 15px #0003;animation:bubblePop .3s ease;z-index:10}.speech-bubble:after{content:"";position:absolute;bottom:-15px;left:30px;width:0;height:0;border-left:15px solid transparent;border-right:15px solid transparent;border-top:15px solid white}.speech-bubble:before{content:"";position:absolute;bottom:-20px;left:27px;width:0;height:0;border-left:18px solid transparent;border-right:18px solid transparent;border-top:18px solid #333;z-index:-1}.speech-text{font-size:1.3em;font-weight:700;color:#e74c3c;text-align:center}@keyframes bubblePop{0%{opacity:0;transform:scale(.5)}50%{transform:scale(1.1)}to{opacity:1;transform:scale(1)}}.ugh-text{position:absolute;bottom:155px;left:80px;font-size:2.5em;font-weight:700;color:#ff6b6b;text-shadow:2px 2px 4px rgba(0,0,0,.3);animation:ughPop .8s ease;z-index:10}.speed-bonus{position:absolute;top:35%;left:50%;transform:translate(-50%,-50%);text-align:center;font-weight:700;text-shadow:2px 2px 4px rgba(0,0,0,.3);animation:speedBonusPop .6s ease;z-index:15;pointer-events:none;min-width:450px}.speed-tier-text{font-size:2.5em;margin-bottom:8px}.speed-multiplier-text{font-size:1.5em;color:#333}.speed-bonus[data-tier=lightning] .speed-tier-text{color:gold;animation:lightningPulse .3s ease infinite}.speed-bonus[data-tier=fast] .speed-tier-text{color:#4caf50}.speed-bonus[data-tier=good] .speed-tier-text{color:#2196f3}.speed-bonus[data-tier=normal] .speed-tier-text{color:#666}@keyframes speedBonusPop{0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}50%{transform:translate(-50%,-50%) scale(1.1)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes lightningPulse{0%,to{filter:brightness(1)}50%{filter:brightness(1.4)}}@keyframes ughPop{0%{opacity:0;transform:translateY(20px) scale(.5)}30%{opacity:1;transform:translateY(-10px) scale(1.2)}60%{transform:translateY(0) scale(1.1)}to{opacity:0;transform:translateY(-30px) scale(.8)}}.input-area{text-align:center}.instruction{font-size:1.2em;color:#666;margin-bottom:20px}.input-row{display:flex;gap:10px;align-items:center;justify-content:center;max-width:500px;margin:0 auto}.word-input{flex:1;min-width:0;padding:15px 25px;font-size:1.5em;border:3px solid #667eea;border-radius:15px;text-align:center;font-family:inherit;outline:none;transition:all .3s ease}.word-input:focus{border-color:#764ba2;box-shadow:0 0 20px #667eea4d;transform:scale(1.02)}.word-input:disabled{background:#f0f0f0;cursor:not-allowed}.error-message{margin-top:20px;padding:15px 25px;background:#ff6b6b;color:#fff;border-radius:15px;font-size:1.2em;font-weight:700;animation:shake .5s ease}@keyframes shake{0%,to{transform:translate(0)}25%{transform:translate(-10px)}75%{transform:translate(10px)}}.game-over-title{font-size:3em;text-align:center;color:#764ba2;margin-bottom:30px;text-shadow:1px 1px 0px #68408e,2px 2px 0px #5a357a,3px 3px 0px #4c2a66,4px 4px 0px #3e1f52,5px 5px 10px rgba(0,0,0,.3)}.final-score-container{text-align:center;margin-bottom:30px}.final-score-label{font-size:1.5em;color:#666;margin-bottom:10px}.final-score{font-size:4em;color:#667eea;font-weight:700;text-shadow:2px 2px 4px rgba(0,0,0,.1)}.final-level{font-size:1.3em;color:#999;margin-top:10px}.session-comparison{background:linear-gradient(135deg,#ffecd2,#fcb69f);border-radius:20px;padding:20px 30px;margin-bottom:30px}.comparison-title{font-size:1.5em;color:#7d4a2e;margin-bottom:15px;text-align:center}.comparison-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:15px}.stat-comparison-item{background:#fff;border-radius:10px;padding:10px;text-align:center}.stat-comparison-label{font-size:.9em;color:#666;margin-bottom:5px}.stat-comparison-value{font-size:1.5em;font-weight:700;color:#667eea}.stat-comparison-current{color:#2ecc71}.stat-comparison-worse{color:#e74c3c}.game-over-buttons{display:flex;gap:15px;justify-content:center;flex-wrap:wrap}.play-again-btn{padding:20px 40px;font-size:1.3em;background:linear-gradient(135deg,#84fab0,#8fd3f4);color:#2d5a3d;border:none;border-radius:20px;cursor:pointer;font-family:inherit;font-weight:700;transition:all .3s ease}.play-again-btn:hover{transform:translateY(-2px);box-shadow:0 8px 25px #84fab066}.level-up-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#000c;display:flex;align-items:center;justify-content:center;z-index:1000;animation:fadeIn .3s ease}.level-up-content{background:#fff;border-radius:30px;padding:60px 80px;text-align:center;box-shadow:0 20px 60px #0006;animation:scaleIn .5s ease}@keyframes scaleIn{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.level-up-title{font-size:3.5em;color:#667eea;margin-bottom:20px;text-shadow:1px 1px 0px #5a6fd4,2px 2px 0px #4e5ec0,3px 3px 0px #424dac,4px 4px 0px #363c98,5px 5px 10px rgba(0,0,0,.3)}.level-up-message{font-size:2em;color:#764ba2;font-weight:700}.debug{margin-top:20px;padding:10px;background:#f0f0f0;border-radius:10px;font-size:.9em;color:#666}.debug-panel{position:fixed;bottom:20px;right:20px;background:#000000e6;color:#0f0;padding:15px;border-radius:10px;font-family:Courier New,monospace;font-size:.85em;min-width:350px;max-width:450px;box-shadow:0 5px 20px #00000080;z-index:999;border:2px solid #00ff00}.debug-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #00ff00;color:#ff0}.debug-hint{font-size:.8em;color:#888}.debug-info{margin-bottom:15px;line-height:1.6}.debug-info div{margin:3px 0}.debug-label{color:#0af;display:inline-block;width:140px}.debug-value{color:#0f0;font-weight:700}.debug-warning{color:#ff6b6b;font-weight:700}.debug-timeline{margin-top:15px;padding-top:10px;border-top:1px solid #00ff00}.debug-timeline-bar{position:relative;height:30px;background:#222;border-radius:5px;overflow:hidden;border:1px solid #444}.debug-phase{position:absolute;top:0;height:100%;transition:width .1s linear}.debug-phase-speaking{left:0;background:linear-gradient(90deg,#667eea,#764ba2);opacity:.7}.debug-phase-typing{background:linear-gradient(90deg,#84fab0,#8fd3f4);opacity:.7}.debug-marker{position:absolute;top:0;width:3px;height:100%;background:#ff6b6b;box-shadow:0 0 10px #ff6b6b}.debug-jump-marker{background:#ff0;box-shadow:0 0 10px #ff0}.debug-timeline-labels{display:flex;justify-content:space-between;margin-top:5px;font-size:.75em;color:#888}#debug-timeline-current{color:#0f0;font-weight:700}@media(max-width:600px){.game-title{font-size:2em}.difficulty-selector{flex-direction:column}.difficulty-btn{width:100%}.game-area{height:150px}.character{font-size:3em}.stats{flex-direction:column;gap:10px}}
