.home-screen{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.home-content{width:100%;max-width:440px;padding:32px;display:flex;flex-direction:column;align-items:center;gap:24px}.game-title{font-size:3rem;letter-spacing:.15em;background:linear-gradient(135deg,var(--color-primary),var(--player-lavender));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.game-subtitle{color:var(--color-text-muted);font-size:.95rem;margin-top:-12px}.menu-buttons{display:flex;flex-direction:column;gap:12px;width:100%}.menu-btn{width:100%;padding:14px 24px;font-size:1rem}.form-container{width:100%}.form-actions{display:flex;gap:12px;margin-top:8px}.form-actions button{flex:1}.error-message{background:#ff6b6b1a;color:var(--color-error);padding:10px 14px;border-radius:var(--border-radius);font-size:.85rem;text-align:center}.home-footer{margin-top:32px;text-align:center;color:var(--color-text-muted);font-size:.8rem;display:flex;flex-direction:column;gap:8px}.footer-links{display:flex;gap:16px;justify-content:center}.built-by{color:var(--color-primary);text-decoration:none;font-weight:600;font-size:.8rem;opacity:.7;transition:opacity .15s ease}.built-by:hover{opacity:1}.lobby-screen{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.lobby-content{width:100%;max-width:440px;padding:32px;display:flex;flex-direction:column;gap:24px}.lobby-title{font-size:1.75rem;text-align:center;letter-spacing:.05em}.player-setup{display:flex;flex-direction:column;gap:16px}.form-group{display:flex;flex-direction:column;gap:6px}.form-group label{font-size:.85rem;color:var(--color-text-muted)}.color-picker-btn{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--color-surface);border:2px solid var(--color-surface-light);border-radius:var(--border-radius);min-height:var(--touch-target)}.color-picker-btn:hover:not(:disabled){border-color:var(--color-primary)}.color-swatch{display:inline-block;width:24px;height:24px;border-radius:50%;border:2px solid rgba(255,255,255,.2)}.color-label{color:var(--color-text);font-weight:500}.players-list{display:flex;flex-direction:column;gap:8px}.players-list h3{font-size:.85rem;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.05em}.peer-card{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--color-surface);border-radius:var(--border-radius)}.peer-color{width:12px;height:12px;border-radius:50%;flex-shrink:0}.peer-name{flex:1;font-weight:500}.peer-status{font-size:.75rem;padding:4px 10px;border-radius:12px;font-weight:600;text-transform:uppercase}.peer-status.ready{background:#4ecdc426;color:var(--color-success)}.peer-status.waiting{background:#ffe66d26;color:var(--color-warning)}.lobby-actions{display:flex;gap:12px;margin-top:8px}.lobby-actions .btn-primary{flex:1;padding:14px 24px}.error-message{background:#ff6b6b1a;color:var(--color-error);padding:10px 14px;border-radius:var(--border-radius);font-size:.85rem;margin-top:8px}.touch-controls{position:fixed;bottom:0;left:0;right:0;padding:12px;padding-bottom:max(12px,env(safe-area-inset-bottom));display:flex;justify-content:space-between;align-items:flex-end;z-index:50;touch-action:none;user-select:none;-webkit-user-select:none;pointer-events:none}.controls-side{pointer-events:auto;display:flex;gap:8px}.left-side{flex-direction:row;align-items:flex-end}.right-side{flex-direction:column;align-items:flex-end}.control-btn{width:72px;height:72px;min-height:72px;padding:0;font-size:2rem;font-weight:700;background:#ffffff1f;border:2px solid rgba(255,255,255,.15);border-radius:50%;color:var(--color-text, #ffffff);display:flex;align-items:center;justify-content:center;transition:all .1s ease;-webkit-tap-highlight-color:transparent;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.btn-icon{display:flex;align-items:center;justify-content:center}.control-btn:active{transform:scale(.92);background:#ffffff40;border-color:var(--color-primary, #4ecdc4)}.left-btn{background:#74b9ff26;border-color:#74b9ff40}.left-btn:active{background:#74b9ff59}.right-btn{background:#74b9ff26;border-color:#74b9ff40}.right-btn:active{background:#74b9ff59}.down-btn{background:#ffab9126;border-color:#ffab9140}.down-btn:active{background:#ffab9159}.rotate-btn{background:#4ecdc426;border-color:#4ecdc440}.rotate-btn:active{background:#4ecdc459}.drop-btn{width:auto;min-width:72px;height:56px;min-height:56px;padding:0 20px;font-size:.8rem;font-weight:700;letter-spacing:.15em;border-radius:28px;background:#e9456033;border-color:#e945604d}.drop-btn:active{background:#e9456066}@media(min-width:400px){.control-btn{width:80px;height:80px;min-height:80px;font-size:2.25rem}.drop-btn{height:60px;min-height:60px;padding:0 24px;font-size:.875rem}}@media(orientation:landscape)and (max-height:500px){.touch-controls{padding:8px 16px}.control-btn{width:56px;height:56px;min-height:56px;font-size:1.5rem}.drop-btn{height:48px;min-height:48px;padding:0 16px;font-size:.75rem}}@media(max-width:360px){.control-btn{width:60px;height:60px;min-height:60px;font-size:1.75rem}.drop-btn{height:52px;min-height:52px;padding:0 16px;font-size:.75rem}}@media(hover:hover)and (pointer:fine){.touch-controls{display:none!important}}.key-binding-overlay{position:fixed;inset:0;background:#000c;display:flex;align-items:center;justify-content:center;z-index:1000;animation:fadeIn .2s ease}.key-binding-modal{background:var(--color-surface, #1a1a2e);border-radius:var(--border-radius-lg, 12px);padding:24px;min-width:340px;max-width:90vw;max-height:85vh;overflow-y:auto;animation:slideUp .2s ease}.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.1)}.modal-header h2{margin:0;font-size:1.25rem;color:var(--color-text, #ffffff)}.btn-close{background:none;border:none;color:var(--color-text-muted, #888);font-size:1.5rem;cursor:pointer;padding:0 4px;line-height:1}.btn-close:hover{color:var(--color-text, #ffffff)}.section-label{display:block;font-size:.875rem;color:var(--color-text-muted, #888);margin-bottom:8px;text-transform:uppercase;letter-spacing:.05em}.scheme-section{margin-bottom:20px}.scheme-list{display:flex;flex-direction:column;gap:6px}.scheme-button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:10px 14px;background:var(--color-surface-light, rgba(255, 255, 255, .05));border:1px solid rgba(255,255,255,.1);border-radius:var(--border-radius, 8px);color:var(--color-text, #ffffff);cursor:pointer;transition:all .15s ease}.scheme-button:hover{background:#ffffff1a;border-color:#fff3}.scheme-button.active{background:#4ecdc426;border-color:var(--color-primary, #4ecdc4)}.scheme-name{font-size:.95rem;font-weight:600}.scheme-keys{font-size:.8rem;color:var(--color-text-muted, #888)}.bindings-section{margin-bottom:20px}.bindings-list{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}.binding-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 10px;background:#ffffff08;border-radius:var(--border-radius, 8px);transition:background .15s ease}.binding-row.listening{background:#4ecdc41a;box-shadow:0 0 0 1px var(--color-primary, #4ecdc4)}.action-label{font-size:.875rem;color:var(--color-text, #ffffff);min-width:90px}.key-button{flex:1;max-width:140px;padding:8px 12px;background:var(--color-surface-light, rgba(255, 255, 255, .05));border:1px solid rgba(255,255,255,.15);border-radius:var(--border-radius, 8px);color:var(--color-text, #ffffff);font-size:.875rem;font-weight:600;text-align:center;cursor:pointer;transition:all .15s ease;min-height:36px}.key-button:hover{background:#ffffff1f;border-color:#ffffff40}.key-button.listening{background:var(--color-primary, #4ecdc4);border-color:var(--color-primary, #4ecdc4);color:#fff}.key-display{display:inline-block;min-width:20px}.listening-text{font-weight:400;font-size:.8rem}.btn-reset{width:100%;padding:8px;background:transparent;border:1px solid rgba(255,255,255,.15);border-radius:var(--border-radius, 8px);color:var(--color-text-muted, #888);font-size:.8rem;cursor:pointer;transition:all .15s ease}.btn-reset:hover{background:#ffffff0d;color:var(--color-text, #ffffff)}.error-message{padding:10px 12px;background:#e9456026;border:1px solid rgba(233,69,96,.3);border-radius:var(--border-radius, 8px);color:#ff6b6b;font-size:.8rem;margin-bottom:16px;text-align:center}.modal-actions{display:flex;gap:12px;justify-content:flex-end}.modal-actions button{min-width:90px;padding:10px 16px;border-radius:var(--border-radius, 8px);font-size:.875rem;font-weight:600;cursor:pointer;transition:all .15s ease}.btn-secondary{background:transparent;border:1px solid rgba(255,255,255,.2);color:var(--color-text, #ffffff)}.btn-secondary:hover{background:#ffffff1a}.btn-primary{background:var(--color-primary, #4ecdc4);border:1px solid var(--color-primary, #4ecdc4);color:#fff}.btn-primary:hover{opacity:.9}.game-screen{width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden}.game-header{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;background:var(--color-surface);flex-shrink:0;min-height:48px;gap:12px}.game-stats{display:flex;gap:24px}.stat-item{display:flex;flex-direction:column;align-items:center;gap:2px}.stat-label{font-size:.65rem;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.08em;font-weight:600}.stat-value{font-size:1.2rem;font-weight:700;font-variant-numeric:tabular-nums;color:var(--color-text)}.game-actions{display:flex;gap:8px}.icon-btn{padding:8px 12px;font-size:1rem;min-height:36px;min-width:36px}.back-btn{padding:8px 16px;font-size:.85rem;min-height:36px}.game-body{flex:1;display:flex;align-items:stretch;min-height:0;overflow:hidden}.game-sidebar{width:120px;flex-shrink:0;display:flex;flex-direction:column;gap:12px;padding:12px 8px;background:var(--color-surface);align-items:center}.sidebar-panel{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px;background:var(--color-surface-light);border-radius:var(--border-radius);width:100%}.panel-label{font-size:.7rem;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.1em;font-weight:700}.hold-preview,.active-preview{min-height:60px;display:flex;align-items:center;justify-content:center}.next-preview-list{display:flex;flex-direction:column;gap:8px;align-items:center;width:100%}.piece-preview{display:flex;flex-wrap:wrap}.preview-cell{border-radius:2px}.preview-cell.filled{box-shadow:inset 0 -2px #0000004d}.empty-preview{color:var(--color-text-muted);font-size:.9rem;opacity:.4}.game-canvas-wrap{flex:1;display:flex;align-items:center;justify-content:center;background:var(--color-background);position:relative;min-width:0}.game-canvas{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.notifications-overlay{position:absolute;top:20px;left:50%;transform:translate(-50%);display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;z-index:100}.notification{padding:10px 24px;border-radius:var(--border-radius);font-size:1.1rem;font-weight:800;text-transform:uppercase;letter-spacing:.1em;animation:notif-in .3s ease-out,notif-out .4s ease-in 2s forwards;text-shadow:0 2px 4px rgba(0,0,0,.5)}.notification-success{background:#4ecdc4e6;color:#1a1a2e}.notification-info{background:#74b9ffe6;color:#1a1a2e}.notification-warning{background:#ffe66de6;color:#1a1a2e}.notification-error{background:#ff6b6be6;color:#fff}@keyframes notif-in{0%{opacity:0;transform:translateY(-20px) scale(.9)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes notif-out{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-10px) scale(.95)}}.pause-overlay{position:absolute;inset:0;background:#1a1a2ed9;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:200}.pause-content{text-align:center;animation:slideUp .3s ease-out}.pause-content h2{font-size:3rem;font-weight:800;color:var(--color-text);margin-bottom:24px;letter-spacing:.15em;text-shadow:0 4px 8px rgba(0,0,0,.5)}.pause-actions{display:flex;flex-direction:column;gap:12px;align-items:center}.pause-actions button{width:200px;font-size:1rem;padding:12px 24px}@media(max-width:768px){.game-sidebar{display:none}.game-stats{gap:16px}.stat-value{font-size:1rem}}@media(max-width:480px){.game-header{padding:4px 8px}.game-stats{gap:12px}.stat-label{font-size:.55rem}.stat-value{font-size:.9rem}}.gameover-screen{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.gameover-content{width:100%;max-width:440px;padding:32px;display:flex;flex-direction:column;align-items:center;gap:24px}.gameover-title{font-size:2.25rem;letter-spacing:.08em;color:var(--color-primary)}.gameover-stats{width:100%;display:flex;flex-direction:column;gap:12px;padding:24px;background:var(--color-surface);border-radius:var(--border-radius-lg);border:1px solid var(--color-surface-light)}.stat-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0}.stat-label{font-size:.95rem;color:var(--color-text-muted);font-weight:500}.stat-value{font-size:1.25rem;font-weight:700;font-variant-numeric:tabular-nums;color:var(--color-text)}.gameover-actions{display:flex;gap:12px;width:100%;margin-top:8px}.high-score-badge{font-size:1.1rem;font-weight:700;color:var(--color-warning, #f0ad4e);letter-spacing:.05em;animation:pulse-glow 1.5s ease-in-out infinite}@keyframes pulse-glow{0%,to{opacity:1}50%{opacity:.6}}.gameover-actions button{flex:1;padding:14px 24px;font-size:1rem}.app{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}:root{--color-background: #1A1A2E;--color-surface: #16213E;--color-surface-light: #1F2B47;--color-primary: #E94560;--color-primary-hover: #FF6B6B;--color-text: #EAEAEA;--color-text-muted: #8B8B8B;--color-success: #4ECDC4;--color-warning: #FFE66D;--color-error: #FF6B6B;--player-coral: #FF6B6B;--player-ocean: #4ECDC4;--player-sunflower: #FFE66D;--player-lavender: #A06CD5;--player-mint: #95E1D3;--player-peach: #FFAB91;--player-sky: #74B9FF;--player-rose: #FD79A8;--cell-size: 24px;--touch-target: 48px;--border-radius: 8px;--border-radius-lg: 16px;--font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{width:100%;height:100%;overflow:hidden}body{font-family:var(--font-family);background-color:var(--color-background);color:var(--color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;touch-action:manipulation;user-select:none;-webkit-user-select:none}#root{display:flex;flex-direction:column}body{overscroll-behavior:none}button{font-family:inherit;font-size:1rem;font-weight:600;border:none;border-radius:var(--border-radius);cursor:pointer;transition:all .15s ease;min-height:var(--touch-target);padding:12px 24px}button:active{transform:scale(.97)}button:disabled{opacity:.5;cursor:not-allowed;transform:none}.btn-primary{background:var(--color-primary);color:#fff}.btn-primary:hover:not(:disabled){background:var(--color-primary-hover)}.btn-secondary{background:var(--color-surface-light);color:var(--color-text);border:2px solid var(--color-surface-light)}.btn-secondary:hover:not(:disabled){border-color:var(--color-primary)}input,select{font-family:inherit;font-size:1rem;padding:12px 16px;border:2px solid var(--color-surface-light);border-radius:var(--border-radius);background:var(--color-surface);color:var(--color-text);min-height:var(--touch-target);transition:border-color .15s ease}input:focus,select:focus{outline:none;border-color:var(--color-primary)}input::placeholder{color:var(--color-text-muted)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes pulse{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}.animate-fade-in{animation:fadeIn .3s ease}.animate-slide-up{animation:slideUp .4s ease}
