*{margin:0;padding:0;box-sizing:border-box}body{font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;background:linear-gradient(135deg,#ffd4a3,#ffb88c,#ffa07a);min-height:100vh;display:flex;justify-content:center;align-items:flex-start;padding-top:0}@media (max-width: 600px){#app{padding:0}}#app{width:100%;max-width:1200px;padding:20px}.game-container{display:flex;gap:30px;justify-content:center;align-items:flex-start;margin-top:20px}#game-canvas{background:#fff;border-radius:8px;box-shadow:0 10px 30px #0000004d;cursor:pointer;width:100%;max-width:500px;aspect-ratio:500 / 550;display:block;margin:0 auto}.control-panel{background:#fff;border-radius:8px;padding:20px;max-height:80vh;overflow-y:auto;position:sticky;top:20px;box-shadow:0 10px 30px #0000004d;width:280px;min-width:280px;display:block}.tile-config{margin-bottom:20px}.tile-config h3{color:#333;margin-bottom:15px;font-size:1.2rem}.config-grid{display:flex;flex-direction:column;gap:12px;margin-bottom:15px}.config-item{display:flex;justify-content:space-between;align-items:center}.config-item label{color:#666;font-size:.95rem;flex:1}.config-item input[type=number]{width:60px;padding:5px 10px;border:1px solid #ddd;border-radius:4px;font-size:1rem;text-align:center}.config-item input[type=number]:focus{outline:none;border-color:#667eea}.config-info{text-align:center;color:#666;margin-bottom:15px;padding:10px;background:#f8f8f8;border-radius:4px}#total-tiles{font-weight:700;color:#333}#regenerate-btn{width:100%}.round-control{margin-top:30px;padding-top:20px;border-top:2px solid #e0e0e0}.round-control h3{color:#333;margin-bottom:15px;font-size:1.2rem}.round-info{display:flex;flex-direction:column;gap:10px;margin-bottom:15px;padding:15px;background:#f8f8f8;border-radius:6px}.round-status,.replacement-info{color:#666;font-size:.95rem}#current-round,#remaining-tiles{font-weight:700;color:#667eea}#advance-round-btn{width:100%}.game-info{margin-bottom:20px;padding-bottom:20px;border-bottom:2px solid #e0e0e0}.current-player,.turn-count{font-size:1.1rem;margin-bottom:10px;color:#333}.current-player span,.turn-count span{font-weight:700;color:#667eea}.game-controls{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.btn{padding:12px 24px;border:none;border-radius:6px;font-size:1rem;font-weight:600;cursor:pointer;transition:all .3s ease}.btn-primary{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.btn-primary:hover{transform:translateY(-2px);box-shadow:0 5px 15px #667eea66}.btn-secondary{background:#f0f0f0;color:#333}.btn-secondary:hover{background:#e0e0e0}.score-board{background:#f8f8f8;border-radius:6px;padding:15px}.score-board h3{color:#333;margin-bottom:15px;font-size:1.2rem}.scores{display:flex;flex-direction:column;gap:10px}.player-score{display:flex;justify-content:space-between;align-items:center;padding:10px;background:#fff;border-radius:4px}.player-name{color:#666;font-weight:500}.score{font-size:1.5rem;font-weight:700;color:#667eea}@media (max-width: 768px){.game-container{flex-direction:column;align-items:center}#game-canvas{max-width:100%}.control-panel{width:100%;max-width:400px}}.rule-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#0009;display:flex;align-items:center;justify-content:center;z-index:2000;animation:fadeIn .2s ease;padding:20px;box-sizing:border-box}.rule-modal-content{background:#fff;border-radius:16px;max-width:500px;width:100%;max-height:85vh;overflow-y:auto;position:relative;animation:slideUp .3s ease;box-shadow:0 20px 60px #0000004d}.rule-modal-close{position:absolute;top:12px;right:12px;background:none;border:none;font-size:28px;cursor:pointer;color:#999;width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:all .2s ease;line-height:1}.rule-modal-close:hover{background:#f0f0f0;color:#333}.rule-modal-title{text-align:center;font-size:1.5em;color:#333;padding:20px 20px 0;margin:0}.rule-modal-body{padding:20px}.rule-section{margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid #eee}.rule-section:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.rule-section h3{font-size:1.1em;color:#333;margin:0 0 10px}.rule-section p{color:#555;line-height:1.6;margin:0 0 8px;font-size:.95em}.pattern-display{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin:12px 0;padding:12px;background:#f8f8f8;border-radius:8px}.pattern-text{padding:6px 10px;border-radius:6px;font-weight:700;font-size:.9em}.pattern-text.chim{background:#ffe4e1;color:#dc143c}.pattern-text.don{background:#e6f3ff;color:#1e90ff}.rule-list{margin:0;padding-left:20px;color:#555;font-size:.95em}.rule-list li{margin-bottom:8px;line-height:1.5}.rule-list li:last-child{margin-bottom:0}.rule-list.special{background:#fff9e6;border-radius:8px;padding:12px 12px 12px 32px;margin-top:10px}.rule-list.warning{background:#fff5f5;border-radius:8px;padding:12px 12px 12px 32px}.rule-note{font-size:.9em!important;color:#777!important;background:#f5f5f5;padding:8px 12px;border-radius:6px;margin-top:10px!important}.tunnel-diagram{display:flex;justify-content:center;align-items:center;gap:24px;margin:12px 0;padding:16px;background:#f0f4ff;border-radius:8px}.tunnel-hex-grid{position:relative;width:100px;height:170px}.tunnel-tile.a{position:absolute;top:0;left:50%;transform:translate(-50%)}.tunnel-tile.f{position:absolute;top:34px;left:0}.tunnel-tile.b{position:absolute;top:34px;right:0}.tunnel-tile.center{position:absolute;top:68px;left:50%;transform:translate(-50%)}.tunnel-tile.e{position:absolute;top:102px;left:0}.tunnel-tile.c{position:absolute;top:102px;right:0}.tunnel-tile.d{position:absolute;top:136px;left:50%;transform:translate(-50%)}.tunnel-tile{width:32px;height:32px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.85em}.tunnel-tile.center{background:#e0e0e0;color:#666;border:2px solid #bbb}.tunnel-tile.spacer{background:transparent;border:none}.tunnel-tile.a,.tunnel-tile.d{background:#ffe4e1;color:#dc143c;border:2px solid #DC143C}.tunnel-tile.b,.tunnel-tile.e{background:#e6f3ff;color:#1e90ff;border:2px solid #1E90FF}.tunnel-tile.c,.tunnel-tile.f{background:#e8f5e9;color:#4caf50;border:2px solid #4CAF50}.tunnel-pairs{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:.9em}.tunnel-pair{display:flex;align-items:center;gap:6px}.pair-a,.pair-d{color:#dc143c}.pair-b,.pair-e{color:#1e90ff}.pair-c,.pair-f{color:#4caf50}.rule-modal-button{display:block;width:calc(100% - 40px);margin:0 20px 20px;padding:14px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:10px;font-size:1.1em;font-weight:600;cursor:pointer;transition:all .3s ease}.rule-modal-button:hover{transform:translateY(-2px);box-shadow:0 6px 20px #764ba266}.rule-button-container{display:flex;justify-content:center;margin-bottom:15px}.rule-button{background:#fff;color:#667eea;border:2px solid #667eea;border-radius:25px;padding:10px 24px;font-size:1em;font-weight:600;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;gap:8px;box-shadow:0 2px 8px #0000001a}.rule-button:hover{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border-color:transparent;transform:translateY(-2px);box-shadow:0 4px 15px #764ba24d}@media (max-width: 600px){.rule-modal-overlay{padding:10px}.rule-modal-content{max-height:90vh;border-radius:12px}.rule-modal-title{font-size:1.3em;padding:16px 16px 0}.rule-modal-body{padding:16px}.rule-section h3{font-size:1em}.pattern-display{gap:4px;padding:10px}.pattern-text{padding:4px 8px;font-size:.85em}.rule-modal-button{width:calc(100% - 32px);margin:0 16px 16px;padding:12px}.rule-button{padding:8px 20px;font-size:.95em}}.login-screen{position:fixed;top:0;left:0;width:100%;height:100%;background:linear-gradient(135deg,#667eea,#764ba2);display:flex;align-items:center;justify-content:center;z-index:1000;animation:fadeIn .3s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.login-card{background:#fff;border-radius:20px;padding:40px;max-width:400px;width:90%;box-shadow:0 20px 60px #0000004d;text-align:center;animation:slideUp .4s ease}@keyframes slideUp{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.login-card h1{font-size:2.5em;color:#333;margin:0 0 10px;font-weight:700}.login-subtitle{color:#666;font-size:1.1em;margin-bottom:30px}.login-buttons{display:flex;flex-direction:column;gap:15px;margin:30px 0}.nickname-section{display:flex;flex-direction:column;gap:10px}.nickname-input{width:100%;padding:12px 15px;border:2px solid #ddd;border-radius:10px;font-size:1em;transition:all .3s ease;box-sizing:border-box}.nickname-input:focus{outline:none;border-color:#42a5f5;box-shadow:0 0 0 3px #42a5f51a}.nickname-input::placeholder{color:#999}.login-button{display:flex;align-items:center;justify-content:center;gap:10px;padding:15px 20px;border:none;border-radius:10px;font-size:1.1em;font-weight:600;cursor:pointer;transition:all .3s ease;position:relative;overflow:hidden}.login-button:disabled{opacity:.7;cursor:not-allowed}.login-button.anonymous{background:linear-gradient(135deg,#42a5f5,#1976d2);color:#fff}.login-button.anonymous:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 6px 20px #1976d266}.login-button.google{background:#fff;color:#333;border:2px solid #ddd}.login-button.google:hover:not(:disabled){border-color:#4285f4;box-shadow:0 6px 20px #4285f44d;transform:translateY(-2px)}.login-button.twitter{background:#000;color:#fff;border:2px solid #000000}.login-button.twitter:hover:not(:disabled){background:#1a1a1a;box-shadow:0 6px 20px #0006;transform:translateY(-2px)}.button-icon{font-size:1.3em;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px}.login-button.google .button-icon{background:conic-gradient(from 0deg,#4285f4,#34a853,#fbbc04,#ea4335,#4285f4);-webkit-background-clip:text;background-clip:text;color:transparent;font-weight:700}.login-info{margin-top:30px;padding-top:20px;border-top:1px solid #eee}.login-info p{margin:8px 0;color:#666;font-size:.9em;line-height:1.5}.skip-login{margin-top:20px;padding-top:15px;border-top:1px solid #eee}.skip-button{background:none;color:#999;border:none;padding:10px;font-size:.95em;cursor:pointer;text-decoration:underline;transition:all .2s ease;width:100%}.skip-button:hover{color:#666;text-decoration-thickness:2px}.login-error{background:#ffebee;color:#c62828;padding:12px;border-radius:8px;margin-top:20px;font-size:.95em;animation:shake .5s ease}@keyframes shake{0%,to{transform:translate(0)}25%{transform:translate(-5px)}75%{transform:translate(5px)}}.loading{display:inline-block;animation:pulse 1.5s infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.6}}.user-profile-display{position:fixed;top:10px;right:10px;background:#fff;border-radius:12px;padding:12px 16px;box-shadow:0 4px 12px #00000026;z-index:100;min-width:250px;animation:slideIn .3s ease}@keyframes slideIn{0%{transform:translate(20px);opacity:0}to{transform:translate(0);opacity:1}}.user-info{display:flex;align-items:center;gap:8px;padding-bottom:10px;border-bottom:1px solid #eee;margin-bottom:10px}.user-icon{font-size:1.4em}.user-name{flex:1;font-weight:600;color:#333;font-size:.95em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upgrade-button,.logout-button{padding:4px 10px;border:none;border-radius:6px;font-size:.85em;cursor:pointer;transition:all .2s ease;font-weight:600}.upgrade-button{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.upgrade-button:hover{transform:translateY(-1px);box-shadow:0 3px 8px #764ba24d}.logout-button{background:#f5f5f5;color:#666}.logout-button:hover{background:#e0e0e0;color:#333}.user-stats{display:flex;flex-direction:column;gap:6px}.stat-item{display:flex;justify-content:space-between;font-size:.9em}.stat-label{color:#666}.stat-value{font-weight:600;color:#333}.login-prompt-button{position:fixed;top:10px;right:10px;background:linear-gradient(135deg,#42a5f5,#1976d2);color:#fff;border:none;border-radius:10px;padding:10px 20px;font-size:.95em;font-weight:600;cursor:pointer;box-shadow:0 4px 12px #1976d24d;transition:all .3s ease;z-index:100;animation:slideIn .3s ease}.login-prompt-button:hover{transform:translateY(-2px);box-shadow:0 6px 20px #1976d266}.login-prompt-toast{position:fixed;bottom:30px;left:50%;transform:translate(-50%);background:#fff;border-radius:12px;box-shadow:0 6px 20px #0003;padding:20px 30px;display:flex;align-items:center;gap:20px;z-index:1000;animation:slideUpFade .3s ease}.login-prompt-toast p{margin:0;font-size:1em;color:#333;font-weight:500}.login-prompt-toast button{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:8px;padding:8px 20px;font-size:.95em;font-weight:600;cursor:pointer;transition:all .2s ease}.login-prompt-toast button:hover{transform:scale(1.05);box-shadow:0 4px 12px #764ba24d}@keyframes slideUpFade{0%{opacity:0;transform:translate(-50%) translateY(20px)}to{opacity:1;transform:translate(-50%) translateY(0)}}@media (max-width: 600px){.user-profile-display{top:5px;right:5px;min-width:auto;padding:10px 12px}.user-name{max-width:100px}.login-card{padding:30px 20px}.login-card h1{font-size:2em}}.ranking-display{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;border-radius:20px;box-shadow:0 10px 40px #0003;width:90%;max-width:600px;max-height:80vh;overflow:hidden;z-index:500;display:none;animation:slideUpFade .3s ease}@keyframes slideUpFade{0%{opacity:0;transform:translate(-50%,-45%)}to{opacity:1;transform:translate(-50%,-50%)}}.ranking-header{display:flex;justify-content:space-between;align-items:center;padding:20px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.ranking-header h2{margin:0;font-size:1.5em;font-weight:700}.close-ranking{background:#fff3;border:none;color:#fff;font-size:1.5em;width:35px;height:35px;border-radius:50%;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;line-height:1}.close-ranking:hover{background:#ffffff4d;transform:scale(1.1)}.ranking-tabs{display:flex;border-bottom:1px solid #eee;background:#f8f8f8}.ranking-tab{flex:1;padding:15px;background:none;border:none;font-size:1em;font-weight:600;color:#666;cursor:pointer;transition:all .2s ease;position:relative}.ranking-tab:hover{background:#677eea0d}.ranking-tab.active{color:#667eea;background:#fff}.ranking-tab.active:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:3px;background:linear-gradient(90deg,#667eea,#764ba2)}.ranking-list{max-height:calc(80vh - 180px);overflow-y:auto;padding:20px}.ranking-list::-webkit-scrollbar{width:8px}.ranking-list::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.ranking-list::-webkit-scrollbar-thumb{background:#ccc;border-radius:10px}.ranking-list::-webkit-scrollbar-thumb:hover{background:#999}.loading{text-align:center;padding:40px;color:#999;font-size:1.1em;animation:pulse 1.5s infinite}.no-results,.error{text-align:center;padding:40px;color:#999;font-size:1.1em}.error{color:#f44336}.ranking-items{display:flex;flex-direction:column;gap:10px}.ranking-item{display:flex;align-items:center;padding:12px 16px;background:#f8f8f8;border-radius:12px;transition:all .2s ease}.ranking-item:hover{background:#f0f0f0;transform:translate(4px)}.ranking-item.rank-1{background:linear-gradient(135deg,gold,#ffed4e)}.ranking-item.rank-2{background:linear-gradient(135deg,silver,#d7d7d7)}.ranking-item.rank-3{background:linear-gradient(135deg,#cd7f32,#e5a866)}.rank-number{width:40px;font-size:1.2em;font-weight:700;text-align:center;color:#333}.rank-name{flex:1;font-weight:600;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 12px}.rank-time{font-weight:700;color:#667eea;font-size:1.1em;min-width:80px;text-align:right}.ranking-button{position:fixed;bottom:20px;right:20px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:50%;width:60px;height:60px;font-size:1.8em;cursor:pointer;box-shadow:0 4px 12px #764ba24d;transition:all .3s ease;z-index:90}.ranking-button:hover{transform:scale(1.1);box-shadow:0 6px 20px #764ba266}.ranking-button:active{transform:scale(.95)}@media (max-width: 600px){.ranking-display{width:95%;max-height:90vh}.ranking-list{max-height:calc(90vh - 180px)}.ranking-item{padding:10px 12px}.rank-name{font-size:.95em}.rank-time{font-size:1em;min-width:70px}}.inline-ranking{max-width:800px;margin:30px auto;background:#fff;border-radius:12px;box-shadow:0 2px 8px #00000014;overflow:hidden}.inline-ranking-header{padding:24px 24px 0;background:#fff}.inline-ranking-header h2{margin:0 0 20px;font-size:1.5em;color:#333;font-weight:600}.inline-ranking .ranking-tabs{display:flex;gap:0;border-bottom:2px solid #e5e7eb;margin:0 -24px;padding:0 24px}.inline-ranking .ranking-tab{padding:12px 24px;background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;color:#6b7280;font-size:.95em;font-weight:500;cursor:pointer;transition:all .2s ease;position:relative}.inline-ranking .ranking-tab:hover{color:#374151;background:#00000005}.inline-ranking .ranking-tab.active{color:#667eea;border-bottom-color:#667eea;font-weight:600;background:none;box-shadow:none}.inline-ranking .ranking-tab.active:after{content:"";position:absolute;bottom:-2px;left:0;right:0;height:2px;background:#667eea}.inline-ranking-content{padding:24px}.ranking-stats{display:flex;gap:40px;padding:20px;background:#f9fafb;border-radius:8px;margin-bottom:24px;justify-content:center;border:1px solid #e5e7eb}.ranking-stats .stat{display:flex;align-items:center;gap:8px}.ranking-stats .stat-label{color:#6b7280;font-size:.9em;font-weight:500}.ranking-stats .stat-value{font-size:1.25em;font-weight:700;color:#111827}.inline-ranking-list{max-height:400px;overflow-y:auto}.inline-ranking-list::-webkit-scrollbar{width:8px}.inline-ranking-list::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.inline-ranking-list::-webkit-scrollbar-thumb{background:#ccc;border-radius:10px}.inline-ranking-list::-webkit-scrollbar-thumb:hover{background:#999}.inline-ranking-items{display:flex;flex-direction:column;gap:4px}.inline-ranking-item{display:flex;align-items:center;padding:12px 16px;background:#fff;border:1px solid #e5e7eb;border-radius:8px;transition:all .15s ease}.inline-ranking-item:hover{background:#f9fafb;border-color:#d1d5db;box-shadow:0 1px 3px #0000000d}.inline-ranking-item.rank-1{background:linear-gradient(135deg,#fffbeb,#fef3c7);border:1px solid #fbbf24}.inline-ranking-item.rank-2{background:linear-gradient(135deg,#f3f4f6,#e5e7eb);border:1px solid #9ca3af}.inline-ranking-item.rank-3{background:linear-gradient(135deg,#fed7aa,#fdba74);border:1px solid #fb923c}.inline-ranking .rank-number{width:35px;font-size:1.1em;font-weight:600;text-align:center;color:#374151}.inline-ranking .rank-name{flex:1;font-weight:500;color:#111827;font-size:.95em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 12px}.inline-ranking .rank-time{font-weight:600;color:#667eea;font-size:1em;min-width:70px;text-align:right}.inline-ranking .loading,.inline-ranking .no-results,.inline-ranking .error{text-align:center;padding:30px;color:#999;font-size:1em}.inline-ranking .error{color:#f44336}@media (max-width: 600px){.inline-ranking{margin:20px 10px}.inline-ranking-header{flex-direction:column;gap:15px;text-align:center}.ranking-stats{flex-direction:column;gap:10px}.inline-ranking-item{padding:8px 10px}}.mode-selection{max-width:900px;margin:40px auto;padding:20px}.mode-header{text-align:center;margin-bottom:40px}.mode-header h1{font-size:2.5em;font-weight:700;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;margin:0 0 10px}.mode-header .subtitle{font-size:1.2em;color:#6b7280;margin:0 0 10px}.login-status{display:inline-block;padding:6px 12px;background:#f3f4f6;border-radius:20px;font-size:.9em;color:#4b5563;margin-top:10px}.mode-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(350px,1fr));gap:30px;margin-bottom:30px}.mode-card{background:#fff;border-radius:16px;box-shadow:0 4px 12px #00000014;padding:30px;cursor:pointer;transition:all .3s ease;position:relative;overflow:hidden}.mode-card:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,#667eea,#764ba2)}.mode-card.single:before{background:linear-gradient(90deg,#10b981,#34d399)}.mode-card.multi:before{background:linear-gradient(90deg,#667eea,#764ba2)}.mode-card:hover{transform:translateY(-4px);box-shadow:0 8px 24px #0000001f}.mode-icon{font-size:3em;margin-bottom:20px;display:flex;justify-content:center}.mode-card h2{font-size:1.5em;font-weight:600;margin:0 0 15px;color:#111827}.mode-description{color:#6b7280;line-height:1.6;margin:0 0 20px}.mode-features{list-style:none;padding:0;margin:0 0 25px}.mode-features li{padding:8px 0;color:#4b5563;font-size:.95em;display:flex;align-items:center;gap:8px}.mode-button{width:100%;padding:12px 24px;border:none;border-radius:8px;font-size:1.1em;font-weight:600;color:#fff;cursor:pointer;transition:all .2s ease}.single .mode-button{background:linear-gradient(135deg,#10b981,#34d399)}.single .mode-button:hover{background:linear-gradient(135deg,#059669,#10b981)}.multi .mode-button{background:linear-gradient(135deg,#667eea,#764ba2)}.multi .mode-button:hover{background:linear-gradient(135deg,#5a67d8,#6b46c1)}.mode-info{text-align:center}.login-prompt{background:#fef3c7;border:1px solid #fbbf24;border-radius:12px;padding:20px;display:inline-block}.login-prompt p{margin:0 0 15px;color:#78350f;font-size:.95em}.btn-login{padding:10px 24px;background:#fbbf24;color:#78350f;border:none;border-radius:6px;font-weight:600;cursor:pointer;transition:all .2s ease}.btn-login:hover{background:#f59e0b;transform:translateY(-1px)}@media (max-width: 768px){.mode-selection{padding:15px}.mode-header h1{font-size:2em}.mode-cards{grid-template-columns:1fr;gap:20px}.mode-card{padding:20px}.mode-icon{font-size:2.5em}}.multiplayer-lobby{max-width:900px;margin:30px auto;background:#fff;border-radius:12px;box-shadow:0 2px 8px #00000014;overflow:hidden}.lobby-header{display:flex;justify-content:space-between;align-items:center;padding:24px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.lobby-header h2{margin:0;font-size:1.5em;font-weight:600}.lobby-actions{display:flex;gap:12px}.btn-primary,.btn-secondary{padding:10px 20px;border:none;border-radius:6px;font-size:.95em;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:8px}.btn-primary{background:#fff;color:#667eea}.btn-primary:hover{background:#f0f0ff;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.btn-secondary{background:#fff3;color:#fff}.btn-secondary:hover{background:#ffffff4d}.room-list-container{padding:24px}.room-list-header{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:16px;padding:12px 16px;background:#f8f8f8;border-radius:8px;font-size:.9em;font-weight:600;color:#666;margin-bottom:12px}.room-list{display:flex;flex-direction:column;gap:8px}.room-item{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:16px;padding:16px;background:#fff;border:1px solid #e5e7eb;border-radius:8px;transition:all .2s ease}.room-item:hover{background:#f9fafb;border-color:#d1d5db;box-shadow:0 1px 3px #0000000d}.room-host{font-weight:500;color:#111827}.room-players{display:flex;align-items:center}.player-count{padding:4px 8px;background:#e5e7eb;border-radius:4px;font-size:.9em;font-weight:600}.room-status{display:flex;align-items:center;font-size:.9em;font-weight:500}.status-waiting{color:#10b981}.status-starting{color:#f59e0b}.btn-join{padding:6px 16px;background:#667eea;color:#fff;border:none;border-radius:6px;font-size:.9em;font-weight:500;cursor:pointer;transition:all .2s ease}.btn-join:hover{background:#5a67d8;transform:translateY(-1px)}.room-full{color:#9ca3af;font-size:.9em}.no-rooms{text-align:center;padding:60px 20px;color:#6b7280}.no-rooms p{margin:0 0 8px}.no-rooms .hint{color:#9ca3af;font-size:.9em}.lobby-info{padding:20px 24px;background:#f9fafb;border-top:1px solid #e5e7eb}.lobby-info p{margin:8px 0;color:#6b7280;font-size:.9em;display:flex;align-items:center;gap:8px}.multiplayer-room{max-width:900px;margin:30px auto;background:#fff;border-radius:12px;box-shadow:0 2px 8px #00000014;overflow:hidden}.room-header{display:flex;justify-content:space-between;align-items:center;padding:24px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.room-header h2{margin:0;font-size:1.5em;font-weight:600}.room-id{padding:8px 16px;background:#fff3;border-radius:6px;font-family:monospace;font-size:1.1em;font-weight:600}.players-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;padding:24px}.player-card{padding:16px;background:#f9fafb;border:2px solid #e5e7eb;border-radius:8px;text-align:center;transition:all .2s ease}.player-card.ready{border-color:#10b981;background:#ecfdf5}.player-card.playing{border-color:#667eea;background:#ede9fe}.player-card.finished{border-color:#fbbf24;background:#fef3c7}.player-number{font-size:1.2em;font-weight:700;color:#667eea;margin-bottom:8px}.player-name{font-weight:500;color:#111827;margin-bottom:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-status-badge{margin-bottom:8px}.badge{display:inline-block;padding:4px 12px;border-radius:12px;font-size:.85em;font-weight:600}.badge-waiting{background:#e5e7eb;color:#6b7280}.badge-ready{background:#10b981;color:#fff}.badge-playing{background:#667eea;color:#fff}.badge-finished{background:#fbbf24;color:#78350f}.player-score,.player-time{margin-top:8px;font-size:.9em;font-weight:600;color:#4b5563}.room-controls{display:flex;justify-content:center;gap:12px;padding:24px;border-top:1px solid #e5e7eb}.btn-ready,.btn-start,.btn-leave{padding:12px 24px;border:none;border-radius:6px;font-size:1em;font-weight:500;cursor:pointer;transition:all .2s ease}.btn-ready{background:#10b981;color:#fff}.btn-ready:hover{background:#059669}.btn-ready.ready{background:#f87171}.btn-ready.ready:hover{background:#ef4444}.btn-start{background:#667eea;color:#fff}.btn-start:hover:not(:disabled){background:#5a67d8}.btn-start:disabled{background:#9ca3af;cursor:not-allowed;opacity:.6}.btn-leave{background:#6b7280;color:#fff}.btn-leave:hover{background:#4b5563}.room-info{padding:20px 24px;background:#f9fafb}.room-info p{margin:8px 0;color:#6b7280;font-size:.9em;display:flex;align-items:center;gap:8px}.loading{text-align:center;padding:40px;color:#999;font-size:1em;animation:pulse 1.5s infinite}.error{text-align:center;padding:40px;color:#f44336;font-size:1em}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@media (max-width: 768px){.multiplayer-lobby,.multiplayer-room{margin:20px 10px}.lobby-header,.room-header{flex-direction:column;gap:16px;text-align:center}.lobby-actions{width:100%;justify-content:center}.room-list-header,.room-item{grid-template-columns:1fr;text-align:center}.room-list-header{display:none}.room-item>*{padding:4px 0}.players-grid{grid-template-columns:1fr}.room-controls{flex-direction:column}.btn-ready,.btn-start,.btn-leave{width:100%}}
