    /* Tab Switcher */
    .tab-switcher {
      display: flex;
      gap: 4px;
      background: var(--color-bg);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-sm);
      padding: 4px;
      margin-bottom: 24px;
    }

    .tab-btn {
      flex: 1;
      padding: 10px 20px;
      border: none;
      border-radius: 6px;
      background: transparent;
      font-family: var(--font-body);
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--color-text-secondary);
      cursor: pointer;
      transition: all var(--transition-fast);
    }

    .tab-btn:hover {
      color: var(--color-text);
      background: var(--color-surface-hover);
    }

    .tab-btn.active {
      background: var(--color-surface);
      color: var(--color-primary);
      box-shadow: var(--shadow-sm);
    }

    .tab-panel {
      display: none;
    }

    .tab-panel.active {
      display: block;
    }

    /* Image Info Bar */
    .image-info {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      padding: 14px 18px;
      background: var(--color-primary-light);
      border: 1px solid var(--color-primary-subtle);
      border-radius: var(--radius-sm);
      margin-bottom: 16px;
    }

    .image-info .info-item {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .image-info .info-label {
      font-size: 0.7rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--color-primary);
    }

    .image-info .info-value {
      font-family: var(--font-mono);
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--color-text);
    }

    /* Image Preview */
    .encode-preview {
      margin-bottom: 16px;
      border: 1px solid var(--color-border);
      border-radius: var(--radius-sm);
      overflow: hidden;
    }

    .encode-preview img {
      width: 100%;
      max-height: 280px;
      object-fit: contain;
      background: repeating-conic-gradient(#f1f5f9 0% 25%, transparent 0% 50%) 50% / 16px 16px;
      padding: 8px;
    }

    /* Output Textarea */
    .output-area {
      position: relative;
    }

    .output-textarea {
      width: 100%;
      min-height: 160px;
      padding: 14px;
      border: 1px solid var(--color-border);
      border-radius: var(--radius-sm);
      font-family: var(--font-mono);
      font-size: 0.8rem;
      color: var(--color-text);
      background: var(--color-bg);
      resize: vertical;
      line-height: 1.6;
      outline: none;
      transition: border-color var(--transition-fast);
      word-break: break-all;
    }

    .output-textarea:focus {
      border-color: var(--color-primary);
      box-shadow: 0 0 0 3px var(--color-primary-light);
    }

    /* Output Stats */
    .output-stats {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-top: 10px;
      margin-bottom: 16px;
      font-size: 0.8rem;
      color: var(--color-text-muted);
      font-family: var(--font-mono);
    }

    /* Toggle Switch Row */
    .toggle-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
    }

    .toggle-row label {
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--color-text-secondary);
    }

    .toggle-switch {
      display: flex;
      gap: 4px;
      background: var(--color-bg);
      border: 1px solid var(--color-border);
      border-radius: 6px;
      padding: 3px;
    }

    .toggle-option {
      padding: 6px 14px;
      border: none;
      border-radius: 4px;
      background: transparent;
      font-family: var(--font-body);
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--color-text-muted);
      cursor: pointer;
      transition: all var(--transition-fast);
    }

    .toggle-option.active {
      background: var(--color-surface);
      color: var(--color-primary);
      box-shadow: var(--shadow-sm);
    }

    .toggle-option:hover:not(.active) {
      color: var(--color-text);
    }

    /* Decode Input Textarea */
    .decode-textarea {
      width: 100%;
      min-height: 200px;
      padding: 14px;
      border: 1px solid var(--color-border);
      border-radius: var(--radius-sm);
      font-family: var(--font-mono);
      font-size: 0.8rem;
      color: var(--color-text);
      background: var(--color-surface);
      resize: vertical;
      line-height: 1.6;
      outline: none;
      transition: border-color var(--transition-fast);
      word-break: break-all;
    }

    .decode-textarea:focus {
      border-color: var(--color-primary);
      box-shadow: 0 0 0 3px var(--color-primary-light);
    }

    .decode-textarea::placeholder {
      color: var(--color-text-muted);
    }

    /* Decode Preview */
    .decode-preview {
      margin-top: 20px;
      border: 1px solid var(--color-border);
      border-radius: var(--radius-sm);
      overflow: hidden;
    }

    .decode-preview-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 14px;
      background: var(--color-bg);
      border-bottom: 1px solid var(--color-border-light);
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--color-text-secondary);
    }

    .decode-preview-header span {
      font-family: var(--font-mono);
      font-weight: 500;
    }

    .decode-preview img {
      width: 100%;
      max-height: 400px;
      object-fit: contain;
      background: repeating-conic-gradient(#f1f5f9 0% 25%, transparent 0% 50%) 50% / 16px 16px;
      padding: 8px;
    }

    /* Action buttons spacing */
    .action-buttons {
      margin-top: 16px;
    }

    /* Error message */
    .error-msg {
      padding: 12px 16px;
      background: var(--color-error-bg);
      border: 1px solid #fecaca;
      border-radius: var(--radius-sm);
      color: var(--color-error);
      font-size: 0.85rem;
      font-weight: 500;
      margin-top: 12px;
      display: none;
    }

    .error-msg.visible {
      display: block;
    }

    /* Responsive */
    @media (max-width: 768px) {
      .tab-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
      }

      .image-info {
        gap: 12px;
      }

      .toggle-row {
        flex-wrap: wrap;
      }
    }
