:root{
  --bg0:#07070b;
  --bg1:#0b0b10;
  --panel: rgba(20, 20, 28, .72);
  --panel2: rgba(20, 20, 28, .55);
  --border: rgba(255,255,255,.08);
  --border2: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);

  --accent:#a855f7;
  --accent2:#22d3ee;
  --ok:#22c55e;
  --warn:#f59e0b;

  --shadow: 0 12px 48px rgba(0,0,0,.55);
  --r: 18px;
  --max: 1180px;
}

*{box-sizing:border-box}
body{
  margin:0;
  color:var(--text);
  background: radial-gradient(1200px 800px at 20% 0%, rgba(168,85,247,.18), transparent 60%),
              radial-gradient(900px 700px at 100% 20%, rgba(34,211,238,.10), transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-blend-mode: screen;
  background-size: cover;
  background-attachment: fixed;
}

.bg{position:fixed; inset:0; z-index:-3}
#particles-js{position:absolute; inset:0; z-index:-3}
.grid{
  position:absolute; inset:-2px;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(closest-side at 50% 20%, rgba(0,0,0,1), rgba(0,0,0,.2) 55%, transparent 85%);
  opacity:.28;
  z-index:-2;
}
.glow{
  position:absolute; inset:-40vh -30vw;
  background: radial-gradient(closest-side, rgba(168,85,247,.10), transparent 60%);
  filter: blur(18px);
  z-index:-1;
}

.wrap{
  width:min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 26px 0 34px;
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  padding: 14px 18px;
  background: rgba(10,10,14,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand{display:flex; gap:12px; align-items:center; text-decoration:none; color:var(--text); min-width: 220px;}
.brand__logo{
  width:36px;height:36px;border-radius:12px;
  border:1px solid var(--border);
  background: linear-gradient(135deg, rgba(168,85,247,.25), rgba(34,211,238,.15));
  overflow:hidden;
}
.brand__img{width:48px;height:48px;object-fit:cover;display:block;border-radius:12px;}
.brand__name{font-family: Orbitron, Inter, sans-serif; letter-spacing:.6px; font-weight:800; line-height:1.05}
.brand__tag{display:block;font-size:12px;color:var(--muted);margin-top:2px}

.nav{display:flex;gap:14px;align-items:center;flex-wrap:wrap;justify-content:center}
.nav__link{
  color: rgba(255,255,255,.78);
  text-decoration:none;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.nav__link:hover{border-color: var(--border); background: rgba(255,255,255,.04)}
.nav__link--muted{color: rgba(255,255,255,.62)}
.nav__link--active{border-color: rgba(168,85,247,.26); background: rgba(168,85,247,.10)}
.topbar__actions{display:flex; gap:10px; align-items:center}

.pill, .btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  text-decoration:none;
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
}
.pill{display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 14px}
.pill--ghost:hover{border-color: var(--border2); background: rgba(255,255,255,.05)}
.pill--primary{
  border-color: rgba(168,85,247,.35);
  background: linear-gradient(135deg, rgba(168,85,247,.22), rgba(34,211,238,.10));
}
.pill--primary:hover{filter:brightness(1.06)}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
  cursor:pointer;
}
.btn:disabled{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
  cursor:pointer;
}
.btn:hover{border-color: var(--border2); background: rgba(255,255,255,.05)}
.btn--primary{
  border-color: rgba(168,85,247,.38);
  background: linear-gradient(135deg, rgba(168,85,247,.26), rgba(34,211,238,.12));
}
.btn--secondary{
  border-color: rgba(34,211,238,.26);
  background: linear-gradient(135deg, rgba(34,211,238,.12), rgba(168,85,247,.10));
}
.btn--warn{
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.10);
}
.btn--disabled{
  opacity:.55;
  cursor:not-allowed;
  background: rgba(255,255,255,.02);
}
.btn--block{width:100%}

.pageHead{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  align-items:start;
  margin-top: 14px;
}
.badge{
  display:inline-flex; align-items:center; gap:10px;
  padding: 8px 12px; border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.78);
  font-size:13px;
}
.dot{width:8px;height:8px;border-radius:99px;background:var(--ok);box-shadow:0 0 0 6px rgba(34,197,94,.10)}
.title{
  margin: 14px 0 8px;
  font-family: Orbitron, Inter, sans-serif;
  font-weight: 800;
  letter-spacing: .6px;
  line-height: 1.1;
  font-size: clamp(28px, 3.2vw, 42px);
}
.accent{color: var(--accent); text-shadow: 0 0 18px rgba(168,85,247,.25)}
.subtitle{margin:0;color: var(--muted);font-size:15px;line-height:1.7;max-width:70ch}
.quickActions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}

