
  :root {
    --bg:        #1e1e1e;
    --surface:   #252525;
    --card:      #2a2a2a;
    --hover:     #303030;
    --border:    #383838;
    --border2:   #444444;
    --accent:    #d4a843;
    --accent-dim:#d4a84322;
    --text:      #e8e8e8;
    --muted:     #888888;
    --faint:     #555555;
    --white:     #f5f5f5;
    --radius:    10px;
    --radius-sm: 6px;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* ── Top nav ── */
  nav {
    width: 100%;
    max-width: 680px;
    padding: 28px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn .4s ease both;
  }

  .nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .nav-logo {
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    font-size: 15px;
    color: var(--white);
    letter-spacing: .5px;
  }

  .nav-logo span { color: var(--accent); }

  .lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .lang-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all .2s;
    padding: 0;
    line-height: 1;
    overflow: hidden;
    position: relative;
  }

  .lang-btn:hover {
    border-color: var(--border2);
    transform: scale(1.1);
  }

  .lang-btn.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
  }

  .lang-btn .flag {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
  }

  .nav-discord {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all .2s;
  }

  .nav-discord:hover {
    color: var(--white);
    border-color: var(--border2);
    background: var(--surface);
  }

  .nav-discord svg { width: 15px; height: 15px; }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .nav-donate {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #888;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all .2s;
  }

  .nav-donate:hover {
    color: #009cde;
    border-color: #009cde55;
    background: #009cde11;
  }

  .nav-donate svg { width: 15px; height: 15px; }

  main {
    width: 100%;
    max-width: 680px;
    padding: 48px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .header {
    margin-bottom: 24px;
    animation: fadeIn .4s .05s ease both;
  }

  .header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -.3px;
  }

  .header p {
    margin-top: 6px;
    font-size: 14px;
    color: var(--muted);
  }

  .step {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    animation: fadeUp .4s ease both;
  }

  .step:nth-child(2) { animation-delay: .07s; }
  .step:nth-child(3) { animation-delay: .12s; }
  .step:nth-child(4) { animation-delay: .17s; }

  .step-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 14px;
  }

  .drop-zone {
    border: 1.5px dashed var(--border2);
    border-radius: var(--radius-sm);
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
  }

  .drop-zone:hover, .drop-zone.over {
    border-color: var(--accent);
    background: var(--accent-dim);
  }

  .drop-zone-icon {
    width: 36px; height: 36px;
    margin: 0 auto 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
  }

  .drop-zone strong {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 4px;
  }

  .drop-zone span { font-size: 12px; color: var(--faint); }

  #fileInput { display: none; }

  .file-pill {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .file-pill.show { display: flex; }

  .file-pill-icon {
    width: 34px; height: 34px;
    background: var(--hover);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
  }

  .file-pill-info { flex: 1; min-width: 0; }
  .file-pill-name { font-size: 13px; font-weight: 500; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .file-pill-size { font-size: 11px; color: var(--faint); margin-top: 2px; }

  .btn-ghost {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all .2s;
    flex-shrink: 0;
  }
  .btn-ghost:hover { border-color: #cc4444; color: #cc4444; }

  .detect-badge {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(212,168,67,.08);
    border: 1px solid rgba(212,168,67,.2);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--accent);
    margin-top: 10px;
    animation: fadeIn .3s ease;
  }

  .detect-badge.show { display: flex; }
  .detect-badge strong { color: var(--white); font-weight: 500; }

  .weapon-row {
    display: grid;
    grid-template-columns: 1fr 36px 1fr;
    gap: 10px;
    align-items: flex-end;
  }

  .weapon-col { display: flex; flex-direction: column; }
  .weapon-col-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--faint);
    letter-spacing: .8px;
    text-transform: uppercase;
    margin-bottom: 6px;
  }

  select {
    appearance: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 36px 11px 13px;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
    width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
  }

  select:focus, select:hover { border-color: var(--border2); }
  select option { background: var(--card); }
  select:disabled { opacity: .45; cursor: not-allowed; }

  .from-display {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    font-size: 14px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
  }

  .from-display .from-name { font-weight: 500; }
  .from-display .from-auto {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 3px 7px;
    border-radius: 4px;
  }

  .from-display.empty { color: var(--faint); }

  .arrow-center {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--faint);
    font-size: 18px;
    padding-bottom: 2px;
  }

  .btn-convert {
    width: 100%;
    padding: 14px;
    background: var(--white);
    color: #111;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
  }

  .btn-convert:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255,255,255,0.1);
  }

  .btn-convert:disabled {
    background: var(--surface);
    color: var(--faint);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }

  .btn-convert.loading { opacity: .7; pointer-events: none; }

  .status {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
    animation: fadeIn .2s ease;
  }

  .status.ok   { display: flex; background: rgba(80,200,120,.08);  border: 1px solid rgba(80,200,120,.2);  color: #6fd99a; }
  .status.err  { display: flex; background: rgba(220,80,80,.08);   border: 1px solid rgba(220,80,80,.2);   color: #e07070; }
  .status.warn { display: flex; background: rgba(212,168,67,.08);  border: 1px solid rgba(212,168,67,.2);  color: var(--accent); }

  .notice {
    width: 100%;
    max-width: 680px;
    margin: 10px 0 0;
    padding: 10px 14px;
    background: #2a2218;
    border: 1px solid #5a4a1a;
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: flex-start;
    gap: 9px;
    animation: fadeIn .4s ease both;
  }
  .notice-icon { font-size: 13px; margin-top: 1px; flex-shrink: 0; }
  .notice-text { font-size: 12px; color: #b89a55; line-height: 1.6; }
  .notice-text strong { color: #d4a843; font-weight: 600; }

  footer {
    margin-top: 12px;
    font-size: 12px;
    color: var(--faint);
    text-align: center;
    animation: fadeIn .4s .3s ease both;
  }

  footer a { color: var(--faint); text-decoration: none; }
  footer a:hover { color: var(--muted); }

  @keyframes fadeIn  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes fadeUp  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

  @media(max-width:720px) { nav, main { padding-left: 18px; padding-right: 18px; } }
  @media(max-width:440px) {
    .weapon-row { grid-template-columns: 1fr; }
    .arrow-center { transform: rotate(90deg); justify-content: flex-start; }
    .nav-left { gap: 10px; }
  }
