*{margin:0;padding:0;box-sizing:border-box}html{font-size:16px;height:100%}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;min-height:100vh;background-color:#ecf0f1;color:#333}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}:focus{outline:2px solid #3498db;outline-offset:2px}button{background:none;border:none;font:inherit;cursor:pointer}@media (max-width: 768px){html{font-size:14px}}@media (max-width: 480px){html{font-size:12px}}:root{--primary-color: #3498db;--secondary-color: #2ecc71;--danger-color: #e74c3c;--warning-color: #f39c12;--dark-color: #2c3e50;--light-color: #f8f9fa;--border-color: #e0e0e0;--text-color: #333;--text-light: #7f8c8d}*{box-sizing:border-box;margin:0;padding:0}body{font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;line-height:1.6;color:var(--text-color);background-color:#ecf0f1}#root{height:100vh;display:flex;flex-direction:column;overflow:hidden}.app-container{flex:1;padding:1rem;width:100%;max-width:1200px;margin:0 auto;overflow:auto}button{cursor:pointer;font-family:inherit}button:disabled{cursor:not-allowed;opacity:.7}h1,h2,h3,h4,h5,h6{color:var(--dark-color);line-height:1.2}input,select{font-family:inherit;font-size:1rem}table{width:100%;border-collapse:collapse}th,td{padding:.75rem;text-align:left}@media (max-width: 768px){.app-container{padding:.5rem}}.setup-screen{max-width:600px;margin:0 auto;padding:2rem;display:flex;flex-direction:column;gap:1.5rem}.setup-screen h1{font-size:2.5rem;text-align:center;margin-bottom:.5rem;color:#2c3e50}.setup-screen h2{font-size:1.8rem;text-align:center;margin-bottom:1.5rem;color:#34495e}.setup-section{display:flex;flex-direction:column;gap:1rem;padding:1.5rem;background-color:#f8f9fa;border-radius:8px;box-shadow:0 2px 4px #0000001a}.setup-section h3{margin-top:0;margin-bottom:1rem;color:#2c3e50}.setup-section label{font-weight:600;margin-bottom:.5rem;display:block}.setup-section select{padding:.75rem;border:1px solid #ddd;border-radius:4px;font-size:1rem;background-color:#fff}.drag-handle{cursor:grab;color:#95a5a6;margin-right:.75rem;font-size:1.25rem;-webkit-user-select:none;user-select:none;padding:.25rem .5rem;border-radius:4px;transition:background-color .2s}.error-message{color:#e74c3c;background-color:#fadbd8;padding:.75rem;border-radius:4px;font-weight:600}.start-game-btn{background-color:#2ecc71;color:#fff;border:none;border-radius:4px;padding:1rem;font-size:1.125rem;font-weight:600;cursor:pointer;transition:background-color .2s;margin-top:1rem}.start-game-btn:hover{background-color:#27ae60}.start-game-btn:disabled{background-color:#95a5a6;cursor:not-allowed}@media (max-width: 768px){.setup-screen,.setup-section{padding:1rem}.player-input{flex-direction:column;align-items:flex-start;gap:.5rem}}.game-screen{max-width:900px;margin:0 auto;padding:1.5rem;display:flex;flex-direction:column;gap:1.5rem;height:100%;overflow:auto}.game-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:2px solid #e0e0e0}.game-header h1{font-size:2rem;margin:0;color:#2c3e50}.game-header-spacer{flex:1}.round-info{font-size:1.25rem;font-weight:600;display:flex;flex-direction:column;align-items:flex-end}.round-number{border-bottom:2px solid #e0e0e0}.phase-indicator{font-size:.875rem;padding:.25rem 0;margin-top:.05rem}.round-stats{display:flex;gap:1rem}.round-total{flex:0 0 calc(50% - .5rem);overflow:hidden;background-color:#f8f9fa;border-radius:8px;padding:1.5rem;text-align:center;box-shadow:0 2px 4px #0000001a}.round-total h2{margin-top:0;color:#2c3e50}.total-value{font-size:3rem;font-weight:700;color:#2c3e50}.current-player{flex:0 0 calc(50% - .5rem);overflow:hidden;background-color:#f8f9fa;border-radius:8px;padding:1.5rem;text-align:center;box-shadow:0 2px 4px #0000001a}.current-player h2{margin-top:0;margin-bottom:.5rem;color:#2c3e50}.current-player-name{font-size:2rem;font-weight:600;margin-top:1rem}.player-name{font-size:2rem;font-weight:600}.score-table{background-color:#f8f9fa;border-radius:8px;padding:1.5rem;box-shadow:0 2px 4px #0000001a;overflow-y:auto}.score-table table{width:100%;border-collapse:collapse}.score-table th,.score-table td{padding:.75rem;text-align:left;border-bottom:1px solid #e0e0e0;width:20%}.score-table th{font-weight:600;color:#7f8c8d}.score-table .player-name-col,.score-table .player-score-col{width:30%}.player-score-col span{color:#777}.banked-status,.active-status{display:inline-block;padding:.5rem;font-size:.875rem;font-weight:600}.bank-button{background-color:#2ecc71;color:#fff;border:none;border-radius:4px;padding:.5rem .75rem;font-size:.875rem;font-weight:600;cursor:pointer;transition:background-color .2s}.bank-button:hover{background-color:#27ae60}.dice-controls{background-color:#f8f9fa;border-radius:8px;padding:1.5rem;box-shadow:0 2px 4px #0000001a}.dice-buttons{display:flex;flex-wrap:wrap;gap:.5rem}.dice-button{width:3rem;height:3.6rem;display:flex;align-items:center;justify-content:center;font-size:1.25rem;font-weight:600;background-color:#fff;border:2px solid #bdc3c7;border-radius:8px;cursor:pointer;transition:all .2s;flex:0 0 calc(25% - 7px)}.dice-button:hover{border-color:#3498db}.dice-button.selected{background-color:#3498db;color:#fff;border-color:#3498db}.dice-button.disabled{background-color:#bdc3c7;color:#95a5a6;border-color:#bdc3c7;cursor:not-allowed}.roll-button{background-color:#e74c3c;color:#fff;border:none;border-radius:4px;padding:.75rem 1rem;font-size:1rem;font-weight:600;cursor:pointer;transition:background-color .2s;width:100%}.roll-button:hover{background-color:#c0392b}.roll-button:disabled{background-color:#95a5a6;cursor:not-allowed}.game-controls{display:flex;gap:1rem;justify-content:space-between}.players-button{background-color:#3498db;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;margin-right:1rem}.players-button:hover{background-color:#2980b9}.undo-button{border:none;border-radius:4px;font-size:1rem;font-weight:600;cursor:pointer;transition:background-color .2s;margin-right:1rem}.undo-button svg{display:block;margin:auto}.alert{position:fixed;bottom:2rem;left:50%;transform:translate(-50%);padding:1rem 2rem;border-radius:4px;font-weight:600;box-shadow:0 4px 6px #0000001a;z-index:1000;animation:fadeIn .3s,fadeOut .3s 2.7s}.alert-info{background-color:#3498db;color:#fff}.alert-warning{background-color:#e74c3c;color:#fff}.alert-success{background-color:#2ecc71;color:#fff}@keyframes fadeIn{0%{opacity:0;transform:translate(-50%,1rem)}to{opacity:1;transform:translate(-50%)}}@keyframes fadeOut{0%{opacity:1;transform:translate(-50%)}to{opacity:0;transform:translate(-50%,1rem)}}@media (max-width: 768px){.game-screen{padding:1rem}.dice-buttons{justify-content:center}.game-controls{flex-direction:column}}.modal-overlay{position:fixed;inset:0;background-color:#000000b3;display:flex;justify-content:center;align-items:center;z-index:1000}.player-modal{background-color:#fff;border-radius:8px;padding:1.5rem;width:90%;max-width:500px;box-shadow:0 4px 8px #0003;max-height:90vh;overflow-y:auto}.player-modal h3{margin-top:0;color:#2c3e50;text-align:center;margin-bottom:1.5rem}.player-modal h5{margin-top:1rem;margin-bottom:.5rem;color:#34495e}.modal-section{margin-bottom:1.5rem;padding:1rem;background-color:#f8f9fa;border-radius:6px}.modal-section h4{margin-top:0;color:#34495e;margin-bottom:.75rem}.input-group{display:flex;gap:.5rem;margin-bottom:.5rem}.player-input{flex:1;padding:.75rem;border:1px solid #ddd;border-radius:4px;font-size:1rem}.add-player-btn{background-color:#3498db;color:#fff;border:none;border-radius:4px;padding:.75rem 1rem;cursor:pointer;font-weight:600;transition:background-color .2s}.add-player-btn:hover{background-color:#2980b9}.save-changes-btn{background-color:#3498db;color:#fff;border:none;border-radius:4px;padding:.75rem 1rem;cursor:pointer;font-weight:600;transition:background-color .2s;width:100%;margin-top:1rem}.save-changes-btn:hover{background-color:#2980b9}.restart-game-button-modal{background-color:#f39c12;color:#fff;border:none;border-radius:4px;padding:1rem;font-weight:600;cursor:pointer;transition:background-color .2s;flex:1}.restart-game-button-modal:hover{background-color:#e67e22}.return-setup-btn{background-color:#f39c12;color:#fff;border:none;border-radius:4px;padding:1rem;cursor:pointer;font-weight:600;transition:background-color .2s;width:100%}.return-setup-btn:hover{background-color:#e67e22}.close-modal-btn{background-color:#95a5a6;color:#fff;border:none;border-radius:4px;padding:1rem;cursor:pointer;font-weight:600;transition:background-color .2s;width:100%;margin-top:1rem}.close-modal-btn:hover{background-color:#7f8c8d}.error-message{color:#e74c3c;background-color:#fadbd8;padding:.5rem;border-radius:4px;font-weight:600;margin-top:.5rem}.player-list-container{margin-top:1rem}.player-list{list-style:none;padding:0;margin:0}.player-list-item{padding:.75rem;text-align:left;border-bottom:1px solid #e0e0e0;display:flex;justify-content:space-between;align-items:center;background-color:#fff;border-radius:4px;margin-bottom:.5rem;box-shadow:0 1px 3px #0000001a;transition:background-color .2s,box-shadow .2s}.player-list-item:hover{background-color:#f5f5f5;box-shadow:0 2px 5px #00000026}.player-list-item.dragging{background-color:#e8f4fc;box-shadow:0 5px 15px #0003;opacity:.9;z-index:10}.drag-handle{cursor:grab;color:#95a5a6;margin-right:.75rem;font-size:1.25rem;-webkit-user-select:none;user-select:none;padding:.5rem .75rem;border-radius:4px;transition:background-color .2s;touch-action:none}.drag-handle:hover{background-color:#ecf0f1;color:#34495e}.player-name{flex:1}.remove-player-btn{background-color:#e74c3c;color:#fff;border:none;border-radius:50%;width:30px;height:30px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.875rem;transition:background-color .2s;line-height:1;position:relative;z-index:10;margin-left:8px;touch-action:manipulation}.button-container{position:relative;z-index:20}.remove-player-btn:hover{background-color:#c0392b}.modal-actions{display:flex;flex-direction:column;gap:1rem}.end-game-screen{max-width:800px;margin:0 auto;padding:2rem;display:flex;flex-direction:column;gap:2rem}.end-game-screen h1{font-size:3rem;text-align:center;margin-bottom:1rem;color:#2c3e50}.winner-section{background-color:#f8f9fa;border-radius:8px;padding:2rem;text-align:center;box-shadow:0 2px 4px #0000001a;border:2px solid #f1c40f}.winner-section h2{font-size:2rem;margin-top:0;margin-bottom:1rem;color:#2c3e50}.winners-list{display:flex;flex-direction:column;gap:.5rem;margin-bottom:1.5rem}.winner-name{font-size:1.5rem;font-weight:600;color:#e74c3c}.winner-score{font-size:1.5rem;font-weight:600;color:#2c3e50;margin-top:1rem}.final-scores{background-color:#f8f9fa;border-radius:8px;padding:1.5rem;box-shadow:0 2px 4px #0000001a}.final-scores h3{margin-top:0;margin-bottom:1rem;color:#2c3e50;font-size:1.5rem}.final-scores table{width:100%;border-collapse:collapse}.final-scores th,.final-scores td{padding:.75rem;text-align:left;border-bottom:1px solid #e0e0e0}.final-scores th{font-weight:600;color:#7f8c8d}.winner-row{background-color:#fcf3cf;font-weight:600}.game-stats{background-color:#f8f9fa;border-radius:8px;padding:1.5rem;box-shadow:0 2px 4px #0000001a}.game-stats h3{margin-top:0;margin-bottom:1rem;color:#2c3e50;font-size:1.5rem}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1.5rem;margin-bottom:1.5rem}.stat-box{background-color:#fff;border-radius:6px;padding:1rem;box-shadow:0 1px 3px #0000000d}.stat-box.full-width{grid-column:1 / -1}.stat-box.full-width+.stat-box.full-width{margin-top:1.5rem}.stat-box h4{margin-top:0;margin-bottom:.75rem;color:#34495e;border-bottom:2px solid #ecf0f1;padding-bottom:.5rem}.stat-item{display:flex;justify-content:space-between;padding:.5rem 0;border-bottom:1px solid #e0e0e0}.stat-item:last-child{border-bottom:none}.stat-label{font-weight:600;color:#7f8c8d}.stat-value{font-weight:600;color:#2c3e50}.top-rounds-list,.bad-sevens-list,.points-lost-list{margin:0;padding-left:1.5rem;color:#2c3e50}.top-rounds-list li,.bad-sevens-list li,.points-lost-list li{margin-bottom:.5rem}.round-player{font-weight:600;margin-right:.5rem}.round-amount{color:#e67e22;font-weight:600}.no-stats{color:#95a5a6;font-style:italic;text-align:center;padding:1rem 0}.dice-chart{display:flex;justify-content:space-between;align-items:flex-end;height:150px;padding-top:20px;border-bottom:1px solid #bdc3c7}.dice-bar-container{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;width:8%}.dice-count{font-size:.8rem;color:#7f8c8d;margin-bottom:4px}.dice-bar{width:100%;background-color:#3498db;border-radius:4px 4px 0 0;min-height:2px;transition:height .3s ease}.dice-value{margin-top:8px;font-weight:700;color:#34495e}.scores-chart-container{padding:1rem 2rem 2rem 3rem;box-sizing:border-box}.end-game-buttons{display:flex;gap:1rem;justify-content:center}.restart-game-button{background-color:#3498db;color:#fff;border:none;border-radius:4px;padding:1rem;font-size:1.25rem;font-weight:600;cursor:pointer;transition:background-color .2s;flex:1}.restart-game-button:hover{background-color:#2980b9}.new-game-button{background-color:#2ecc71;color:#fff;border:none;border-radius:4px;padding:1rem;font-size:1.25rem;font-weight:600;cursor:pointer;transition:background-color .2s;flex:1}.new-game-button:hover{background-color:#27ae60}.undo-button{background-color:#3498db;color:#fff;border:none;border-radius:4px;font-size:1.25rem;font-weight:600;cursor:pointer;transition:background-color .2s}.undo-button:hover{background-color:#2980b9}@media (max-width: 768px){.end-game-screen{padding:1rem}.end-game-screen h1{font-size:2.5rem}.winner-section{padding:1.5rem}.winner-section h2{font-size:1.75rem}}