.miniPanel{
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--panel2);
  backdrop-filter: blur(12px);
  padding: 12px;
}
.miniPanel__row{display:flex;justify-content:space-between;gap:10px;padding:10px 8px;border-bottom:1px solid rgba(255,255,255,.06)}
.miniPanel__row:last-child{border-bottom:none}
.miniPanel__k{color: var(--muted); font-size: 12.5px; font-weight: 600}
.miniPanel__v{font-size: 13.5px}
.chip{
  display:inline-flex; align-items:center;
  height:22px; padding:0 10px;
  border-radius:999px; border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  font-size:12px; font-weight:800;
}
.chip--ok{border-color: rgba(34,197,94,.28); background: rgba(34,197,94,.10)}

.panel{
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  overflow:hidden;
  margin-top: 16px;
}
.panel__header{
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}
.panel__title{font-weight:900; letter-spacing:.3px}
.panel__hint{color: var(--muted); font-size: 12.5px}
.panel__body{padding: 14px}

.panel__meta .metaPill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.80);
  font-size: 12.5px;
}

.grid2{
  display:grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 14px;
}
.panelSub{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  padding: 14px;
}
.subHead{display:flex; justify-content:space-between; gap:10px; align-items:baseline; margin-bottom: 10px}
.subHead__title{font-weight: 900}
.subHead__hint{color: var(--muted); font-size: 12.5px}

.helpText{color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 10px 0 12px}

.hiddenInput{display:none !important}

.iconBtnGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.iconBtn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.88);
  cursor:pointer;
  font-weight: 800;
}
.iconBtn:hover{border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.05)}
.iconBtn--ok{
  border-color: rgba(34,197,94,.22);
  background: rgba(34,197,94,.08);
}
.iconBtn span{font-size: 13px}

.rowBetween{display:flex; align-items:center; justify-content:space-between; gap: 12px; flex-wrap:wrap}
.statusLine{color: rgba(255,255,255,.72); font-size: 13px}

.toggle{display:inline-flex; align-items:center; gap:10px; cursor:pointer; user-select:none}
.toggle input{display:none}
.toggle__ui{
  width: 44px; height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  position:relative;
  transition: .15s ease;
}
.toggle__ui::after{
  content:"";
  width: 20px; height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  position:absolute;
  top: 2px; left: 2px;
  transition: .15s ease;
}
.toggle input:checked + .toggle__ui{
  border-color: rgba(168,85,247,.35);
  background: rgba(168,85,247,.18);
}
.toggle input:checked + .toggle__ui::after{left: 22px}
.toggle__text{color: rgba(255,255,255,.80); font-size: 13px; font-weight: 700}

.editorText{
  width:100%;
  min-height: 520px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.86);
  padding: 12px;
  outline:none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.8px;
  line-height: 1.55;
}
.editorText:focus{
  border-color: rgba(168,85,247,.30);
  box-shadow: 0 0 0 4px rgba(168,85,247,.12);
}

.formGrid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr .6fr;
  gap: 12px;
}
.field label{
  display:block;
  font-weight: 900;
  font-size: 12.5px;
  color: rgba(255,255,255,.82);
  margin-bottom: 8px;
}
.field input, .field select, textarea, select, input[type="password"], input[type="number"], input[type="file"]{
  width:100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.90);
  padding: 12px;
  outline:none;
}
input[type="file"]::-webkit-file-upload-button{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.88);
  padding: 10px 12px;
  border-radius: 12px;
  margin-right: 10px;
  cursor:pointer;
  font-weight: 900;
}
input[type="file"]::-webkit-file-upload-button:hover{
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
}
.field input:focus, .field select:focus, textarea:focus{
  border-color: rgba(168,85,247,.30);
  box-shadow: 0 0 0 4px rgba(168,85,247,.12);
}
.field.small{min-width: 120px}

.controls{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  margin-top: 12px;
}

.progressWrap{margin-top: 12px; display:grid; gap: 8px}
.progressTrack{
  width:100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  overflow:hidden;
}
.progressBar{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(168,85,247,.9), rgba(34,211,238,.85));
  border-radius: 999px;
}
.progressText{color: rgba(255,255,255,.70); font-size: 12.5px}

.logBox{
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  padding: 12px;
  max-height: 340px;
  overflow:auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.8px;
  line-height: 1.55;
}

.outputText{
  width:100%;
  height: 260px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.86);
  padding: 12px;
  outline:none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.8px;
  line-height: 1.55;
}

.notice-list{margin: 8px 0 0; padding-left: 18px; color: rgba(255,255,255,.78)}
.notice-list li{margin: 8px 0}

.support__buttons{display:flex; gap:10px; flex-wrap:wrap}
.supportBtn{
  display:inline-flex; align-items:center; justify-content:center;
  height: 40px; padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  text-decoration:none;
  font-weight: 800;
  font-size: 13.5px;
}
.supportBtn:hover{border-color: var(--border2); background: rgba(255,255,255,.05)}
.supportBtn--patreon{border-color: rgba(168,85,247,.30); background: rgba(168,85,247,.12)}

