      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
      }

      body {
        font-family:
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        background: #0f0f0f;
        color: #e0e0e0;
        min-height: 100vh;
        padding: 2rem 1rem;
      }

      .container {
        max-width: 640px;
        margin: 0 auto;
      }

      h1 {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
        color: #81c784;
      }

      .subtitle {
        color: #888;
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
      }

      .card {
        background: #1a1a1a;
        border: 1px solid #333;
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 1rem;
      }

      /* drop zone */
      .drop-zone {
        border: 2px dashed #555;
        border-radius: 8px;
        padding: 2rem;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s;
      }

      .drop-zone:hover,
      .drop-zone.drag-over {
        border-color: #81c784;
        background: rgba(129, 199, 132, 0.05);
      }

      .drop-zone p {
        margin-top: 0.5rem;
        color: #888;
        font-size: 0.875rem;
      }

      /* file info */
      .file-info {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem;
        background: #252525;
        border-radius: 8px;
        margin-top: 0.75rem;
      }

      .file-info .icon {
        font-size: 1.5rem;
      }

      .file-info .name {
        font-weight: 500;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .file-info .size {
        color: #888;
        font-size: 0.875rem;
        white-space: nowrap;
      }

      .file-info .remove {
        background: none;
        border: none;
        color: #ef5350;
        cursor: pointer;
        font-size: 1.25rem;
        padding: 0.25rem;
      }

      /* form */
      .form-group {
        margin-bottom: 1rem;
      }

      .form-group label {
        display: block;
        font-size: 0.875rem;
        font-weight: 500;
        margin-bottom: 0.375rem;
        color: #bbb;
      }

      .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
      }

      .form-group input,
      .form-group select {
        width: 100%;
        padding: 0.625rem 0.75rem;
        background: #252525;
        border: 1px solid #444;
        border-radius: 6px;
        color: #e0e0e0;
        font-size: 0.875rem;
      }

      .form-group input:focus,
      .form-group select:focus {
        outline: none;
        border-color: #81c784;
      }

      select {
        cursor: pointer;
        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='%23888' stroke-width='2' fill='none'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        padding-right: 2.25rem;
      }

      select option[disabled] {
        color: #555;
        background: #1a1a1a;
      }

      /* checkbox */
      .checkbox-group {
        display: flex;
        align-items: center;
        gap: 0.5rem;
      }

      .checkbox-group input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: #81c784;
        cursor: pointer;
      }

      .checkbox-group label {
        cursor: pointer;
        font-size: 0.875rem;
        color: #bbb;
        margin-bottom: 0;
      }

      /* pill buttons for presets */
      .pill-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.375rem;
      }

      .pill {
        display: inline-flex;
        align-items: center;
        padding: 0.35rem 0.7rem;
        border-radius: 20px;
        background: #252525;
        border: 1px solid #444;
        font-size: 0.75rem;
        cursor: pointer;
        color: #ccc;
        transition: all 0.15s;
        user-select: none;
      }

      .pill:hover {
        border-color: #81c784;
      }

      .pill.active {
        background: #81c784;
        color: #0f0f0f;
        border-color: #81c784;
        font-weight: 600;
      }

      .pill.disabled {
        opacity: 0.4;
        cursor: not-allowed;
        background: #1a1a1a;
      }

      /* codec wrapper + tooltip */
      .codec-support-list {
        padding: 0.625rem 0.75rem;
        background: #252525;
        border-radius: 8px;
        font-size: 0.8rem;
      }

      .codec-support-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 5.5rem 5.5rem;
        align-items: center;
        gap: 0.5rem;
        min-height: 2rem;
      }

      .codec-support-header {
        color: #888;
        font-size: 0.75rem;
        border-bottom: 1px solid #3a3a3a;
      }

      .codec-support-status {
        text-align: center;
        font-size: 0.75rem;
      }

      .codec-support-status.supported {
        color: #81c784;
      }

      .codec-support-status.unsupported {
        color: #ef5350;
      }

      .codec-support-status.unknown {
        color: #888;
      }

      .codec-output-warning {
        margin-top: 0.5rem;
        color: #ffb74d;
        font-size: 0.75rem;
      }

      /* metadata */
      .meta-section {
        margin-top: 0.5rem;
      }

      .meta-section summary {
        cursor: pointer;
        font-size: 0.875rem;
        color: #81c784;
        user-select: none;
        list-style: none;
      }

      .meta-section summary::-webkit-details-marker {
        display: none;
      }

      .meta-section summary:hover {
        color: #6fbf73;
      }

      .meta-table {
        width: 100%;
        margin-top: 0.5rem;
        font-size: 0.8rem;
        border-collapse: collapse;
        table-layout: auto; /* 改为 auto，避免列宽错乱 */
      }

      .meta-table th,
      .meta-table td {
        text-align: left;
        padding: 0.4rem 0.5rem;
        border-bottom: 1px solid #2a2a2a;
        vertical-align: middle; /* 统一垂直对齐 */
      }

      .meta-table th {
        color: #888;
        width: 42%; /* 稍微收紧，避免挤压 */
        font-weight: 400;
        white-space: nowrap; /* 防止 key 换行 */
      }

      .meta-table td {
        color: #ddd;
        text-align: right; /* 数值统一右对齐 */
        font-variant-numeric: tabular-nums; /* 等宽数字，更整齐 */
      }

      /* buttons */
      .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0.875rem;
        font-size: 1rem;
        font-weight: 600;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
      }

      .btn-primary {
        background: #81c784;
        color: #0f0f0f;
      }

      .btn-primary:hover:not(:disabled) {
        background: #6fbf73;
      }

      .btn-primary:disabled {
        opacity: 0.4;
        cursor: not-allowed;
      }

      .btn-cancel {
        background: #ef5350;
        color: #fff;
        margin-top: 0.5rem;
      }

      .btn-cancel:hover {
        background: #e53935;
      }

      .btn-secondary {
        background: #333;
        color: #e0e0e0;
        font-size: 0.875rem;
        padding: 0.625rem;
      }

      .btn-secondary:hover:not(:disabled) {
        background: #444;
      }

      .btn-secondary:disabled {
        opacity: 0.6;
        cursor: wait;
      }

      .error-copy-button {
        margin-top: 0.5rem;
      }

      .error-copied {
        color: #81c784;
        font-size: 0.75rem;
        margin: 0.5rem 0 0;
      }

      /* progress */
      progress {
        width: 100%;
        height: 8px;
        appearance: none;
        -webkit-appearance: none;
        border: none;
        border-radius: 4px;
        background: #333;
        overflow: hidden;
      }

      progress::-webkit-progress-bar {
        background: #333;
        border-radius: 4px;
      }

      progress::-webkit-progress-value {
        background: linear-gradient(90deg, #81c784, #4caf50);
        border-radius: 4px;
        transition: width 0.3s;
      }

      progress::-moz-progress-bar {
        background: linear-gradient(90deg, #81c784, #4caf50);
        border-radius: 4px;
        transition: width 0.3s;
      }

      .progress-bar-bg {
        height: 8px;
        background: #333;
        border-radius: 4px;
        overflow: hidden;
      }

      .progress-bar-fill {
        height: 100%;
        background: linear-gradient(90deg, #81c784, #4caf50);
        border-radius: 4px;
        transition: width 0.3s;
      }

      /* status */
      .status {
        text-align: center;
        padding: 0.75rem;
        border-radius: 8px;
        font-size: 0.875rem;
        margin-top: 0.75rem;
      }

      .status.success {
        background: rgba(129, 199, 132, 0.15);
        color: #81c784;
      }

      .status.error {
        background: rgba(239, 83, 80, 0.15);
        color: #ef5350;
      }

      .status.processing {
        background: rgba(255, 183, 77, 0.15);
        color: #ffb74d;
      }

      /* warning toast */
      .toast-warning {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.625rem 0.875rem;
        margin-top: 0.75rem;
        background: rgba(255, 183, 77, 0.12);
        border: 1px solid rgba(255, 183, 77, 0.3);
        border-radius: 8px;
        font-size: 0.8rem;
        color: #ffb74d;
        animation: toastIn 0.2s ease;
      }

      @keyframes toastIn {
        from {
          opacity: 0;
          transform: translateY(-8px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
      /* Language switcher */
      .lang-switcher {
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1000;
      }

      .lang-btn {
        display: inline-flex;
        align-items: center;
        padding: 0.5rem 0.75rem;
        background: #1a1a1a;
        border: 1px solid #333;
        border-radius: 6px;
        color: #e0e0e0;
        font-size: 0.875rem;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
      }

      .lang-btn:hover {
        border-color: #81c784;
        background: #252525;
      }

      .lang-btn svg {
        margin-right: 0.375rem;
        width: 16px;
        height: 16px;
      }

      /* mobile */
      @media (max-width: 480px) {
        body {
          padding: 1rem 0.75rem;
        }

        .card {
          padding: 1rem;
        }

        h1 {
          font-size: 1.4rem;
        }

        .subtitle {
          font-size: 0.8rem;
        }

        .form-row {
          grid-template-columns: 1fr;
        }

        .drop-zone {
          padding: 1.25rem;
        }

        .drop-zone svg {
          width: 32px;
          height: 32px;
        }

        .pill {
          font-size: 0.65rem;
          padding: 0.3rem 0.5rem;
        }

        .btn {
          padding: 0.75rem;
          font-size: 0.95rem;
        }

        .meta-table th,
        .meta-table td {
          padding: 0.25rem 0.375rem;
          font-size: 0.75rem;
        }
      }
