:root{--primary-color:#6366f1;--secondary-color:#818cf8;--background:#0f172a;--surface:#1e293b;--text:#f8fafc;--text-muted:#94a3b8;--border:#334155;--success:#22c55e;--warning:#eab308;--error:#ef4444}*{box-sizing:border-box;margin:0;padding:0}body{background:var(--background);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;line-height:1.5}.app{max-width:900px;margin:0 auto;padding:2rem}.app-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:2rem;display:flex}.app-header h1{color:var(--primary-color);margin:0}.auth-status{align-items:center;gap:1rem;display:flex}.auth-status.authenticated{background:var(--surface);border:1px solid var(--border);border-radius:50px;padding:.5rem 1rem}.auth-status-wrapper{align-items:center;gap:1rem;display:flex}.sdk-status{border:1px solid var(--border);background:var(--surface);cursor:help;border-radius:50px;align-items:center;gap:.5rem;padding:.375rem .75rem;font-size:.875rem;font-weight:500;transition:all .2s;display:inline-flex}.sdk-status:hover{background:var(--background)}.sdk-status-loading{color:var(--warning);border-color:var(--warning)}.sdk-status-offline{color:var(--text-muted);border-color:var(--border)}.sdk-status-connecting{color:var(--primary-color);border-color:var(--primary-color);animation:2s infinite pulse}.sdk-status-connected{color:var(--success);border-color:var(--success);background:#22c55e1a}@keyframes pulse{0%,to{opacity:1}50%{opacity:.6}}.user-avatar{object-fit:cover;border-radius:50%;width:32px;height:32px}.user-name{color:var(--text);font-weight:500}.discord-login-button{color:#fff;background:#5865f2;border-radius:8px;align-items:center;gap:.5rem;padding:.75rem 1.5rem;font-weight:500;transition:background .2s;display:flex}.discord-login-button:hover{background:#4752c4}.discord-login-button.discord-embedded-mode{background:linear-gradient(135deg,#5865f2 0%,#404eed 100%);border:2px solid gold;padding:.875rem 1.75rem;font-weight:600;box-shadow:0 0 15px #ffd7004d,0 4px 15px #5865f266}.discord-login-button.discord-embedded-mode:hover{background:linear-gradient(135deg,#4752c4 0%,#353aa8 100%);transform:translateY(-2px);box-shadow:0 0 20px #ffd70080,0 6px 20px #5865f280}.discord-login-button.discord-embedded-mode:before{content:"🎮";margin-right:.5rem;font-size:1.2rem}.discord-icon{flex-shrink:0}.logout-button{border:1px solid var(--border);color:var(--text-muted);background:0 0;padding:.5rem 1rem;font-size:.875rem}.logout-button:hover{background:var(--background);color:var(--text)}.auth-loading,.auth-error{color:var(--text-muted);font-size:.875rem}main{width:100%}.chat-container{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:1.5rem}.messages{max-height:60vh;margin-bottom:1rem;padding-right:.5rem;overflow-y:auto}.message{border:1px solid var(--border);background:#6366f11a;border-radius:8px;margin-bottom:.75rem;padding:.75rem}.message strong{color:var(--primary-color);text-transform:capitalize;margin-right:.5rem}.message.user{border-color:var(--success);background:#22c55e1a}.chat-form{gap:.5rem;margin-bottom:1rem;display:flex}.chat-input{border:1px solid var(--border);background:var(--background);color:var(--text);border-radius:8px;flex:1;padding:.75rem;font-size:1rem}.chat-input:focus{border-color:var(--primary-color);outline:none}button{background:var(--primary-color);color:#fff;cursor:pointer;border:none;border-radius:8px;padding:.75rem 1.5rem;font-size:1rem;transition:background .2s}button:hover:not(:disabled){background:var(--secondary-color)}button:disabled{opacity:.5;cursor:not-allowed}.clear-button{border:1px solid var(--border);color:var(--text-muted);background:0 0}.clear-button:hover{background:var(--background);color:var(--text)}.tool-approval{border:1px solid var(--warning);background:#eab3081a;border-radius:8px;margin-top:.5rem;padding:1rem}.tool-approval pre{background:var(--background);border-radius:4px;margin:.5rem 0;padding:.5rem;overflow-x:auto}details{background:var(--background);border-radius:8px;margin-top:.5rem;padding:.75rem}summary{cursor:pointer;color:var(--primary-color);font-weight:500}pre{font-size:.875rem;overflow-x:auto}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{background:var(--background)}::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}.auth-loading-container{background:var(--background);justify-content:center;align-items:center;min-height:100vh;display:flex}.auth-landing{background:var(--background);justify-content:center;align-items:center;min-height:100vh;padding:2rem;display:flex}.auth-landing-content{text-align:center;background:var(--surface);border:1px solid var(--border);border-radius:16px;max-width:600px;padding:3rem;box-shadow:0 20px 25px -5px #0000004d}.auth-landing-content h1{color:var(--primary-color);margin-bottom:1.5rem;font-size:2rem}.auth-description{color:var(--text-muted);margin-bottom:2rem;font-size:1.125rem;line-height:1.7}.auth-description.discord-mode{color:#5865f2;background:#5865f21a;border:1px solid #5865f2;border-radius:12px;padding:1.5rem}.auth-actions{margin-bottom:3rem}.auth-actions.discord-actions{justify-content:center;display:flex}.discord-auto-auth-badge{background:linear-gradient(135deg,#5865f233 0%,#ffd7001a 100%);border:2px solid gold;border-radius:50px;align-items:center;gap:.75rem;padding:1rem 1.5rem;display:flex;box-shadow:0 0 20px #ffd7004d}.auto-auth-icon{font-size:1.5rem}.auto-auth-text{color:gold;font-size:1rem;font-weight:600}.discord-sdk-error{border:2px solid var(--error);text-align:center;background:#ef44441a;border-radius:12px;margin-bottom:2rem;padding:2rem}.discord-sdk-error .error-icon{margin-bottom:1rem;font-size:3rem}.discord-sdk-error h2{color:var(--error);margin-bottom:1rem;font-size:1.5rem}.discord-sdk-error .error-message{color:var(--text-muted);margin-bottom:1rem;font-size:1rem;line-height:1.6}.discord-sdk-error .error-details{color:var(--error);background:var(--background);word-break:break-all;border-radius:6px;padding:.75rem;font-family:monospace;font-size:.75rem}.auth-fallback-section{border:1px solid var(--border);background:#6366f10d;border-radius:12px;margin-bottom:3rem;padding:1.5rem}.fallback-text{color:var(--text);margin-bottom:1rem;font-size:1rem}.auth-loading-container{flex-direction:column;justify-content:center;align-items:center;gap:1rem;padding:3rem;display:flex}.auth-loading-spinner{border:3px solid var(--border);border-top-color:var(--primary-color);border-radius:50%;width:40px;height:40px;animation:1s linear infinite spin}.auth-loading-container p{color:var(--text-muted);font-size:1rem}.auth-landing-button{padding:1rem 2rem;font-size:1.125rem}.auth-features{text-align:left;border:1px solid var(--border);background:#6366f10d;border-radius:12px;padding:1.5rem}.auth-features h2{color:var(--text);margin-bottom:1rem;font-size:1.25rem}.auth-features ul{padding:0;list-style:none}.auth-features li{color:var(--text-muted);padding:.5rem 0 .5rem 1.5rem;position:relative}.auth-features li:before{content:"✓";color:var(--success);font-weight:700;position:absolute;left:0}.auth-loading{color:var(--text-muted);font-size:1rem}.discord-auth-status{background:var(--surface);border:1px solid var(--border);border-radius:16px;width:100%;max-width:500px;padding:2rem;box-shadow:0 20px 25px -5px #0000004d}.discord-auth-status h2{color:var(--primary-color);text-align:center;margin-bottom:1.5rem;font-size:1.5rem}.discord-status-indicator{border:1px solid var(--border);border-radius:12px;align-items:flex-start;gap:1rem;margin-bottom:1rem;padding:1rem;display:flex}.status-icon{flex-shrink:0;font-size:1.5rem}.status-content{flex:1}.status-message{color:var(--text);margin-bottom:.25rem;font-weight:600}.status-details{color:var(--text-muted);font-size:.875rem}.status-pending{border-color:var(--warning);background:#eab3081a}.status-info{border-color:var(--primary-color);background:#6366f11a}.status-success{border-color:var(--success);background:#22c55e1a}.status-error{border-color:var(--error);background:#ef44441a}.status-progress{background:var(--background);border-radius:2px;height:4px;margin:1rem 0;overflow:hidden}.progress-bar{background:var(--primary-color);border-radius:2px;width:30%;height:100%;animation:1.5s ease-in-out infinite progress-animation}@keyframes progress-animation{0%{transform:translate(-100%)}50%{transform:translate(0%)}to{transform:translate(300%)}}.status-debug{text-align:center;border-top:1px solid var(--border);margin-top:1rem;padding-top:1rem}.status-debug small{color:var(--text-muted);font-family:monospace;font-size:.75rem}.error-box{border:1px solid var(--error);color:var(--error);text-align:left;background:#ef44441a;border-radius:8px;margin:1rem 0;padding:1rem}.error-box strong{color:var(--error)}.auth-debug-info{background:var(--background);border-radius:8px;flex-direction:column;gap:.5rem;margin:1rem 0;padding:.75rem;font-family:monospace;font-size:.75rem;display:flex}.auth-debug-info small{color:var(--text-muted)}.auth-button-wrapper{flex-direction:column;align-items:flex-start;gap:.5rem;display:flex}.loading-spinner{border:2px solid #ffffff4d;border-top-color:#fff;border-radius:50%;width:16px;height:16px;margin-right:.5rem;animation:.8s linear infinite spin;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}.auth-feedback{word-wrap:break-word;border-radius:6px;max-width:300px;padding:.5rem .75rem;font-size:.875rem;animation:.2s ease-out slideIn}@keyframes slideIn{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.auth-feedback-error{border:1px solid var(--error);color:var(--error);background:#ef44441a}.auth-feedback-success{border:1px solid var(--success);color:var(--success);background:#22c55e1a}.auth-status-error{flex-direction:column;align-items:flex-start;gap:.75rem;display:flex}.auth-error-text{color:var(--error);font-size:.875rem}.discord-embedded-user{background:#5865f21a;border:1px solid #5865f2;border-radius:50px;align-items:center;gap:.75rem;padding:.5rem 1rem;display:flex}.discord-auth-badge{color:gold;text-transform:uppercase;letter-spacing:.5px;background:#ffd7001a;border-radius:4px;padding:.25rem .5rem;font-size:.75rem;font-weight:600}.discord-embedded-pending{background:#5865f20d;border:1px dashed #5865f2;border-radius:50px;align-items:center;padding:.5rem 1rem;display:flex}.discord-pending-text{color:#5865f2;font-size:.875rem;font-weight:500}