.footer-note{margin-top: 18px; color: rgba(255,255,255,.72); font-size: 13px; text-align: center; justify-content: center; align-items: center}
.backRow{display:flex; justify-content:center; margin: 18px 0 8px}
.backBtn{
  display:inline-flex; align-items:center; justify-content:center;
  height: 42px; padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.88);
  text-decoration:none;
  font-weight: 800;
}
.backBtn:hover{border-color: var(--border2); background: rgba(255,255,255,.05)}

.divider{
  margin: 18px 0;
  height: 1px;
  border: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
}

.hidden{display:none !important;}
.modal{
  position:fixed;
  inset:0;
  z-index:200;
  background: rgba(0,0,0,.62);
  padding: 18px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
}
.modal.hidden{display:none !important;}
.modal-content{
  max-width: 640px;
  width: 100%;
  margin-top: 7vh;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(18,18,24,.94);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 16px;
}

@media (max-width: 1100px){
  .formGrid{grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px){
  .nav{display:none}
  .pageHead{grid-template-columns:1fr}
  .grid2{grid-template-columns:1fr}
}
 
.progress-container {
    margin: 20px 0 10px;
}
 
progress {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background-color: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--border-color);
}
 
progress::-webkit-progress-bar {
    background-color: transparent;
    border-radius: 5px;
}
 
progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--neon-magenta), var(--neon-cyan));
    border-radius: 5px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--neon-cyan);
}
 
#progressText {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
 
.log-container {
    max-height: 350px;
    width: auto;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    background-color: rgba(2, 0, 26, 0.7);
    font-size: 0.9rem;
}
 
.log-container::-webkit-scrollbar {
    width: 8px;
}
 
.log-container::-webkit-scrollbar-track {
    background: transparent;
}
 
.log-container::-webkit-scrollbar-thumb {
    background-color: var(--neon-cyan);
    border-radius: 4px;
}
 
.log-entry {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    animation: fadeIn 0.5s ease;
}
 
.log-success {
    color: var(--neon-green);
}
 
.log-error {
    color: var(--neon-red);
}
 
.log-warning {
    color: var(--neon-yellow);
}
 
.log-info {
    color: var(--neon-cyan);
}
 
.translation-log {
    border-left: 2px solid var(--neon-magenta);
    padding-left: 10px;
    margin: 8px 0;
}
 
.translation-original {
    color: var(--text-secondary);
    word-break: break-word;
}
 
.translation-result {
    color: var(--neon-green);
    word-break: break-word;
    font-weight: bold;
}

.grid2 > *{
  min-width: 0;
}
 
.tab-bar{
  background: transparent;
  border: 0;
  padding: 8px;
  flex-wrap: nowrap;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}

.tab-bar::-webkit-scrollbar{height: 8px}
.tab-bar::-webkit-scrollbar-track{background: transparent}
.tab-bar::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.16);
  border-radius: 999px;
}
.tab-bar::-webkit-scrollbar-thumb:hover{background: rgba(255,255,255,.22)}

.tab{
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 600;
  user-select: none;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.tab:hover{
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.05);
  transform: translateY(-1px);
}

.tab.active,
.tab.tab-active{
  border-color: rgba(168,85,247,.35);
  background: linear-gradient(135deg, rgba(168,85,247,.22), rgba(34,211,238,.10));
  color: rgba(255,255,255,.92);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.tab .close,
.tab .tab-close{
  margin-left: 10px;
  opacity: .7;
}
.tab .close:hover,
.tab .tab-close:hover{opacity:1}

.tab.dirty::after{
  content:"•";
  margin-left: 8px;
  color: rgba(34,197,94,.9);
}
 
.progress-wrapper {
    position: relative;
    width: 100%;
    color: #fff;
}
 
.progress-container {
    width: 100%;
    background-color: transparent;
    border-radius: 9999px;
    
    height: 18px;
    
    position: relative;
    overflow: hidden;
    border: 1px solid var(--text-secondary);
    text-align: center;
    display: flex;
}
 
.progress-bar {
    background-color: var(--neon-green);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}
 
.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -90%);
    font-size: 0.875rem;
    font-weight: 500;
    pointer-events: none;
    white-space: nowrap;
    color: #fff;
}
                
#saveBtn{
  margin-top: 10px;
  width:100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.90);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight: 900;
  letter-spacing: .3px;
  cursor: pointer;
  transition: .15s ease;
}

#saveBtn:hover{
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}

#saveBtn:disabled{
  opacity: .55;
  cursor: not-allowed;
  background: rgba(255,255,255,.02);
  border-color: rgba(255,255,255,.08);
}

#saveBtn i{
  opacity: .9;
}

#saveBtn:not(:disabled){
  border-color: rgba(168,85,247,.32);
  background: linear-gradient(135deg, rgba(168,85,247,.18), rgba(34,211,238,.08));
}
#saveBtn:not(:disabled):hover{
  filter: brightness(1.06);
}