:root{--bg-primary:#f8fafc;--bg-secondary:#fff;--bg-tertiary:#f1f5f9;--text-primary:#1e293b;--text-secondary:#64748b;--text-muted:#94a3b8;--border-color:#e2e8f0;--accent-start:#6366f1;--accent-end:#8b5cf6;--accent-hover-start:#4f46e5;--accent-hover-end:#7c3aed;--shadow-sm:0 1px 2px 0 #0000000d;--shadow-md:0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a;--error-bg:#fef2f2;--error-text:#dc2626;--error-border:#fecaca}body{min-height:100vh;color:var(--text-primary);background:linear-gradient(120deg,#e0e7ef 0%,#f8fafc 100%);font-family:Instrument Sans,ui-sans-serif,system-ui,sans-serif}body.dark{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--text-primary:#f1f5f9;--text-secondary:#94a3b8;--text-muted:#64748b;--border-color:#334155;--shadow-sm:0 1px 2px 0 #0000004d;--shadow-md:0 4px 6px -1px #0006, 0 2px 4px -2px #0000004d;--shadow-lg:0 10px 15px -3px #0006, 0 4px 6px -4px #0000004d;--shadow-xl:0 20px 25px -5px #0006, 0 8px 10px -6px #0000004d;--error-bg:#450a0a;--error-text:#fca5a5;--error-border:#7f1d1d;background:linear-gradient(120deg,#1e2533 0%,#232b3b 100%)}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:var(--bg-tertiary);border-radius:3px}::-webkit-scrollbar-thumb{background:linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--accent-end)}*{scrollbar-width:thin;scrollbar-color:var(--accent-start) var(--bg-tertiary)}.header{background:linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);color:#fff;justify-content:space-between;align-items:center;padding:1.5rem 2rem;display:flex}.logo-section{align-items:center;gap:.75rem;display:flex}.logo-icon{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#fff3;border-radius:12px;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.logo-icon svg{width:24px;height:24px}.title{letter-spacing:-.02em;font-size:1.5rem;font-weight:700}.theme-toggle{cursor:pointer;color:#fff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#ffffff26;border:none;border-radius:12px;justify-content:center;align-items:center;width:44px;height:44px;transition:all .3s;display:flex}.theme-toggle:hover{background:#ffffff40;transform:scale(1.05)}.theme-toggle svg{width:24px;height:24px}.loading-overlay{background:var(--bg-secondary);z-index:50;color:var(--text-secondary);flex-direction:column;justify-content:center;align-items:center;gap:1rem;font-size:.95rem;display:flex;position:absolute;inset:0}.spinner{border:3px solid var(--border-color);border-top-color:var(--accent-start);border-radius:50%;width:48px;height:48px;animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.app-body-bg{z-index:0;background:linear-gradient(120deg,#e0e7ef 0%,#f8fafc 100%);width:100vw;min-height:100vh;position:fixed;top:0;left:0}.app-body-bg.dark{background:linear-gradient(120deg,#1e2533 0%,#232b3b 100%)}.app-wrapper{z-index:1;background:0 0;flex-direction:column;height:100vh;min-height:100vh;padding:2rem 1rem;transition:all .3s;display:flex;position:relative}.app-wrapper.dark{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--text-primary:#f1f5f9;--text-secondary:#94a3b8;--text-muted:#64748b;--border-color:#334155;--shadow-sm:0 1px 2px 0 #0000004d;--shadow-md:0 4px 6px -1px #0006, 0 2px 4px -2px #0000004d;--shadow-lg:0 10px 15px -3px #0006, 0 4px 6px -4px #0000004d;--shadow-xl:0 20px 25px -5px #0006, 0 8px 10px -6px #0000004d;--error-bg:#450a0a;--error-text:#fca5a5;--error-border:#7f1d1d}.translate-app{background:var(--bg-secondary);box-shadow:var(--shadow-xl);border-radius:24px;margin:0 auto;animation:.5s ease-out slideUp;position:relative;overflow:hidden}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.content{flex:auto;min-height:0;padding:2rem 3rem;transition:opacity .3s;overflow-y:auto}.content.loading{opacity:.3;pointer-events:none}.translation-grid{grid-template-columns:1fr auto 1fr;align-items:start;gap:1rem;display:grid}.translation-card{background:var(--bg-tertiary);border:1px solid #0000;border-radius:16px;padding:1.25rem;transition:all .3s}.translation-card:focus-within{border-color:var(--accent-start);box-shadow:0 0 0 3px #6366f11a}.card-header{justify-content:space-between;align-items:center;margin-bottom:1rem;display:flex;position:relative}.label{color:var(--text-secondary);text-transform:uppercase;letter-spacing:.05em;font-size:.875rem;font-weight:600}.detected-lang{z-index:10;color:#fff;background-color:#806fdc;border:1px solid #806fdc;border-radius:6px;padding:2px 8px;font-size:.75rem;font-weight:600;animation:.3s fadeIn;position:absolute;bottom:-1.7rem;box-shadow:0 0 6px #7666cd}@keyframes fadeIn{0%{opacity:0;transform:translateY(-5px)}to{opacity:.8;transform:translateY(0)}}.lang-select{background:var(--bg-secondary);border:1px solid var(--border-color);color:var(--text-primary);cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1rem;border-radius:8px;padding:.5rem 2rem .5rem .75rem;font-size:.875rem;font-weight:500;transition:all .2s}.lang-select:hover{border-color:var(--accent-start)}.lang-select:focus{border-color:var(--accent-start);outline:none;box-shadow:0 0 0 3px #6366f11a}.textarea-wrapper{position:relative}.textarea{background:var(--bg-secondary);border:1px solid var(--border-color);width:100%;min-height:150px;color:var(--text-primary);resize:none;border-radius:12px;padding:1.3rem 1rem;font-size:1rem;line-height:1.6;transition:all .2s;overflow:hidden}.textarea:focus{border-color:var(--accent-start);outline:none;box-shadow:0 0 0 3px #6366f11a}.textarea::placeholder{color:var(--text-muted)}.output-textarea{background:var(--bg-tertiary);cursor:default}.char-count{color:var(--text-muted);font-size:.75rem;position:absolute;bottom:.75rem;right:.75rem}.copy-btn{background:var(--bg-secondary);border:1px solid var(--border-color);cursor:pointer;width:36px;height:36px;color:var(--text-secondary);border-radius:8px;justify-content:center;align-items:center;transition:all .2s;display:flex;position:absolute;bottom:.1rem;right:-.25rem}.copy-btn:hover{background:var(--accent-start);border-color:var(--accent-start);color:#fff;transform:scale(1.05)}.copy-btn svg{width:18px;height:18px}.swap-btn{background:linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);cursor:pointer;color:#fff;width:48px;height:48px;box-shadow:var(--shadow-md);border:none;border-radius:50%;justify-content:center;align-self:center;align-items:center;margin-top:2rem;transition:all .3s;display:flex}.swap-btn:hover{box-shadow:var(--shadow-lg);transform:rotate(180deg)scale(1.1)}.swap-btn svg{width:24px;height:24px}.translating-indicator{gap:4px;display:flex;position:absolute;bottom:1rem;left:1rem}.pulse-dot{background:linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);border-radius:50%;width:8px;height:8px;animation:1.4s ease-in-out infinite pulse}.pulse-dot:nth-child(2){animation-delay:.2s}.pulse-dot:nth-child(3){animation-delay:.4s}@keyframes pulse{0%,80%,to{opacity:.5;transform:scale(.6)}40%{opacity:1;transform:scale(1)}}.action-section{justify-content:center;margin-top:1.5rem;display:flex}.translate-btn{background:linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);color:#fff;cursor:pointer;box-shadow:var(--shadow-md);border:none;border-radius:16px;padding:1rem 3rem;font-size:1.1rem;font-weight:600;transition:all .3s;position:relative;overflow:hidden}.translate-btn:before{content:"";background:linear-gradient(135deg, var(--accent-hover-start) 0%, var(--accent-hover-end) 100%);opacity:0;transition:opacity .3s;position:absolute;inset:0}.translate-btn:hover:not(:disabled):before{opacity:1}.translate-btn:hover:not(:disabled){box-shadow:var(--shadow-lg);transform:translateY(-2px)}.translate-btn:active:not(:disabled){transform:translateY(0)}.translate-btn:disabled{opacity:.6;cursor:not-allowed}.btn-content{z-index:1;justify-content:center;align-items:center;gap:.5rem;display:flex;position:relative}.btn-content svg{width:20px;height:20px}.btn-spinner{border:2px solid #ffffff4d;border-top-color:#fff;border-radius:50%;width:20px;height:20px;animation:.8s linear infinite spin}.error-message{background:var(--error-bg);border:1px solid var(--error-border);color:var(--error-text);border-radius:12px;justify-content:center;align-items:center;gap:.5rem;margin-top:1.5rem;padding:1rem 1.5rem;font-size:.95rem;font-weight:500;animation:.5s ease-in-out shake;display:flex}.error-message svg{flex-shrink:0;width:20px;height:20px}@keyframes shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-4px)}20%,40%,60%,80%{transform:translate(4px)}}.footer{text-align:center;border-top:1px solid var(--border-color);color:var(--text-muted);padding:1rem 2rem;font-size:.85rem}.fade-enter-active,.fade-leave-active{transition:opacity .3s}.fade-enter-from,.fade-leave-to{opacity:0}.slide-up-enter-active,.slide-up-leave-active{transition:all .3s}.slide-up-enter-from,.slide-up-leave-to{opacity:0;transform:translateY(10px)}.rotate-enter-active,.rotate-leave-active{transition:all .3s}.rotate-enter-from{opacity:0;transform:rotate(-90deg)scale(.8)}.rotate-leave-to{opacity:0;transform:rotate(90deg)scale(.8)}.alternatives-container{flex-direction:column;gap:.5rem;display:flex;position:absolute;top:50%;right:-60px;transform:translateY(-50%)}.alternative-circle{cursor:pointer;width:36px;height:36px;box-shadow:var(--shadow-sm);border:2px solid #0000;border-radius:50%;justify-content:center;align-items:center;font-size:.9rem;font-weight:700;transition:all .3s;display:flex}.alternative-circle:first-child{color:#fff;background:linear-gradient(135deg,#3b82f6 0%,#1d4ed8 100%)}.alternative-circle:nth-child(2){color:#fff;background:linear-gradient(135deg,#8b5cf6 0%,#6d28d9 100%)}.alternative-circle:nth-child(3){color:#fff;background:linear-gradient(135deg,#ec4899 0%,#be185d 100%)}.alternative-circle:hover:not(.disabled){box-shadow:var(--shadow-md);transform:scale(1.15)}.alternative-circle.active{box-shadow:0 0 0 3px #6366f166, var(--shadow-md);border-color:#fff;transform:scale(1.1)}.alternative-circle.disabled{opacity:.3;cursor:not-allowed;filter:grayscale(.8)}@media (width>=768px){.translate-app{width:1000px}}.main-layout{align-items:flex-start;gap:1.5rem;max-width:1400px;margin:0 auto;display:flex}.history-aside{width:56px;min-width:56px;max-height:80vh;box-shadow:var(--shadow-xl);border-radius:24px;flex-direction:column;transition:width .3s,min-width .3s;display:flex;position:fixed;bottom:3rem;right:3rem;overflow:hidden}.history-aside.expanded{width:320px;min-width:280px}.history-toggle-btn{background:linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);cursor:pointer;color:#fff;border:none;border-radius:24px;flex-shrink:0;justify-content:center;align-items:center;width:56px;height:56px;transition:all .3s;display:flex;position:relative}.history-toggle-btn:hover{box-shadow:var(--shadow-lg);transform:scale(1.05)}.history-badge{color:#fff;background:#ef4444;border-radius:9px;justify-content:center;align-items:center;min-width:18px;height:18px;padding:0 5px;font-size:.7rem;font-weight:700;display:flex;position:absolute;top:6px;right:6px}.history-content{border-radius:0 0 24px 24px;flex-direction:column;flex:1;display:flex;overflow:hidden}.slide-history-enter-active,.slide-history-leave-active{transition:opacity .3s,transform .3s}.slide-history-enter-from,.slide-history-leave-to{opacity:0;transform:translate(20px)}.history-header{background:linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);color:#fff;border-radius:20px 20px 0 0;justify-content:space-between;align-items:center;padding:1rem 1.25rem;display:flex}.history-title{color:#fff;align-items:center;gap:.5rem;margin:0;font-size:1rem;font-weight:600;display:flex}.history-title svg{color:#fff}.clear-history-btn{cursor:pointer;color:#fff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#ffffff26;border:none;border-radius:8px;justify-content:center;align-items:center;width:32px;height:32px;transition:all .3s;display:flex}.clear-history-btn:hover{background:#ffffff40;transform:scale(1.05)}.history-list{background:var(--bg-secondary);border-radius:0 0 24px 24px;flex:1;padding:1rem;overflow-y:auto}.history-list::-webkit-scrollbar{width:5px}.history-list::-webkit-scrollbar-track{background:0 0;margin:8px 0}.history-list::-webkit-scrollbar-thumb{background:linear-gradient(180deg, var(--accent-start) 0%, var(--accent-end) 100%);border-radius:4px}.history-empty{color:var(--text-muted);text-align:center;flex-direction:column;justify-content:center;align-items:center;padding:3rem 1rem;display:flex}.history-empty svg{opacity:.3;margin-bottom:1rem}.history-empty p{margin:0;font-size:.9rem}.history-item{background:var(--bg-tertiary);cursor:pointer;border:1px solid #0000;border-radius:12px;margin-bottom:.75rem;padding:1rem;transition:all .2s}.history-item:hover{border-color:var(--accent-start);transform:translate(-4px)}.history-item:last-child{margin-bottom:0}.history-item-langs{align-items:center;gap:.5rem;margin-bottom:.5rem;display:flex}.history-lang{color:var(--accent-start);text-transform:uppercase;font-size:.75rem;font-weight:600}.history-item-langs svg{color:var(--text-muted)}.history-item-text{color:var(--text-primary);text-overflow:ellipsis;white-space:nowrap;margin:0 0 .25rem;font-size:.875rem;overflow:hidden}.history-item-translated{color:var(--text-secondary);text-overflow:ellipsis;white-space:nowrap;margin:0 0 .5rem;font-size:.8rem;overflow:hidden}.history-item-date{color:var(--text-muted);font-size:.7rem}@media (width<=1200px){.main-layout{flex-direction:column}.history-aside{z-index:100;width:56px;min-width:56px;max-height:calc(100vh - 6rem);margin:0;position:fixed;bottom:1rem;right:1rem}.history-aside.expanded{width:320px;min-width:280px}}@media (width<=768px){.alternatives-container{flex-direction:row;justify-content:center;margin-top:1rem;position:relative;top:auto;right:auto;transform:none}.output-card .textarea-wrapper{flex-direction:column;display:flex}.translation-grid{grid-template-columns:1fr;gap:.5rem}.swap-btn{margin:.5rem auto;transform:rotate(90deg)}.swap-btn:hover{transform:rotate(270deg)scale(1.1)}}html,body{height:100%;min-height:100vh;margin:0;padding:0}
