:root{--tg-theme-bg-color: #1a1a2e;--tg-theme-secondary-bg-color: #16213e;--tg-theme-text-color: #eaeaea;--tg-theme-hint-color: #8a8a9a;--tg-theme-link-color: #7c5cfc;--tg-theme-button-color: #6c3ce0;--tg-theme-button-text-color: #ffffff;--tg-theme-header-bg-color: #0f0f23;--tg-theme-accent-text-color: #a78bfa;--tg-theme-section-bg-color: #1e1e3a;--tg-theme-section-header-text-color: #c4b5fd;--tg-theme-subtitle-text-color: #9ca3af;--tg-theme-destructive-text-color: #ef4444;--tg-theme-section-separator-color: #2d2d4a}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}html{font-size:16px;-webkit-text-size-adjust:100%}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Helvetica Neue,Arial,sans-serif;background-color:var(--tg-theme-bg-color);color:var(--tg-theme-text-color);line-height:1.5;min-height:100vh;overflow-x:hidden;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#root{min-height:100vh;display:flex;flex-direction:column}input,textarea,select,button{font-family:inherit;font-size:inherit;color:inherit}button{cursor:pointer;border:none;background:none}a{color:var(--tg-theme-link-color);text-decoration:none}::-webkit-scrollbar{width:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--tg-theme-hint-color);border-radius:2px}.app{max-width:480px;margin:0 auto;padding:16px;display:flex;flex-direction:column;gap:16px;min-height:100vh}.app-header{text-align:center;padding:8px 0}.app-header h1{font-size:1.4rem;font-weight:700;color:var(--tg-theme-accent-text-color, #a78bfa);display:flex;align-items:center;justify-content:center;gap:8px}.app-header .subtitle{font-size:.8rem;color:var(--tg-theme-hint-color, #8a8a9a);margin-top:2px}.text-input-section{position:relative}.text-input{width:100%;min-height:150px;padding:14px;border:2px solid var(--tg-theme-section-separator-color, #2d2d4a);border-radius:14px;background:var(--tg-theme-section-bg-color, #1e1e3a);color:var(--tg-theme-text-color, #eaeaea);font-size:1rem;line-height:1.6;resize:vertical;outline:none;transition:border-color .2s}.text-input:focus{border-color:var(--tg-theme-button-color, #6c3ce0)}.text-input::placeholder{color:var(--tg-theme-hint-color, #8a8a9a)}.text-meta{display:flex;justify-content:space-between;align-items:center;margin-top:6px;padding:0 4px}.char-count{font-size:.75rem;color:var(--tg-theme-hint-color, #8a8a9a)}.char-count.over-limit{color:var(--tg-theme-destructive-text-color, #ef4444);font-weight:600}.copy-btn{font-size:.75rem;color:var(--tg-theme-link-color, #7c5cfc);padding:4px 10px;border-radius:8px;background:#7c5cfc1a;transition:background .2s}.copy-btn:active{background:#7c5cfc40}.text-input.highlighting{caret-color:transparent}.voice-section{display:flex;flex-direction:column;gap:8px}.section-label{font-size:.8rem;font-weight:600;color:var(--tg-theme-section-header-text-color, #c4b5fd);text-transform:uppercase;letter-spacing:.5px}.voice-select{width:100%;padding:12px 14px;border:2px solid var(--tg-theme-section-separator-color, #2d2d4a);border-radius:12px;background:var(--tg-theme-section-bg-color, #1e1e3a);color:var(--tg-theme-text-color, #eaeaea);font-size:.95rem;outline:none;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a8a9a' stroke-width='2' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;cursor:pointer}.voice-select:focus{border-color:var(--tg-theme-button-color, #6c3ce0)}.presets-section{display:flex;flex-direction:column;gap:8px}.presets-row{display:flex;gap:8px;flex-wrap:wrap}.preset-pill{padding:7px 14px;border-radius:20px;font-size:.8rem;font-weight:600;background:var(--tg-theme-section-bg-color, #1e1e3a);color:var(--tg-theme-hint-color, #8a8a9a);border:1.5px solid var(--tg-theme-section-separator-color, #2d2d4a);transition:all .2s;white-space:nowrap}.preset-pill.active{background:#6c3ce033;color:var(--tg-theme-accent-text-color, #a78bfa);border-color:var(--tg-theme-button-color, #6c3ce0)}.preset-pill:active{transform:scale(.95)}.sliders-section{display:flex;flex-direction:column;gap:14px}.slider-group{display:flex;flex-direction:column;gap:6px}.slider-header{display:flex;justify-content:space-between;align-items:center}.slider-label{font-size:.8rem;font-weight:600;color:var(--tg-theme-section-header-text-color, #c4b5fd)}.slider-value{font-size:.8rem;color:var(--tg-theme-accent-text-color, #a78bfa);font-weight:700;min-width:36px;text-align:right}.slider{-webkit-appearance:none;appearance:none;width:100%;height:6px;border-radius:3px;background:var(--tg-theme-section-separator-color, #2d2d4a);outline:none}.slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:22px;height:22px;border-radius:50%;background:var(--tg-theme-button-color, #6c3ce0);cursor:pointer;border:3px solid var(--tg-theme-bg-color, #1a1a2e);box-shadow:0 0 8px #6c3ce066;transition:box-shadow .2s}.slider::-webkit-slider-thumb:active{box-shadow:0 0 14px #6c3ce0b3}.slider::-moz-range-thumb{width:22px;height:22px;border-radius:50%;background:var(--tg-theme-button-color, #6c3ce0);cursor:pointer;border:3px solid var(--tg-theme-bg-color, #1a1a2e);box-shadow:0 0 8px #6c3ce066}.controls-section{display:flex;flex-direction:column;align-items:center;gap:16px;padding:12px 0}.sound-wave{display:flex;align-items:center;justify-content:center;gap:4px;height:40px}.sound-wave .bar{width:5px;border-radius:3px;background:var(--tg-theme-button-color, #6c3ce0);opacity:.3;transition:opacity .3s}.sound-wave.active .bar{opacity:1;animation:wave 1s ease-in-out infinite}.sound-wave .bar:nth-child(1){height:12px;animation-delay:0s}.sound-wave .bar:nth-child(2){height:24px;animation-delay:.15s}.sound-wave .bar:nth-child(3){height:36px;animation-delay:.3s}.sound-wave .bar:nth-child(4){height:24px;animation-delay:.45s}.sound-wave .bar:nth-child(5){height:12px;animation-delay:.6s}@keyframes wave{0%,to{transform:scaleY(.4)}50%{transform:scaleY(1)}}.main-controls{display:flex;align-items:center;justify-content:center;gap:20px}.play-btn{width:64px;height:64px;border-radius:50%;background:linear-gradient(135deg,#6c3ce0,#8b5cf6);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 20px #6c3ce066;transition:all .2s;position:relative}.play-btn:before{content:"";position:absolute;inset:-4px;border-radius:50%;background:transparent;transition:background .3s,box-shadow .3s}.play-btn.speaking:before{animation:pulse-glow 1.5s ease-in-out infinite}@keyframes pulse-glow{0%,to{box-shadow:0 0 #6c3ce066}50%{box-shadow:0 0 0 12px #6c3ce000}}.play-btn:active{transform:scale(.93)}.play-btn:disabled{opacity:.4;cursor:default}.play-btn:disabled:active{transform:none}.play-btn svg{width:28px;height:28px;fill:#fff;position:relative;z-index:1}.ctrl-btn{width:44px;height:44px;border-radius:50%;background:var(--tg-theme-section-bg-color, #1e1e3a);border:2px solid var(--tg-theme-section-separator-color, #2d2d4a);display:flex;align-items:center;justify-content:center;transition:all .2s}.ctrl-btn:active{transform:scale(.9);border-color:var(--tg-theme-button-color, #6c3ce0)}.ctrl-btn:disabled{opacity:.3;cursor:default}.ctrl-btn:disabled:active{transform:none}.ctrl-btn svg{width:20px;height:20px;fill:var(--tg-theme-text-color, #eaeaea)}.usage-info{text-align:center;font-size:.75rem;color:var(--tg-theme-hint-color, #8a8a9a)}.usage-info .upgrade-link{color:var(--tg-theme-link-color, #7c5cfc);font-weight:600;cursor:pointer;margin-left:4px}.usage-info .upgrade-link:active{opacity:.7}.dev-toggle{display:flex;align-items:center;justify-content:center;gap:8px;padding:8px;font-size:.7rem;color:var(--tg-theme-hint-color, #8a8a9a);opacity:.6}.dev-toggle-switch{position:relative;width:36px;height:20px;background:var(--tg-theme-section-separator-color, #2d2d4a);border-radius:10px;cursor:pointer;transition:background .2s}.dev-toggle-switch.on{background:var(--tg-theme-button-color, #6c3ce0)}.dev-toggle-switch:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .2s}.dev-toggle-switch.on:after{transform:translate(16px)}.modal-overlay{position:fixed;inset:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:1000;padding:24px;animation:fade-in .2s ease}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.modal{background:var(--tg-theme-section-bg-color, #1e1e3a);border-radius:20px;padding:28px 24px;max-width:340px;width:100%;text-align:center;animation:modal-up .25s ease}@keyframes modal-up{0%{opacity:0;transform:translateY(24px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.modal h2{font-size:1.2rem;color:var(--tg-theme-accent-text-color, #a78bfa);margin-bottom:8px}.modal p{font-size:.85rem;color:var(--tg-theme-hint-color, #8a8a9a);margin-bottom:20px;line-height:1.5}.modal-features{text-align:left;margin-bottom:20px}.modal-features li{font-size:.85rem;color:var(--tg-theme-text-color, #eaeaea);padding:4px 0;list-style:none}.modal-features li:before{content:"✓";color:var(--tg-theme-accent-text-color, #a78bfa);font-weight:700;margin-right:8px}.upgrade-btn{width:100%;padding:14px;border-radius:14px;background:linear-gradient(135deg,#6c3ce0,#8b5cf6);color:#fff;font-size:1rem;font-weight:700;box-shadow:0 4px 16px #6c3ce066;transition:transform .2s}.upgrade-btn:active{transform:scale(.97)}.modal-close{margin-top:12px;font-size:.85rem;color:var(--tg-theme-hint-color, #8a8a9a);padding:8px}.modal-close:active{opacity:.6}.not-supported{text-align:center;padding:40px 20px;color:var(--tg-theme-hint-color, #8a8a9a)}.not-supported h2{color:var(--tg-theme-destructive-text-color, #ef4444);margin-bottom:8px}.speaking-word{background:#6c3ce040;border-radius:3px;padding:0 2px}
