:root{--bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);--glass-surface: rgba(255, 255, 255, .05);--glass-border: rgba(255, 255, 255, .1);--primary-accent: #818cf8;--primary-glow: rgba(129, 140, 248, .4);--text-main: #f8fafc;--text-muted: #94a3b8}*,*:before,*:after{box-sizing:border-box}body{margin:0;min-height:100vh;background-color:#0f172a;background:var(--bg-gradient);color:var(--text-main);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;overflow-x:hidden}.container{max-width:900px;margin:0 auto;padding:4rem 2rem;display:flex;flex-direction:column;align-items:center;position:relative}h1{font-size:3.5rem;font-weight:700;margin-bottom:3rem;background:linear-gradient(to right,#fff,#94a3b8);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-shadow:0 0 30px rgba(255,255,255,.1)}.app-header,.app-brand,.app-account{display:flex;align-items:center}.app-header{width:100%;justify-content:space-between;gap:1rem;margin-bottom:1.25rem}.app-brand,.app-account{min-width:0;gap:.9rem}.app-brand h1{margin:0;font-size:2rem;line-height:1.15}.app-brand>span{flex:none;color:var(--text-muted);font-size:.85rem}.app-account{justify-content:flex-end}.user-label{min-width:0;overflow-wrap:anywhere;color:var(--primary-accent);font-weight:600}.glass-card{display:block;background:#1e293b;border:1px solid rgba(255,255,255,.2);border-radius:24px;padding:3rem;width:100%;box-shadow:0 4px 16px #0003;transition:transform .2s ease;z-index:10;position:relative}.upload-box{border:2px dashed var(--glass-border);border-radius:20px;padding:4rem;text-align:center;cursor:pointer;transition:all .3s ease}.upload-box:hover{border-color:var(--primary-accent);background:#818cf80d;box-shadow:0 0 20px var(--primary-glow)}.upload-box-disabled,.upload-box-disabled:hover{cursor:not-allowed;border-color:var(--glass-border);background:#1e293b;box-shadow:none;opacity:.62}.upload-icon{font-size:3rem;margin-bottom:1rem;opacity:.7}.estimation-card{text-align:center}.cost-display{font-size:4rem;font-weight:700;color:#4ade80;margin:1rem 0;text-shadow:0 0 20px rgba(74,222,128,.3)}.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;margin:2rem 0;text-align:left}.stat-item{background:#ffffff08;padding:1rem;border-radius:12px}.stat-label{display:block;font-size:.85rem;color:var(--text-muted)}.stat-value{font-size:1.2rem;font-weight:600}.cost-breakdown{background:#0003;border-radius:12px;padding:1.5rem;margin:1.5rem 0;text-align:left}.cost-row{display:flex;justify-content:space-between;margin-bottom:.5rem;font-size:1.1rem;color:var(--text-muted)}.cost-row span:last-child{color:#fff;font-weight:600}.cost-divider{border:0;height:1px;background:#ffffff1a;margin:1rem 0}.cost-total{display:flex;justify-content:space-between;font-size:1.4rem;font-weight:700;color:#4ade80}.live-spend{margin-top:1.5rem;background:#4ade801a;border:1px solid rgba(74,222,128,.2);padding:.75rem;border-radius:12px;display:flex;align-items:center;justify-content:center;gap:.5rem;font-size:.9rem}.spend-label{color:var(--text-muted)}.spend-value{color:#4ade80;font-weight:700;font-size:1.1rem}.spend-detail{color:var(--text-muted);font-size:.8rem;opacity:.8}.status-bar{margin-bottom:2rem}.status-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.status-badge{background:var(--primary-accent);color:#0f172a;padding:.25em .75em;border-radius:99px;font-weight:700;font-size:.8rem;text-transform:uppercase}.progress-track{background:#ffffff1a;height:6px;border-radius:3px;overflow:hidden}.progress-fill{background:var(--primary-accent);height:100%;box-shadow:0 0 10px var(--primary-glow);transition:width .5s cubic-bezier(.4,0,.2,1)}.player-section{text-align:center}audio{width:100%;border-radius:12px;margin-bottom:2rem;filter:invert(.9)}.btn-primary{background:var(--primary-accent);color:#fff;padding:1rem 2rem;border-radius:12px;font-weight:600;border:none;cursor:pointer;box-shadow:0 4px 15px var(--primary-glow);transition:transform .2s;width:100%;font-size:1.1rem}.btn-primary:hover{transform:scale(1.02)}.btn-secondary{background:#ffffff1a;color:#fff;padding:.5rem 1rem;border:1px solid rgba(255,255,255,.2);border-radius:8px;cursor:pointer;transition:background .2s}.btn-secondary:hover{background:#fff3}.fix-controls{margin-top:2rem;background:#ffa6000d;border:1px solid rgba(255,166,0,.2);border-radius:16px;padding:1.5rem}.control-group{display:flex;gap:1rem;align-items:center;justify-content:center;margin-top:1rem}.history-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px;width:100%;margin-top:1rem}.history-card{background:#1e293bb3;border:1px solid rgba(255,255,255,.1);border-radius:16px;padding:1.5rem;cursor:pointer;transition:all .2s ease;display:flex;flex-direction:column;justify-content:space-between;height:100%}.history-card:hover{background:#1e293b;border-color:var(--primary-accent);box-shadow:0 0 15px #818cf833}.history-card-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem}.history-icon{font-size:1.5rem;opacity:.7;background:#ffffff1a;width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:50%}.history-title{font-size:1.1rem;font-weight:600;color:var(--text-main);margin-bottom:.5rem;line-height:1.4;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;min-height:3.2rem}.history-date{font-size:.85rem;color:var(--text-muted);margin-top:auto}.elevenlabs-settings{width:100%;padding:1.25rem 0;margin-bottom:1.25rem;border-top:1px solid var(--glass-border);border-bottom:1px solid var(--glass-border)}.settings-heading,.settings-row,.settings-add-key,.settings-preview{display:flex;align-items:flex-end;gap:.75rem}.settings-heading{align-items:center;justify-content:space-between;margin-bottom:1rem}.settings-heading h2{margin:0;font-size:1.15rem;line-height:1.3}.settings-heading p,.settings-message,.settings-error{margin:.2rem 0 0;color:var(--text-muted);font-size:.85rem}.settings-loading{color:var(--text-muted);font-size:.8rem}.settings-row+.settings-row{margin-top:.9rem}.settings-field{display:flex;min-width:0;flex:1 1 11rem;flex-direction:column;gap:.35rem}.settings-field>span,.settings-preview>span{color:var(--text-muted);font-size:.75rem;font-weight:600}.settings-field input,.settings-field select{width:100%;min-width:0;height:2.6rem;padding:0 .75rem;border:1px solid rgba(255,255,255,.2);border-radius:6px;outline:none;background:#111827;color:var(--text-main);font:inherit;letter-spacing:0}.settings-field input:focus,.settings-field select:focus{border-color:#22c55e;box-shadow:0 0 0 2px #22c55e33}.settings-field input:disabled,.settings-field select:disabled,.settings-action:disabled{cursor:not-allowed;opacity:.55}.settings-key-select,.settings-voice-select{flex-basis:13rem}.settings-add-key{min-width:0;flex:2 1 30rem}.settings-voice-link{flex:2 1 26rem}.settings-action{min-width:7rem;height:2.6rem;white-space:nowrap}.settings-message,.settings-error{margin-top:.8rem}.settings-error{color:#fca5a5}.settings-preview{align-items:center;margin-top:.9rem}.settings-preview>span{width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.settings-preview audio{height:2.6rem;margin:0}.queue-selection{margin-top:.3rem;color:var(--text-muted);font-size:.75rem}.active-selection{display:flex;flex-wrap:wrap;gap:.4rem 1rem;margin:.6rem 0 1rem;color:var(--text-muted);font-size:.8rem}.active-status-actions{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.625rem}.active-status-actions .btn-secondary{padding:.35rem .7rem;font-size:.8rem}.queue-section{width:100%;margin-bottom:1.25rem}.queue-header,.queue-item-title-row,.queue-item-actions{display:flex;align-items:center}.queue-header{justify-content:space-between;gap:1rem;margin-bottom:.75rem}.queue-header h3{margin:0}.queue-count{display:inline-flex;min-width:1.75rem;height:1.75rem;align-items:center;justify-content:center;border:1px solid var(--glass-border);border-radius:50%;color:var(--text-muted);font-size:.8rem;font-weight:700}.book-list{display:grid;gap:.75rem}.queue-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;min-width:0;padding:1rem;background:#1e293bf2;border:1px solid rgba(255,255,255,.14);border-radius:8px}.queue-item-active{border-color:var(--primary-accent)}.queue-item-main{min-width:0}.queue-item-title-row{flex-wrap:wrap;gap:.5rem}.queue-item-title-row strong{min-width:0;overflow-wrap:anywhere}.queue-status{flex:none;padding:.2rem .5rem;border:1px solid transparent;border-radius:999px;font-size:.7rem;font-weight:700;line-height:1.25;text-transform:uppercase}.queue-status-active{background:#818cf829;border-color:#818cf873;color:#c7d2fe}.queue-status-waiting{background:#facc151f;border-color:#facc1561;color:#fde68a}.queue-status-success{background:#4ade801f;border-color:#4ade8061;color:#86efac}.queue-status-error{background:#f871711f;border-color:#f8717161;color:#fca5a5}.queue-status-neutral{background:#94a3b81f;border-color:#94a3b852;color:#cbd5e1}.queue-item-message{margin:.35rem 0 0;color:var(--text-muted);font-size:.8rem;overflow-wrap:anywhere}.queue-progress{width:100%;height:5px;margin-top:.65rem;overflow:hidden;background:#ffffff1a;border-radius:3px}.queue-progress span{display:block;height:100%;background:var(--primary-accent);transition:width .3s ease}.queue-estimate{margin-top:.4rem;color:var(--text-muted);font-size:.75rem}.queue-item-actions{flex-wrap:wrap;justify-content:flex-end;gap:.5rem}.queue-item-actions .queue-action{width:auto;min-width:5.5rem;padding:.5rem .75rem;font-size:.8rem;line-height:1.2}.btn-cancel{border-color:#f8717173;color:#fecaca}.btn-cancel:hover{background:#f8717124}.queue-item-actions button:focus-visible,.active-status-actions button:focus-visible{outline:2px solid #f8fafc;outline-offset:2px}@media(max-width:760px){.app-header{align-items:stretch;flex-direction:column}.app-account{justify-content:space-between}.settings-row,.settings-add-key{align-items:stretch;flex-direction:column}.settings-field,.settings-key-select,.settings-voice-select,.settings-add-key,.settings-voice-link{width:100%;flex-basis:auto}.settings-action{width:100%}.settings-preview{align-items:stretch;flex-direction:column}.settings-preview>span{width:100%}.queue-item{grid-template-columns:minmax(0,1fr);align-items:stretch}.queue-item-actions{justify-content:flex-start}.queue-item-actions .queue-action{flex:1 1 8rem}}@media(max-width:420px){.container{padding:1.5rem 1rem}.app-brand{align-items:flex-start;flex-direction:column;gap:.2rem}.app-brand h1{font-size:1.65rem}.app-account{align-items:stretch;flex-direction:column}}
